comparison src/expl.sml @ 176:33d4a8eea484

Case through explify
author Adam Chlipala <adamc@hcoop.net>
date Thu, 31 Jul 2008 16:28:55 -0400
parents 06a98129b23f
children d11754ffe252
comparison
equal deleted inserted replaced
175:b2d752455182 176:33d4a8eea484
57 57
58 | CUnit 58 | CUnit
59 59
60 withtype con = con' located 60 withtype con = con' located
61 61
62 datatype patCon =
63 PConVar of int
64 | PConProj of int * string list * string
65
66 datatype pat' =
67 PWild
68 | PVar of string
69 | PPrim of Prim.t
70 | PCon of patCon * pat option
71 | PRecord of (string * pat) list
72
73 withtype pat = pat' located
74
62 datatype exp' = 75 datatype exp' =
63 EPrim of Prim.t 76 EPrim of Prim.t
64 | ERel of int 77 | ERel of int
65 | ENamed of int 78 | ENamed of int
66 | EModProj of int * string list * string 79 | EModProj of int * string list * string
71 84
72 | ERecord of (con * exp * con) list 85 | ERecord of (con * exp * con) list
73 | EField of exp * con * { field : con, rest : con } 86 | EField of exp * con * { field : con, rest : con }
74 | ECut of exp * con * { field : con, rest : con } 87 | ECut of exp * con * { field : con, rest : con }
75 | EFold of kind 88 | EFold of kind
89
90 | ECase of exp * (pat * exp) list * con
76 91
77 | EWrite of exp 92 | EWrite of exp
78 93
79 withtype exp = exp' located 94 withtype exp = exp' located
80 95