Mercurial > urweb
comparison src/mono.sml @ 182:d11754ffe252
Compiled pattern matching to C
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 03 Aug 2008 12:43:20 -0400 |
parents | eb3f9913bf31 |
children | 19ee24bffbc0 |
comparison
equal
deleted
inserted
replaced
181:31dfab1d4050 | 182:d11754ffe252 |
---|---|
41 PConVar of int | 41 PConVar of int |
42 | PConFfi of string * string | 42 | PConFfi of string * string |
43 | 43 |
44 datatype pat' = | 44 datatype pat' = |
45 PWild | 45 PWild |
46 | PVar of string | 46 | PVar of string * typ |
47 | PPrim of Prim.t | 47 | PPrim of Prim.t |
48 | PCon of patCon * pat option | 48 | PCon of patCon * pat option |
49 | PRecord of (string * pat) list | 49 | PRecord of (string * pat * typ) list |
50 | 50 |
51 withtype pat = pat' located | 51 withtype pat = pat' located |
52 | 52 |
53 datatype exp' = | 53 datatype exp' = |
54 EPrim of Prim.t | 54 EPrim of Prim.t |
61 | EAbs of string * typ * typ * exp | 61 | EAbs of string * typ * typ * exp |
62 | 62 |
63 | ERecord of (string * exp * typ) list | 63 | ERecord of (string * exp * typ) list |
64 | EField of exp * string | 64 | EField of exp * string |
65 | 65 |
66 | ECase of exp * (pat * exp) list * typ | 66 | ECase of exp * (pat * exp) list * { disc : typ, result : typ } |
67 | 67 |
68 | EStrcat of exp * exp | 68 | EStrcat of exp * exp |
69 | 69 |
70 | EWrite of exp | 70 | EWrite of exp |
71 | ESeq of exp * exp | 71 | ESeq of exp * exp |