blob: 5dd7ac4b58677965279ddf6e9b1e562664c3e767 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
module T5717 where
data TypeRep = TypeRep
data Proxy t = Proxy
typeRep :: Proxy a -> TypeRep
typeRep Proxy = TypeRep
-- This one works fine:
typeOf :: forall a. a -> TypeRep
typeOf _ = typeRep (Proxy :: Proxy a)
-- But this one panics!
typeOf1 :: forall t a. t a -> TypeRep
typeOf1 _ = typeRep (Proxy :: Proxy t)
|