Line No. | Rev | Author | Line |
---|---|---|---|
1 | 1 | paulosilva | |
2 | |||
3 | {-# LANGUAGE GADTs #-} | ||
4 | {-# OPTIONS_GHC -Wall #-} | ||
5 | |||
6 | ------------------------------------------------------------------------------- | ||
7 | |||
8 | {- | | ||
9 | Module : Language.Derivation.Syntax | ||
10 | Description : Abstract representation of derivation rules. | ||
11 | Copyright : (c) Paulo Silva | ||
12 | License : LGPL | ||
13 | |||
14 | Maintainer : paufil@di.uminho.pt | ||
15 | Stability : experimental | ||
16 | Portability : portable | ||
17 | |||
18 | -} | ||
19 | |||
20 | ------------------------------------------------------------------------------- | ||
21 | |||
22 | module Language.Derivation.Syntax ( | ||
23 | Derivation(..), | ||
24 | derivations | ||
25 | ) where | ||
26 | |||
27 | ------------------------------------------------------------------------------- | ||
28 | |||
29 | data Derivation where | ||
30 | 7 | paulosilva | Inv :: Derivation -> Derivation |
31 | Shunt :: String -> Derivation | ||
32 | DistrLow :: String -> Derivation | ||
33 | DistrUp :: String -> Derivation | ||
34 | MonotLow :: String -> Derivation | ||
35 | MonotUp :: String -> Derivation | ||
36 | 1 | paulosilva | TopPreserv :: String -> Derivation |
37 | BotPreserv :: String -> Derivation | ||
38 | 7 | paulosilva | CancUp :: String -> Derivation |
39 | CancLow :: String -> Derivation | ||
40 | Free :: String -> Derivation | ||
41 | Apply :: String -> Derivation | ||
42 | 1 | paulosilva | deriving Show |
43 | |||
44 | ------------------------------------------------------------------------------- | ||
45 | |||
46 | derivations :: [String] | ||
47 | derivations = [ | ||
48 | "inv", "shunt", "distr_low", "distr_up", "monot_low", "monot_up", | ||
49 | "top_preserving", "bot_preserving", "canc_up", "canc_low", "free", "apply" | ||
50 | ] | ||
51 | |||
52 | ------------------------------------------------------------------------------- |