[GHC] #11254: GHC panic

GHC ghc-devs at haskell.org
Fri Dec 18 15:58:57 UTC 2015


#11254: GHC panic
----------------------------------------+---------------------------------
           Reporter:  Iceland_jack      |             Owner:
               Type:  bug               |            Status:  new
           Priority:  normal            |         Milestone:
          Component:  Compiler          |           Version:  7.11
           Keywords:                    |  Operating System:  Linux
       Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
          Test Case:                    |        Blocked By:
           Blocking:                    |   Related Tickets:
Differential Rev(s):                    |         Wiki Page:
----------------------------------------+---------------------------------
 I like to mix features to make code fail, code inspired by
 [https://phabricator.haskell.org/diffusion/GHC/browse/master/testsuite/tests
 /indexed-types/should_compile/T10318.hs$1 T10318]:

 {{{#!hs
 -- /tmp/panic.hs
 {-# LANGUAGE FlexibleContexts        #-}
 {-# LANGUAGE FlexibleInstances       #-}
 {-# LANGUAGE InstanceSigs            #-}
 {-# LANGUAGE TypeFamilies            #-}
 {-# LANGUAGE TypeSynonymInstances    #-}
 {-# LANGUAGE UndecidableSuperClasses #-}

 class (Frac (Frac a) ~ Frac a, Fractional (Frac a), ID (Frac a)) => ID a
 where
   type Frac a
   embed :: a -> Frac a

 instance ID Rational where
   type Frac Rational = Int
   embed :: Rational -> Rational
   embed = undefined
 }}}

 When running it with `defer-type-errors` it causes GHC to panic:

 {{{#!hs
 % ghci -fdefer-type-errors -ignore-dot-ghci panic.hs &> panic.log
 }}}

 actual error included in panic.log.
 GHC asks me to report this as a bug and I do as I'm told.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11254>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list