1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-07 08:08:44 +03:00
juvix/tests/Compilation/positive/test040.juvix
Łukasz Czajka 2baad15a41 Remove old function syntax (#2305)
* Enables new function syntax in local let-declarations
* Closes #2251
2023-08-24 16:24:47 +02:00

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));