diff src/source.sml @ 706:1fb318c17546

Enhance table sig item support and get demo compiling again
author Adam Chlipala <adamc@hcoop.net>
date Tue, 07 Apr 2009 15:04:07 -0400
parents 70cbdcf5989b
children d8217b4cb617
line wrap: on
line diff
--- a/src/source.sml	Tue Apr 07 14:11:32 2009 -0400
+++ b/src/source.sml	Tue Apr 07 15:04:07 2009 -0400
@@ -77,12 +77,18 @@
 
 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 @@
   | SgnWhere of sgn * string * con
   | SgnProj of string * string list * string
 
-withtype sgn_item = sgn_item' located
-and sgn = sgn' 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 pat' =
-         PWild
-       | PVar of string
-       | PPrim of Prim.t
-       | PCon of string list * string * pat option
-       | PRecord of (string * pat) list * bool
+and exp' =
+    EAnnot of exp * con
 
-withtype pat = pat' located
+  | 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
 
-datatype inference =
-         Infer
-       | DontInfer
-       | TypesOnly
+  | EKAbs of string * exp
 
-datatype exp' =
-         EAnnot of exp * con
+  | ERecord of (con * exp) list
+  | EField of exp * con
+  | EConcat of exp * exp
+  | ECut of exp * con
+  | ECutMulti 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
+  | EWild
 
-       | EKAbs of string * exp
+  | ECase of exp * (pat * exp) list
 
-       | ERecord of (con * exp) list
-       | EField of exp * con
-       | EConcat of exp * exp
-       | ECut of exp * con
-       | ECutMulti of exp * con
-
-       | EWild
-
-       | 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