mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 14:13:27 +03:00
18 lines
480 B
Plaintext
18 lines
480 B
Plaintext
|
-- polymorphic type arguments
|
||
|
module test046;
|
||
|
|
||
|
import Stdlib.Data.Nat open;
|
||
|
import Stdlib.Function open;
|
||
|
|
||
|
Ty : Type := {B : Type} -> B -> B;
|
||
|
|
||
|
id' : Ty
|
||
|
| {_} x := x;
|
||
|
|
||
|
-- In PR https://github.com/anoma/juvix/pull/2545 we had to slightly modify
|
||
|
-- the `fun` definition. The previous version is kept here as a comment.
|
||
|
-- fun : {A : Type} → A → Ty := id λ {_ := id'};
|
||
|
fun {A : Type} : A → Ty := id { _ -> {C : Type} → C → C } λ {_ := id'};
|
||
|
|
||
|
main : Nat := fun 5 {Nat} 7;
|