aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/source.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 15:04:07 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 15:04:07 -0400
commit98370da7e9f70e3d83f666019b765e15f617b846 (patch)
tree24ba2b9bca09a5a9c9236d096b13998d77a97ab9 /src/source.sml
parentfd1a963a81327f7b6a20a0f2ac131d2525649400 (diff)
Enhance table sig item support and get demo compiling again
Diffstat (limited to 'src/source.sml')
-rw-r--r--src/source.sml73
1 files changed, 37 insertions, 36 deletions
diff --git a/src/source.sml b/src/source.sml
index 42927ef3..0dca39ab 100644
--- a/src/source.sml
+++ b/src/source.sml
@@ -77,12 +77,18 @@ datatype con' =
withtype con = con' located
+datatype inference =
+ Infer
+ | DontInfer
+ | TypesOnly
+
datatype sgn_item' =
SgiConAbs of string * kind
| SgiCon of string * kind option * con
| SgiDatatype of string * string list * (string * con option) list
| SgiDatatypeImp of string * string list * string
| SgiVal of string * con
+ | SgiTable of string * con * exp
| SgiStr of string * sgn
| SgiSgn of string * sgn
| SgiInclude of sgn
@@ -97,56 +103,51 @@ and sgn' =
| SgnWhere of sgn * string * con
| SgnProj of string * string list * string
-withtype sgn_item = sgn_item' located
-and sgn = sgn' located
-
-datatype pat' =
- PWild
- | PVar of string
- | PPrim of Prim.t
- | PCon of string list * string * pat option
- | PRecord of (string * pat) list * bool
-
-withtype pat = pat' located
+and pat' =
+ PWild
+ | PVar of string
+ | PPrim of Prim.t
+ | PCon of string list * string * pat option
+ | PRecord of (string * pat) list * bool
-datatype inference =
- Infer
- | DontInfer
- | TypesOnly
-
-datatype exp' =
- EAnnot of exp * con
+and exp' =
+ EAnnot of exp * con
- | EPrim of Prim.t
- | EVar of string list * string * inference
- | EApp of exp * exp
- | EAbs of string * con option * exp
- | ECApp of exp * con
- | ECAbs of explicitness * string * kind * exp
- | EDisjoint of con * con * exp
- | EDisjointApp of exp
+ | EPrim of Prim.t
+ | EVar of string list * string * inference
+ | EApp of exp * exp
+ | EAbs of string * con option * exp
+ | ECApp of exp * con
+ | ECAbs of explicitness * string * kind * exp
+ | EDisjoint of con * con * exp
+ | EDisjointApp of exp
- | EKAbs of string * exp
+ | EKAbs of string * exp
- | ERecord of (con * exp) list
- | EField of exp * con
- | EConcat of exp * exp
- | ECut of exp * con
- | ECutMulti of exp * con
+ | ERecord of (con * exp) list
+ | EField of exp * con
+ | EConcat of exp * exp
+ | ECut of exp * con
+ | ECutMulti of exp * con
- | EWild
+ | EWild
- | ECase of exp * (pat * exp) list
+ | ECase of exp * (pat * exp) list
- | ELet of edecl list * exp
+ | ELet of edecl list * exp
and edecl' =
EDVal of string * con option * exp
| EDValRec of (string * con option * exp) list
-withtype exp = exp' located
+withtype sgn_item = sgn_item' located
+and sgn = sgn' located
+and pat = pat' located
+and exp = exp' located
and edecl = edecl' located
+
+
datatype decl' =
DCon of string * kind option * con
| DDatatype of string * string list * (string * con option) list