Embrace -XTypeInType, add -XStarIsType
[ghc.git] / testsuite / tests / dependent / should_fail / T14066d.hs
1 {-# LANGUAGE RankNTypes, ScopedTypeVariables, PolyKinds #-}
2
3 module T14066d where
4
5 import Data.Proxy
6
7 g :: (forall c b (a :: c). (Proxy a, Proxy c, b)) -> ()
8 g _ = ()
9
10 f :: forall b. b -> (Proxy Maybe, ())
11 f x = (fstOf3 y :: Proxy Maybe, g y)
12 where
13 y :: (Proxy a, Proxy c, b) -- this should NOT generalize over b
14 -- meaning the call to g is ill-typed
15 y = (Proxy, Proxy, x)
16
17 fstOf3 (x, _, _) = x