From 86440d5a251741c3c1a279646b949c35eb25b4a2 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 17 Sep 2009 17:17:49 -0400 Subject: Don't try to check if functions are already tail-recursive --- tests/tail.ur | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/tail.ur') diff --git a/tests/tail.ur b/tests/tail.ur index 259b5f34..84e0b7e8 100644 --- a/tests/tail.ur +++ b/tests/tail.ur @@ -8,8 +8,17 @@ fun addEm n = n2 <- addEm (n - 1); return (n1 + n2) +fun addEm' n acc = + if n = 0 then + return acc + else + n1 <- rpc (one ()); + addEm' (n - 1) (n1 + acc) + fun main () = s <- source 0; - return + s' <- source 0; + return + -- cgit v1.2.3