summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc146.hs
blob: 61fac49197fcb1fe5acad35a9ac0f8ca2ac8165d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE RankNTypes #-}

-- The interesting thing about this one is that
-- there's an unbound type variable of kind *->*
-- that the typechecker should default to some 
-- arbitrary type.
--
-- GHC 5.02 could only really deal with such things
-- of kind *, but 5.03 extended that to *->..->*
-- Still not complete, but a lot better.

module ShouldCompile where

f :: (forall a b . a b -> int) -> (forall c . c int) -> int 
f x y = x y