#5717: ScopedTypeVariables and PolyKinds
------------------------------+---------------------------------------------
Reporter: dreixel | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.3 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
The following code panics:
{{{
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
module Bug2 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)
{-
panic! (the 'impossible' happened)
(GHC version 7.5.20111216 for x86_64-unknown-linux):
tyConKind ghc-prim:GHC.Prim.BOX{(w) tc 347}
-}
}}}
I believe the problem is an interaction between !ScopedTypeVariables and
!PolyKinds.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5717>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs