[GHC] #10083: ghc: panic! (the 'impossible' happened)

GHC ghc-devs at haskell.org
Thu Mar 12 08:50:30 UTC 2015


#10083: ghc: panic! (the 'impossible' happened)
-------------------------------------+-------------------------------------
        Reporter:  hedayaty          |                   Owner:
            Type:  bug               |                  Status:  infoneeded
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.4
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I'm conscious that you (alone, as far as I can tell) are held up by this
 bug.  I think I know how to fix it, but it's not entirely straightforward
 and we are very far down the road for 7.10.  So I'd like to see if we can
 find a workaroud.

 Two suggestions.  First idea. compile `RSR` (the one with an `hs-boot`
 file) with `-funfolding-use-threshold=0`.  That will switch off inlining
 in that module only.

 Second idea (less brutal).  In the first version (which is close to what
 you have), instead of
 {{{
   data RSR = MkRSR SR deriving( Eq )
 }}}
 say
 {{{
   data RSR = MkRSR SR

   instance Eq RSR where
      (==) = eqRSR

   eqRSR :: RSR -> RSR -> Bool
   {-# NOINLINE eqRSR #-}
   eqRSR (RSR s1) (RSR s2) = s1==s2
 }}}
 I think that'll work.  It's tiresome because you can't use the auto-
 generated equality method, but your data types are small.  You may need to
 do this for other instances.

 I hope that this will get you unglued.

 Simon

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


More information about the ghc-tickets mailing list