mirror of
https://github.com/anoma/juvix.git
synced 2025-01-07 08:08:44 +03:00
2baad15a41
* Enables new function syntax in local let-declarations * Closes #2251
17 lines
302 B
Plaintext
17 lines
302 B
Plaintext
-- pattern matching nullary constructor
|
|
module test040;
|
|
|
|
import Stdlib.System.IO open;
|
|
import Stdlib.Data.Bool open;
|
|
|
|
type Unit :=
|
|
| unit : Unit;
|
|
|
|
type Foo (A : Type) :=
|
|
| foo : Unit -> A -> Foo A;
|
|
|
|
f : {A : Type} -> Foo A -> A
|
|
| (foo unit a) := a;
|
|
|
|
main : IO := printBoolLn (f (foo unit true));
|