Mercurial > urweb
diff src/cloconv.sml @ 74:144d082b47ae
Reduce efold
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 26 Jun 2008 12:12:06 -0400 |
parents | d3cc191cb25f |
children | 40d146f467c5 |
line wrap: on
line diff
--- a/src/cloconv.sml Thu Jun 26 11:32:29 2008 -0400 +++ b/src/cloconv.sml Thu Jun 26 12:12:06 2008 -0400 @@ -55,10 +55,10 @@ exp = fn (xn, rep) => fn e => case e of L'.ERel xn' => - if xn = xn' then - #1 rep - else - e + (case Int.compare (xn', xn) of + EQUAL => #1 rep + | GREATER => L'.ERel (xn' - 1) + | _ => e) | _ => e, bind = fn ((xn, rep), U.Exp.RelE _) => (xn+1, liftExpInExp 0 rep) | (ctx, _) => ctx}