Commit b174288b authored by eir@cis.upenn.edu's avatar eir@cis.upenn.edu

Test #8953 in th/T8953

parent 2cc593dd
{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, TemplateHaskell,
FlexibleInstances, UndecidableInstances #-}
module T8953 where
import Data.Proxy
import Language.Haskell.TH
import System.IO
type family Poly (a :: k) :: *
type instance Poly (x :: Bool) = Int
type instance Poly (x :: Maybe k) = Double
type family Silly :: k -> *
type instance Silly = (Proxy :: * -> *)
type instance Silly = (Proxy :: (* -> *) -> *)
a :: Proxy (Proxy :: * -> *)
b :: Proxy (Proxy :: (* -> *) -> *)
a = undefined
b = undefined
type StarProxy (a :: *) = Proxy a
class PC (a :: k)
instance PC (a :: *)
instance PC (Proxy :: (k -> *) -> *)
data T1 :: k1 -> k2 -> *
data T2 :: k1 -> k2 -> *
type family F a :: k
type family G (a :: k) :: k
type instance G T1 = T2
type instance F Char = (G T1 Bool :: (* -> *) -> *)
$( do infos <- mapM reify [''Poly, ''Silly, 'a, 'b, ''StarProxy, ''PC, ''F, ''G]
runIO $ mapM (putStrLn . pprint) infos
runIO $ hFlush stdout
return [] )
type family T8953.Poly (a_0 :: k_1) :: *
type instance T8953.Poly (x_2 :: GHC.Types.Bool) = GHC.Types.Int
type instance T8953.Poly (x_3 :: GHC.Base.Maybe k_4) = GHC.Types.Double
type family T8953.Silly :: k_0 -> *
type instance T8953.Silly = Data.Proxy.Proxy :: * -> *
type instance T8953.Silly = Data.Proxy.Proxy :: (* -> *) -> *
T8953.a :: Data.Proxy.Proxy (Data.Proxy.Proxy :: * -> *)
T8953.b :: Data.Proxy.Proxy (Data.Proxy.Proxy :: (* -> *) -> *)
type T8953.StarProxy (a_0 :: *) = Data.Proxy.Proxy a_0
class T8953.PC (a_0 :: k_1)
instance T8953.PC (a_2 :: *)
instance T8953.PC (Data.Proxy.Proxy :: (k_3 -> *) -> *)
type family T8953.F (a_0 :: *) :: k_1
type instance T8953.F GHC.Types.Char = T8953.G (T8953.T1 :: * ->
(* -> *) -> *)
GHC.Types.Bool :: (* -> *) -> *
type family T8953.G (a_0 :: k_1) :: k_1
type instance T8953.G (T8953.T1 :: k_2 ->
k1_3 -> *) = T8953.T2 :: k_2 -> k1_3 -> *
...@@ -332,3 +332,4 @@ test('T7241', normal, compile_fail, ['-v0']) ...@@ -332,3 +332,4 @@ test('T7241', normal, compile_fail, ['-v0'])
test('T9262', normal, compile, ['-v0']) test('T9262', normal, compile, ['-v0'])
test('T9199', normal, compile, ['-v0']) test('T9199', normal, compile, ['-v0'])
test('T9692', normal, compile, ['-v0']) test('T9692', normal, compile, ['-v0'])
test('T8953', normal, compile, ['-v0'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment