This fails:
> the ({A : Type} -> A -> {B : Type} -> B -> (A, B)) MkPair
(input):1:5:When checking argument value to function Prelude.Basics.the:
Type mismatch between
A -> B1 -> (A, B1) (Type of MkPair)
and
A1 -> B -> (A1, B) (Expected type)
Specifically:
Type mismatch between
Pair A
and
\uv => uv -> uv
This works:
> ({A : Type} -> {B : Type} -> A -> B -> (A, B)) MkPair
\A1, B1 => MkPair : A -> B -> (A, B)
Oddly:
q : {A : Type} -> A -> {B : Type} -> B -> (A, B)
q a b = MkPair a b
> :t q
q : A -> B -> (A, B)
> :t MkPair
MkPair : A -> B -> (A, B)
Why do q
and MkPair
appear to have the same type? Do they really have the same type? Why does the order of implicit arguments matter?