Mercurial > urweb
diff src/core_env.sml @ 417:e0e9e9eca1cb
Fix nasty de Bruijn substitution bug; TcSum demo
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 23 Oct 2008 12:58:35 -0400 |
parents | e976b187d73a |
children | bd9ee9aeca2f |
line wrap: on
line diff
--- a/src/core_env.sml Thu Oct 23 11:59:48 2008 -0400 +++ b/src/core_env.sml Thu Oct 23 12:58:35 2008 -0400 @@ -82,13 +82,13 @@ val subConInExp = U.Exp.mapB {kind = fn k => k, con = fn (xn, rep) => fn c => - case c of - CRel xn' => - (case Int.compare (xn', xn) of - EQUAL => #1 rep - | GREATER => CRel (xn' - 1) - | LESS => c) - | _ => c, + case c of + CRel xn' => + (case Int.compare (xn', xn) of + EQUAL => #1 rep + | GREATER => CRel (xn' - 1) + | LESS => c) + | _ => c, exp = fn _ => fn e => e, bind = fn ((xn, rep), U.Exp.RelC _) => (xn+1, liftConInCon 0 rep) | (ctx, _) => ctx}