1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
juvix/tests/Rust/Compilation/positive/test046.juvix

18 lines
480 B
Plaintext
Raw Normal View History

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