comparison src/reduce.sml @ 954:2a50da66ffd8

Basic tail recursion introduction seems to be working
author Adam Chlipala <adamc@hcoop.net>
date Thu, 17 Sep 2009 16:35:11 -0400
parents 280f81731426
children 01a4d936395a
comparison
equal deleted inserted replaced
953:301530da2062 954:2a50da66ffd8
743 | ELet (x, t, e1, e2) => 743 | ELet (x, t, e1, e2) =>
744 (ELet (x, con env t, exp env e1, exp (UnknownE :: env) e2), loc) 744 (ELet (x, con env t, exp env e1, exp (UnknownE :: env) e2), loc)
745 745
746 | EServerCall (n, es, e, t1, t2) => (EServerCall (n, map (exp env) es, exp env e, 746 | EServerCall (n, es, e, t1, t2) => (EServerCall (n, map (exp env) es, exp env e,
747 con env t1, con env t2), loc) 747 con env t1, con env t2), loc)
748 | ETailCall (n, es, e, t1, t2) => (ETailCall (n, map (exp env) es, exp env e,
749 con env t1, con env t2), loc)
748 in 750 in
749 (*if dangling (edepth' (deKnown env)) r then 751 (*if dangling (edepth' (deKnown env)) r then
750 (Print.prefaces "exp" [("e", CorePrint.p_exp CoreEnv.empty all), 752 (Print.prefaces "exp" [("e", CorePrint.p_exp CoreEnv.empty all),
751 ("r", CorePrint.p_exp CoreEnv.empty r)]; 753 ("r", CorePrint.p_exp CoreEnv.empty r)];
752 raise Fail "!!") 754 raise Fail "!!")