1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-04 06:23:13 +03:00
juvix/tests/Core/positive/test055.jvc
2023-03-30 19:56:07 +02:00

15 lines
374 B
Plaintext

-- eta-expansion of polymorphic constructors
type Void {
void : Π T : Type, Void T;
};
type Box {
box : Π T : Type, Π A : Type, Void T → A → A → Box A;
};
def f : Box Int → Int := \(x : Box Int) case x of { box _ _ _ a b := b - a };
def g : (Int → Int → Box Int) → Box Int := \(f : Int → Int → Box Int) f 2 3;
f (g (box Int Int (void Int)))