From 98370da7e9f70e3d83f666019b765e15f617b846 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 7 Apr 2009 15:04:07 -0400 Subject: Enhance table sig item support and get demo compiling again --- src/source.sml | 73 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) (limited to 'src/source.sml') 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 -- cgit v1.2.3