Mercurial > urweb
view tests/recBad.lac @ 238:44a1663ad893
Checking for well-formed 'val rec'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 Aug 2008 13:13:16 -0400 |
parents | |
children | fc6f04889bf2 |
line wrap: on
line source
datatype list a = Nil | Cons of a * list a val rec append : t ::: Type -> list t -> list t -> list t = fn t ::: Type => fn ls1 => fn ls2 => case ls1 of Nil => ls2 | Cons (h, t) => Cons (h, append t ls2) (*val rec ones : list int = Cons (1, ones)*) val rec ones : unit -> list int = fn () => Cons (1, ones ())