Embrace -XTypeInType, add -XStarIsType
[ghc.git] / testsuite / tests / typecheck / should_compile / T13337.hs
1 {-# LANGUAGE PolyKinds, ScopedTypeVariables, TypeOperators, GADTs #-}
2 {-# OPTIONS_GHC -Wno-overlapping-patterns #-} -- don't want erroneous warning in test output
3 -- if removing this doesn't change output, then
4 -- remove it!
5
6 module T13337 where
7
8 import Data.Typeable
9 import Data.Kind
10
11 f :: forall k (a :: k). (Typeable k, Typeable a) => Proxy a -> Proxy Int
12 f p = case eqT :: Maybe (k :~: Type) of
13 Nothing -> Proxy
14 Just Refl -> case eqT :: Maybe (a :~: Int) of
15 Nothing -> Proxy
16 Just Refl -> p