Mercurial > urweb
comparison src/elab_env.sml @ 109:813e5a52063d
Remove closure conversion in favor of zany fun with modules, which also replaces 'page'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 13 Jul 2008 10:17:06 -0400 |
parents | f0f59e918cac |
children | e3041657d653 |
comparison
equal
deleted
inserted
replaced
108:f59553dc1b6a | 109:813e5a52063d |
---|---|
89 str : (string * sgn) IM.map | 89 str : (string * sgn) IM.map |
90 } | 90 } |
91 | 91 |
92 val namedCounter = ref 0 | 92 val namedCounter = ref 0 |
93 | 93 |
94 fun newNamed () = | |
95 let | |
96 val r = !namedCounter | |
97 in | |
98 namedCounter := r + 1; | |
99 r | |
100 end | |
101 | |
94 val empty = { | 102 val empty = { |
95 renameC = SM.empty, | 103 renameC = SM.empty, |
96 relC = [], | 104 relC = [], |
97 namedC = IM.empty, | 105 namedC = IM.empty, |
98 | 106 |
290 | DVal (x, n, t, _) => pushENamedAs env x n t | 298 | DVal (x, n, t, _) => pushENamedAs env x n t |
291 | DSgn (x, n, sgn) => pushSgnNamedAs env x n sgn | 299 | DSgn (x, n, sgn) => pushSgnNamedAs env x n sgn |
292 | DStr (x, n, sgn, _) => pushStrNamedAs env x n sgn | 300 | DStr (x, n, sgn, _) => pushStrNamedAs env x n sgn |
293 | DFfiStr (x, n, sgn) => pushStrNamedAs env x n sgn | 301 | DFfiStr (x, n, sgn) => pushStrNamedAs env x n sgn |
294 | DConstraint _ => env | 302 | DConstraint _ => env |
295 | DPage _ => env | 303 | DExport _ => env |
296 | 304 |
297 fun sgiBinds env (sgi, _) = | 305 fun sgiBinds env (sgi, _) = |
298 case sgi of | 306 case sgi of |
299 SgiConAbs (x, n, k) => pushCNamedAs env x n k NONE | 307 SgiConAbs (x, n, k) => pushCNamedAs env x n k NONE |
300 | SgiCon (x, n, k, c) => pushCNamedAs env x n k (SOME c) | 308 | SgiCon (x, n, k, c) => pushCNamedAs env x n k (SOME c) |