Mercurial > urweb
diff src/core.sml @ 177:5d030ee143e2
Case through corify
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 02 Aug 2008 11:15:32 -0400 |
parents | 80192edca30d |
children | d11754ffe252 |
line wrap: on
line diff
--- a/src/core.sml Thu Jul 31 16:28:55 2008 -0400 +++ b/src/core.sml Sat Aug 02 11:15:32 2008 -0400 @@ -59,10 +59,24 @@ 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 @@ | 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