mirror of
https://github.com/anoma/juvix.git
synced 2024-12-04 06:23:13 +03:00
58dbf62520
* Closes #1930
15 lines
374 B
Plaintext
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)))
|