mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 05:42:26 +03:00
161a34c36b
* Closes #2769 * Removes old case syntax * Pretty printing doesn't print braces in `case` if the `case` is a "top" expression in a definition.
15 lines
274 B
Plaintext
15 lines
274 B
Plaintext
module NestedPatterns;
|
|
|
|
import Stdlib.Prelude open;
|
|
|
|
type MyList (A : Type) := myList : List A -> MyList A;
|
|
|
|
toList : {A : Type} -> MyList A -> List A
|
|
| (myList xs) := xs;
|
|
|
|
f : MyList Nat -> Nat
|
|
| xs :=
|
|
case toList xs of
|
|
| suc n :: nil := n
|
|
| _ := zero;
|