Mercurial > urweb
annotate tests/recBad.ur @ 1855:0480b8f29a47
Undo 'let' inlining tweak; improve optimization of 'case' of type 'transaction'
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 07 Jun 2013 16:11:52 -0400 |
parents | 71bafe66dbe1 |
children |
rev | line source |
---|---|
adamc@238 | 1 datatype list a = Nil | Cons of a * list a |
adamc@238 | 2 |
adamc@242 | 3 fun append (t ::: Type) (ls1 : list t) (ls2 : list t) : list t = |
adamc@238 | 4 case ls1 of |
adamc@238 | 5 Nil => ls2 |
adamc@238 | 6 | Cons (h, t) => Cons (h, append t ls2) |
adamc@238 | 7 |
adamc@238 | 8 (*val rec ones : list int = Cons (1, ones)*) |
adamc@239 | 9 val rec ones = fn () => Cons (1, ones ()) |