comparison 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
comparison
equal deleted inserted replaced
705:e6706a1df013 706:1fb318c17546
75 75
76 | CWild of kind 76 | CWild of kind
77 77
78 withtype con = con' located 78 withtype con = con' located
79 79
80 datatype inference =
81 Infer
82 | DontInfer
83 | TypesOnly
84
80 datatype sgn_item' = 85 datatype sgn_item' =
81 SgiConAbs of string * kind 86 SgiConAbs of string * kind
82 | SgiCon of string * kind option * con 87 | SgiCon of string * kind option * con
83 | SgiDatatype of string * string list * (string * con option) list 88 | SgiDatatype of string * string list * (string * con option) list
84 | SgiDatatypeImp of string * string list * string 89 | SgiDatatypeImp of string * string list * string
85 | SgiVal of string * con 90 | SgiVal of string * con
91 | SgiTable of string * con * exp
86 | SgiStr of string * sgn 92 | SgiStr of string * sgn
87 | SgiSgn of string * sgn 93 | SgiSgn of string * sgn
88 | SgiInclude of sgn 94 | SgiInclude of sgn
89 | SgiConstraint of con * con 95 | SgiConstraint of con * con
90 | SgiClassAbs of string * kind 96 | SgiClassAbs of string * kind
95 | SgnVar of string 101 | SgnVar of string
96 | SgnFun of string * sgn * sgn 102 | SgnFun of string * sgn * sgn
97 | SgnWhere of sgn * string * con 103 | SgnWhere of sgn * string * con
98 | SgnProj of string * string list * string 104 | SgnProj of string * string list * string
99 105
100 withtype sgn_item = sgn_item' located 106 and pat' =
101 and sgn = sgn' located 107 PWild
108 | PVar of string
109 | PPrim of Prim.t
110 | PCon of string list * string * pat option
111 | PRecord of (string * pat) list * bool
102 112
103 datatype pat' = 113 and exp' =
104 PWild 114 EAnnot of exp * con
105 | PVar of string
106 | PPrim of Prim.t
107 | PCon of string list * string * pat option
108 | PRecord of (string * pat) list * bool
109 115
110 withtype pat = pat' located 116 | EPrim of Prim.t
117 | EVar of string list * string * inference
118 | EApp of exp * exp
119 | EAbs of string * con option * exp
120 | ECApp of exp * con
121 | ECAbs of explicitness * string * kind * exp
122 | EDisjoint of con * con * exp
123 | EDisjointApp of exp
111 124
112 datatype inference = 125 | EKAbs of string * exp
113 Infer
114 | DontInfer
115 | TypesOnly
116 126
117 datatype exp' = 127 | ERecord of (con * exp) list
118 EAnnot of exp * con 128 | EField of exp * con
129 | EConcat of exp * exp
130 | ECut of exp * con
131 | ECutMulti of exp * con
119 132
120 | EPrim of Prim.t 133 | EWild
121 | EVar of string list * string * inference
122 | EApp of exp * exp
123 | EAbs of string * con option * exp
124 | ECApp of exp * con
125 | ECAbs of explicitness * string * kind * exp
126 | EDisjoint of con * con * exp
127 | EDisjointApp of exp
128 134
129 | EKAbs of string * exp 135 | ECase of exp * (pat * exp) list
130 136
131 | ERecord of (con * exp) list 137 | ELet of edecl list * exp
132 | EField of exp * con
133 | EConcat of exp * exp
134 | ECut of exp * con
135 | ECutMulti of exp * con
136
137 | EWild
138
139 | ECase of exp * (pat * exp) list
140
141 | ELet of edecl list * exp
142 138
143 and edecl' = 139 and edecl' =
144 EDVal of string * con option * exp 140 EDVal of string * con option * exp
145 | EDValRec of (string * con option * exp) list 141 | EDValRec of (string * con option * exp) list
146 142
147 withtype exp = exp' located 143 withtype sgn_item = sgn_item' located
144 and sgn = sgn' located
145 and pat = pat' located
146 and exp = exp' located
148 and edecl = edecl' located 147 and edecl = edecl' located
148
149
149 150
150 datatype decl' = 151 datatype decl' =
151 DCon of string * kind option * con 152 DCon of string * kind option * con
152 | DDatatype of string * string list * (string * con option) list 153 | DDatatype of string * string list * (string * con option) list
153 | DDatatypeImp of string * string list * string 154 | DDatatypeImp of string * string list * string