Mercurial > urweb
diff 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 |
line wrap: on
line diff
--- a/src/elaborate.sml Sun Jun 07 14:15:22 2009 -0400 +++ b/src/elaborate.sml Sun Jun 07 16:45:00 2009 -0400 @@ -3271,6 +3271,10 @@ val env = E.pushDatatype env n' xs xncs val t = (L'.CNamed n', loc) + val nxs = length xs + val t = ListUtil.foldli (fn (i, _, t) => + (L'.CApp (t, (L'.CRel (nxs - 1 - i), loc)), loc)) + t xs val env = foldl (fn ((x, n, to), env) => let val t = case to of