diff src/mono.sml @ 178:eb3f9913bf31

First part of getting cases through monoize
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 09:26:49 -0400
parents 25b169416ea8
children d11754ffe252
line wrap: on
line diff
--- a/src/mono.sml	Sat Aug 02 11:15:32 2008 -0400
+++ b/src/mono.sml	Sun Aug 03 09:26:49 2008 -0400
@@ -37,10 +37,24 @@
 
 withtype typ = typ' 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
@@ -49,6 +63,8 @@
        | ERecord of (string * exp * typ) list
        | EField of exp * string
 
+       | ECase of exp * (pat * exp) list * typ
+
        | EStrcat of exp * exp
 
        | EWrite of exp