Conclusion c RankNTypesis complicated. Try annotating the function instead of the argument.
c :: Test Identity
c = (cons :: Identity -> Test Identity) t
Why this is so requires an understanding of the intricacies of a type inference algorithm. There is some kind of intuition.
, , x :: forall a. F(a), a . , a "" a0 ( ). , .
:
id id :: ??
id0 id1.
id0 id1 :: ??
id0 :: forall a. a->a
id1 :: forall a. a->a
id0 :: a0 -> a0
id1 :: a1 -> a1
: a0 ~ (a1 -> a1).
id0 :: (a1 -> a1) -> (a1 -> a1)
id1 :: a1 -> a1
.
id0 id1 :: a1 -> a1
Re-.
id0 id1 :: forall a. a->a
, , a0 ~ (forall a. a->a) a1. , , , .
, :
(id :: (forall a. a->a) -> (forall a. a->a)) id
. 2 ( -N). GHC , , -: forall - , , . , forall , , .
GHC, , . gory, , . ( , , - , , Hindley-Milner).