comparison src/cjr_env.sml @ 182:d11754ffe252

Compiled pattern matching to C
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 12:43:20 -0400
parents 31dfab1d4050
children 8e9f97508f0d
comparison
equal deleted inserted replaced
181:31dfab1d4050 182:d11754ffe252
59 structs = IM.empty 59 structs = IM.empty
60 } 60 }
61 61
62 fun pushDatatype (env : env) x n xncs = 62 fun pushDatatype (env : env) x n xncs =
63 {datatypes = IM.insert (#datatypes env, n, (x, xncs)), 63 {datatypes = IM.insert (#datatypes env, n, (x, xncs)),
64 constructors = foldl (fn ((x, n, to), constructors) => 64 constructors = foldl (fn ((x, n', to), constructors) =>
65 IM.insert (constructors, n, (x, to, n))) 65 IM.insert (constructors, n', (x, to, n)))
66 (#constructors env) xncs, 66 (#constructors env) xncs,
67 67
68 numRelE = #numRelE env, 68 numRelE = #numRelE env,
69 relE = #relE env, 69 relE = #relE env,
70 namedE = #namedE env, 70 namedE = #namedE env,