Mercurial > urweb
comparison src/expl.sml @ 182:d11754ffe252
Compiled pattern matching to C
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 03 Aug 2008 12:43:20 -0400 |
parents | 33d4a8eea484 |
children | 8e9f97508f0d |
comparison
equal
deleted
inserted
replaced
181:31dfab1d4050 | 182:d11754ffe252 |
---|---|
63 PConVar of int | 63 PConVar of int |
64 | PConProj of int * string list * string | 64 | PConProj of int * string list * string |
65 | 65 |
66 datatype pat' = | 66 datatype pat' = |
67 PWild | 67 PWild |
68 | PVar of string | 68 | PVar of string * con |
69 | PPrim of Prim.t | 69 | PPrim of Prim.t |
70 | PCon of patCon * pat option | 70 | PCon of patCon * pat option |
71 | PRecord of (string * pat) list | 71 | PRecord of (string * pat * con) list |
72 | 72 |
73 withtype pat = pat' located | 73 withtype pat = pat' located |
74 | 74 |
75 datatype exp' = | 75 datatype exp' = |
76 EPrim of Prim.t | 76 EPrim of Prim.t |
85 | ERecord of (con * exp * con) list | 85 | ERecord of (con * exp * con) list |
86 | EField of exp * con * { field : con, rest : con } | 86 | EField of exp * con * { field : con, rest : con } |
87 | ECut of exp * con * { field : con, rest : con } | 87 | ECut of exp * con * { field : con, rest : con } |
88 | EFold of kind | 88 | EFold of kind |
89 | 89 |
90 | ECase of exp * (pat * exp) list * con | 90 | ECase of exp * (pat * exp) list * { disc : con, result : con } |
91 | 91 |
92 | EWrite of exp | 92 | EWrite of exp |
93 | 93 |
94 withtype exp = exp' located | 94 withtype exp = exp' located |
95 | 95 |