Idris-dev/test/delab001/delab001.idr
David Raymond Christiansen 75c75975e2 Improve delaboration and pretty-printing for case
Now, the delaborator finds case expressions and converts them back to
the original. This makes :printdef work with these.
2014-11-30 13:21:38 -08:00

17 lines
325 B
Idris

module Case
foo : Nat -> String
foo n = case n of
Z => "z"
S _ => "s"
bar : Nat -> String -> String
bar x y = case x of
Z => y
S _ => y ++ y
append : List a -> List a -> List a
append xs ys = case xs of
Nil => ys
(x :: xs) => x :: append xs ys