summaryrefslogtreecommitdiff
path: root/src/GF/Source/AbsGF.hs
diff options
context:
space:
mode:
authorbringert <unknown>2005-05-25 09:41:59 +0000
committerbringert <unknown>2005-05-25 09:41:59 +0000
commit65bc1948d4ebb432836996bee5dba246905c154a (patch)
treea8f54052eea58db0579443925d008ca08a79415a /src/GF/Source/AbsGF.hs
parent4690a235381d5d28ac6a62a378f42f864821aca4 (diff)
Added support for list categories.
Diffstat (limited to 'src/GF/Source/AbsGF.hs')
-rw-r--r--src/GF/Source/AbsGF.hs27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/GF/Source/AbsGF.hs b/src/GF/Source/AbsGF.hs
index 575cff48b..143957102 100644
--- a/src/GF/Source/AbsGF.hs
+++ b/src/GF/Source/AbsGF.hs
@@ -79,10 +79,10 @@ data Included =
deriving (Eq,Ord,Show)
data Def =
- DDecl [Ident] Exp
- | DDef [Ident] Exp
- | DPatt Ident [Patt] Exp
- | DFull [Ident] Exp Exp
+ DDecl [Name] Exp
+ | DDef [Name] Exp
+ | DPatt Name [Patt] Exp
+ | DFull [Name] Exp Exp
deriving (Eq,Ord,Show)
data TopDef =
@@ -109,7 +109,9 @@ data TopDef =
deriving (Eq,Ord,Show)
data CatDef =
- CatDef Ident [DDecl]
+ SimpleCatDef Ident [DDecl]
+ | ListCatDef Ident [DDecl]
+ | ListSizeCatDef Ident [DDecl] Integer
deriving (Eq,Ord,Show)
data FunDef =
@@ -136,13 +138,18 @@ data ParConstr =
deriving (Eq,Ord,Show)
data PrintDef =
- PrintDef [Ident] Exp
+ PrintDef [Name] Exp
deriving (Eq,Ord,Show)
data FlagDef =
FlagDef Ident Ident
deriving (Eq,Ord,Show)
+data Name =
+ IdentName Ident
+ | ListName Ident
+ deriving (Eq,Ord,Show)
+
data LocDef =
LDDecl [Ident] Exp
| LDDef [Ident] Exp
@@ -159,6 +166,7 @@ data Exp =
| EMeta
| EEmpty
| EData
+ | EList Ident Exps
| EStrings String
| ERecord [LocDef]
| ETuple [TupleComp]
@@ -169,8 +177,8 @@ data Exp =
| EQCons Ident Ident
| EApp Exp Exp
| ETable [Case]
- | EVTable Exp [Exp]
| ETTable Exp [Case]
+ | EVTable Exp [Exp]
| ECase Exp [Case]
| EVariants [Exp]
| EPre Exp [Altern]
@@ -193,6 +201,11 @@ data Exp =
| ELin Ident
deriving (Eq,Ord,Show)
+data Exps =
+ NilExp
+ | ConsExp Exp Exps
+ deriving (Eq,Ord,Show)
+
data Patt =
PW
| PV Ident