[GHC] #14308: GHC panic with invalid expression

GHC ghc-devs at haskell.org
Mon Oct 2 23:32:07 UTC 2017


#14308: GHC panic with invalid expression
----------------------------------------+---------------------------------
           Reporter:  d6e               |             Owner:  (none)
               Type:  bug               |            Status:  new
           Priority:  normal            |         Milestone:
          Component:  Compiler          |           Version:  8.2.1
           Keywords:                    |  Operating System:  MacOS X
       Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
          Test Case:                    |        Blocked By:
           Blocking:                    |   Related Tickets:
Differential Rev(s):                    |         Wiki Page:
----------------------------------------+---------------------------------
 Hi, I recently discovered this expression causes GHC to panic. Shouldn't
 it handle this more gracefully? Perhaps saying something like "That
 expression is not valid. <Further Explanation>"

 Invalid expression:
 {{{#!hs
 g :: (a->b) a
 }}}


 {{{
 Prelude> g :: (a->b) a
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.2.1 for x86_64-apple-darwin):
         repSplitAppTys
   a_a1Lz[sk:1]
   b_a1LA[sk:1]
   []
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
 ghc:Outputable
         pprPanic, called at compiler/types/Type.hs:808:9 in ghc:Type

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 }}}

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


More information about the ghc-tickets mailing list