summaryrefslogtreecommitdiff
path: root/src/elab.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-31 10:06:27 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-31 10:06:27 -0400
commitf4351288c5b57b130c0a75e5e84a445ca513527f (patch)
treec0e69cdf2d843fbf3c5d2853ce2effe487090970 /src/elab.sml
parentaa1b3a24913edd0dc97af0d1fc9e3dc0026a2460 (diff)
Elaborating some basic pattern matching
Diffstat (limited to 'src/elab.sml')
-rw-r--r--src/elab.sml13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/elab.sml b/src/elab.sml
index b258d7e5..48790a15 100644
--- a/src/elab.sml
+++ b/src/elab.sml
@@ -71,6 +71,17 @@ datatype con' =
withtype con = con' located
+datatype patCon =
+ PConVar of int
+ | PConProj of int * string list * string
+
+datatype pat' =
+ PWild
+ | PVar of string
+ | PCon of patCon * pat option
+
+withtype pat = pat' located
+
datatype exp' =
EPrim of Prim.t
| ERel of int
@@ -86,6 +97,8 @@ datatype exp' =
| ECut of exp * con * { field : con, rest : con }
| EFold of kind
+ | ECase of exp * (pat * exp) list * con
+
| EError
withtype exp = exp' located