comparison src/cjr.sml @ 182:d11754ffe252

Compiled pattern matching to C
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 12:43:20 -0400
parents 31dfab1d4050
children 19ee24bffbc0
comparison
equal deleted inserted replaced
181:31dfab1d4050 182:d11754ffe252
42 PConVar of int 42 PConVar of int
43 | PConFfi of string * string 43 | PConFfi of string * string
44 44
45 datatype pat' = 45 datatype pat' =
46 PWild 46 PWild
47 | PVar of string 47 | PVar of string * typ
48 | PPrim of Prim.t 48 | PPrim of Prim.t
49 | PCon of patCon * pat option 49 | PCon of patCon * pat option
50 | PRecord of (string * pat) list 50 | PRecord of (string * pat * typ) list
51 51
52 withtype pat = pat' located 52 withtype pat = pat' located
53 53
54 datatype exp' = 54 datatype exp' =
55 EPrim of Prim.t 55 EPrim of Prim.t
61 | EApp of exp * exp 61 | EApp of exp * exp
62 62
63 | ERecord of int * (string * exp) list 63 | ERecord of int * (string * exp) list
64 | EField of exp * string 64 | EField of exp * string
65 65
66 | ECase of exp * (pat * exp) list * typ 66 | ECase of exp * (pat * exp) list * { disc : typ, result : typ }
67 67
68 | EWrite of exp 68 | EWrite of exp
69 | ESeq of exp * exp 69 | ESeq of exp * exp
70 70
71 withtype exp = exp' located 71 withtype exp = exp' located