summaryrefslogtreecommitdiff
path: root/src/GF/Source/AbsGF.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Source/AbsGF.hs')
-rw-r--r--src/GF/Source/AbsGF.hs42
1 files changed, 29 insertions, 13 deletions
diff --git a/src/GF/Source/AbsGF.hs b/src/GF/Source/AbsGF.hs
index 0dd825891..8acf35349 100644
--- a/src/GF/Source/AbsGF.hs
+++ b/src/GF/Source/AbsGF.hs
@@ -5,7 +5,6 @@ import Ident --H
-- Haskell module generated by the BNF converter, except --H
-- newtype Ident = Ident String deriving (Eq,Ord,Show) --H
-
newtype LString = LString String deriving (Eq,Ord,Show)
data Grammar =
Gr [ModDef]
@@ -13,17 +12,7 @@ data Grammar =
data ModDef =
MMain Ident Ident [ConcSpec]
- | MAbstract Ident Extend Opens [TopDef]
- | MResource Ident Extend Opens [TopDef]
- | MResourceInt Ident Extend Opens [TopDef]
- | MResourceImp Ident Ident Opens [TopDef]
- | MConcrete Ident Ident Extend Opens [TopDef]
- | MConcreteInt Ident Ident Extend Opens [TopDef]
- | MConcreteImp Open Ident Ident
- | MTransfer Ident Open Open Extend Opens [TopDef]
- | MReuseAbs Ident Ident
- | MReuseCnc Ident Ident
- | MReuseAll Ident Extend Ident
+ | MModule ComplMod ModType ModBody
deriving (Eq,Ord,Show)
data ConcSpec =
@@ -39,6 +28,21 @@ data Transfer =
| TransferOut Open
deriving (Eq,Ord,Show)
+data ModType =
+ MTAbstract Ident
+ | MTResource Ident
+ | MTInterface Ident
+ | MTConcrete Ident Ident
+ | MTInstance Ident Ident
+ | MTTransfer Ident Open Open
+ deriving (Eq,Ord,Show)
+
+data ModBody =
+ MBody Extend Opens [TopDef]
+ | MWith Ident [Open]
+ | MReuse Ident
+ deriving (Eq,Ord,Show)
+
data Extend =
Ext Ident
| NoExt
@@ -51,7 +55,19 @@ data Opens =
data Open =
OName Ident
- | OQual Ident Ident
+ | OQualQO QualOpen Ident
+ | OQual QualOpen Ident Ident
+ deriving (Eq,Ord,Show)
+
+data ComplMod =
+ CMCompl
+ | CMIncompl
+ deriving (Eq,Ord,Show)
+
+data QualOpen =
+ QOCompl
+ | QOIncompl
+ | QOInterface
deriving (Eq,Ord,Show)
data Def =