summaryrefslogtreecommitdiff
path: root/src/core.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-02 11:15:32 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-02 11:15:32 -0400
commit49c123050b2bc8a24f250fcc0d55e49484bc604c (patch)
tree9dfcca82a4a6629190d044d10950f50872dbe52e /src/core.sml
parent16d3d1c3a6d1e78faab91076c20b76fdcb90edb9 (diff)
Case through corify
Diffstat (limited to 'src/core.sml')
-rw-r--r--src/core.sml16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core.sml b/src/core.sml
index b16766b3..5baa0351 100644
--- a/src/core.sml
+++ b/src/core.sml
@@ -59,10 +59,24 @@ datatype con' =
withtype con = con' located
+datatype patCon =
+ PConVar of int
+ | PConFfi of string * string
+
+datatype pat' =
+ PWild
+ | PVar of string
+ | PPrim of Prim.t
+ | PCon of patCon * pat option
+ | PRecord of (string * pat) list
+
+withtype pat = pat' located
+
datatype exp' =
EPrim of Prim.t
| ERel of int
| ENamed of int
+ | ECon of int * exp option
| EFfi of string * string
| EFfiApp of string * string * exp list
| EApp of exp * exp
@@ -75,6 +89,8 @@ datatype exp' =
| ECut of exp * con * { field : con, rest : con }
| EFold of kind
+ | ECase of exp * (pat * exp) list * con
+
| EWrite of exp
| EClosure of int * exp list