summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T16627.hs
blob: b6cf83fd20b9a9fa74341453750318c71e6105a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# language DataKinds, PolyKinds, ScopedTypeVariables #-}
module Silly where
import Type.Reflection (Typeable, typeRep, TypeRep)
import Type.Reflection.Unsafe (mkTrApp)
import GHC.Exts (TYPE, RuntimeRep (..))
import Data.Kind (Type)

mkTrFun :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)
                  (a :: TYPE r1) (b :: TYPE r2).
           TypeRep a -> TypeRep b -> TypeRep ((a -> b) :: Type)
mkTrFun a b = typeRep `mkTrApp` a `mkTrApp` b

-- originally reported that there was no (Typeable LiftedRep) instance,
-- presumably to overeager RuntimeRep defaulting