Mercurial > urweb
comparison src/expl_env.sml @ 246:3aa010e97db9
Explify tables
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 08:46:22 -0400 |
parents | aa54250f58ac |
children | 73456bfde988 |
comparison
equal
deleted
inserted
replaced
245:1e24a3e6d614 | 246:3aa010e97db9 |
---|---|
280 | DValRec vis => foldl (fn ((x, n, t, _), env) => pushENamed env x n t) env vis | 280 | DValRec vis => foldl (fn ((x, n, t, _), env) => pushENamed env x n t) env vis |
281 | DSgn (x, n, sgn) => pushSgnNamed env x n sgn | 281 | DSgn (x, n, sgn) => pushSgnNamed env x n sgn |
282 | DStr (x, n, sgn, _) => pushStrNamed env x n sgn | 282 | DStr (x, n, sgn, _) => pushStrNamed env x n sgn |
283 | DFfiStr (x, n, sgn) => pushStrNamed env x n sgn | 283 | DFfiStr (x, n, sgn) => pushStrNamed env x n sgn |
284 | DExport _ => env | 284 | DExport _ => env |
285 | DTable (tn, x, n, c) => | |
286 let | |
287 val t = (CApp ((CModProj (tn, [], "table"), loc), c), loc) | |
288 in | |
289 pushENamed env x n t | |
290 end | |
285 | 291 |
286 fun sgiBinds env (sgi, loc) = | 292 fun sgiBinds env (sgi, loc) = |
287 case sgi of | 293 case sgi of |
288 SgiConAbs (x, n, k) => pushCNamed env x n k NONE | 294 SgiConAbs (x, n, k) => pushCNamed env x n k NONE |
289 | SgiCon (x, n, k, c) => pushCNamed env x n k (SOME c) | 295 | SgiCon (x, n, k, c) => pushCNamed env x n k (SOME c) |
326 end | 332 end |
327 | SgiVal (x, n, t) => pushENamed env x n t | 333 | SgiVal (x, n, t) => pushENamed env x n t |
328 | SgiSgn (x, n, sgn) => pushSgnNamed env x n sgn | 334 | SgiSgn (x, n, sgn) => pushSgnNamed env x n sgn |
329 | SgiStr (x, n, sgn) => pushStrNamed env x n sgn | 335 | SgiStr (x, n, sgn) => pushStrNamed env x n sgn |
330 | 336 |
337 | SgiTable (tn, x, n, c) => | |
338 let | |
339 val t = (CApp ((CModProj (tn, [], "table"), loc), c), loc) | |
340 in | |
341 pushENamed env x n t | |
342 end | |
343 | |
331 end | 344 end |