comparison src/elaborate.sml @ 844:74a1e3bdf430

Fix datatype import bug in Elaborate; fix server-side source setting; more standard library stuff
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Jun 2009 16:45:00 -0400
parents b2413e4dd109
children e8594cfa3236
comparison
equal deleted inserted replaced
843:9f0ea203a1ca 844:74a1e3bdf430
3269 val t = (L'.CModProj (n, ms, s), loc) 3269 val t = (L'.CModProj (n, ms, s), loc)
3270 val (env, n') = E.pushCNamed env x k' (SOME t) 3270 val (env, n') = E.pushCNamed env x k' (SOME t)
3271 val env = E.pushDatatype env n' xs xncs 3271 val env = E.pushDatatype env n' xs xncs
3272 3272
3273 val t = (L'.CNamed n', loc) 3273 val t = (L'.CNamed n', loc)
3274 val nxs = length xs
3275 val t = ListUtil.foldli (fn (i, _, t) =>
3276 (L'.CApp (t, (L'.CRel (nxs - 1 - i), loc)), loc))
3277 t xs
3274 val env = foldl (fn ((x, n, to), env) => 3278 val env = foldl (fn ((x, n, to), env) =>
3275 let 3279 let
3276 val t = case to of 3280 val t = case to of
3277 NONE => t 3281 NONE => t
3278 | SOME t' => (L'.TFun (t', t), loc) 3282 | SOME t' => (L'.TFun (t', t), loc)