diff 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
line wrap: on
line diff
--- a/src/expl.sml	Thu Jul 31 13:08:57 2008 -0400
+++ b/src/expl.sml	Thu Jul 31 16:28:55 2008 -0400
@@ -59,6 +59,19 @@
 
 withtype con = con' located
 
+datatype patCon =
+         PConVar of int
+       | PConProj of int * string list * 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
@@ -74,6 +87,8 @@
        | ECut of exp * con * { field : con, rest : con }
        | EFold of kind
 
+       | ECase of exp * (pat * exp) list * con
+
        | EWrite of exp
 
 withtype exp = exp' located