comparison src/source.sml @ 170:a158f8c5aa55

Parsing basic patterns
author Adam Chlipala <adamc@hcoop.net>
date Tue, 29 Jul 2008 16:38:15 -0400
parents 34ccd7d2bea8
children 8221b95cc24c
comparison
equal deleted inserted replaced
169:2232ab355f66 170:a158f8c5aa55
87 | SgnProj of string * string list * string 87 | SgnProj of string * string list * string
88 88
89 withtype sgn_item = sgn_item' located 89 withtype sgn_item = sgn_item' located
90 and sgn = sgn' located 90 and sgn = sgn' located
91 91
92 datatype pat' =
93 PWild
94 | PVar of string
95 | PCon of string list * string * pat option
96
97 withtype pat = pat' located
98
92 datatype exp' = 99 datatype exp' =
93 EAnnot of exp * con 100 EAnnot of exp * con
94 101
95 | EPrim of Prim.t 102 | EPrim of Prim.t
96 | EVar of string list * string 103 | EVar of string list * string
102 109
103 | ERecord of (con * exp) list 110 | ERecord of (con * exp) list
104 | EField of exp * con 111 | EField of exp * con
105 | ECut of exp * con 112 | ECut of exp * con
106 | EFold 113 | EFold
114
115 | ECase of exp * (pat * exp) list
107 116
108 withtype exp = exp' located 117 withtype exp = exp' located
109 118
110 datatype decl' = 119 datatype decl' =
111 DCon of string * kind option * con 120 DCon of string * kind option * con