[GHC] #11399: Ill-kinded instance head involving -XTypeInType can invoke GHC panic
GHC
ghc-devs at haskell.org
Sun Jan 17 21:17:02 UTC 2016
#11399: Ill-kinded instance head involving -XTypeInType can invoke GHC panic
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by ekmett):
You don't even need `-XTypeInType`.
I had this bite me earlier when I accidentally gave one too many type
parameters to `K1`.
{{{
class GEq1 t where
gliftEq :: (a -> b -> Bool) -> t a -> t b -> Bool
instance Eq c => GEq1 (K1 i c) where gliftEq _ (K1 c) (K1 d) = c == d
}}}
If you replace the instance with
{{{
instance Eq c => GEq1 (K1 i c oops) where gliftEq _ (K1 c) (K1 d) = c == d
}}}
You get the same `fpProv falls into a hole` error.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11399#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list