1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-03 09:41:10 +03:00
juvix/tests/Compilation/negative/test002.juvix
Łukasz Czajka 161a34c36b
Optional braces in case syntax (#2778)
* Closes #2769 
* Removes old case syntax
* Pretty printing doesn't print braces in `case` if the `case` is a
"top" expression in a definition.
2024-05-22 18:14:03 +01:00

12 lines
199 B
Plaintext

-- pattern matching coverage in cases
module test002;
import Stdlib.Prelude open;
f (x : List Nat) : Nat :=
case x of
| nil := 0
| x :: y :: _ := x + y;
main : Nat := f (1 :: 2 :: nil);