comparison src/core.sml @ 182:d11754ffe252

Compiled pattern matching to C
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 12:43:20 -0400
parents 5d030ee143e2
children 19ee24bffbc0
comparison
equal deleted inserted replaced
181:31dfab1d4050 182:d11754ffe252
63 PConVar of int 63 PConVar of int
64 | PConFfi of string * string 64 | PConFfi of string * string
65 65
66 datatype pat' = 66 datatype pat' =
67 PWild 67 PWild
68 | PVar of string 68 | PVar of string * con
69 | PPrim of Prim.t 69 | PPrim of Prim.t
70 | PCon of patCon * pat option 70 | PCon of patCon * pat option
71 | PRecord of (string * pat) list 71 | PRecord of (string * pat * con) list
72 72
73 withtype pat = pat' located 73 withtype pat = pat' located
74 74
75 datatype exp' = 75 datatype exp' =
76 EPrim of Prim.t 76 EPrim of Prim.t
87 | ERecord of (con * exp * con) list 87 | ERecord of (con * exp * con) list
88 | EField of exp * con * { field : con, rest : con } 88 | EField of exp * con * { field : con, rest : con }
89 | ECut of exp * con * { field : con, rest : con } 89 | ECut of exp * con * { field : con, rest : con }
90 | EFold of kind 90 | EFold of kind
91 91
92 | ECase of exp * (pat * exp) list * con 92 | ECase of exp * (pat * exp) list * { disc : con, result : con }
93 93
94 | EWrite of exp 94 | EWrite of exp
95 95
96 | EClosure of int * exp list 96 | EClosure of int * exp list
97 97