mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-09-22 06:29:37 +03:00
75c75975e2
Now, the delaborator finds case expressions and converts them back to the original. This makes :printdef work with these.
17 lines
325 B
Idris
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
|