[GHC] #14344: `ghc: panic!` when loading module

GHC ghc-devs at haskell.org
Wed Oct 11 22:07:58 UTC 2017


#14344: `ghc: panic!` when loading module
-------------------------------------+-------------------------------------
           Reporter:  javi           |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:                 |  Operating System:  MacOS X
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I'm learning Haskell from an online book (haskellbook.com) and when I
 loaded an answers module, this happened:

 {{{#!hs
 Prelude> :l ex.hs
 [1 of 1] Compiling Ex               ( ex.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.2.1 for x86_64-apple-darwin):
         repSplitAppTys
   a_a1qJ[sk:1]
   Bool
   []
   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

 >

 }}}

 notice that the Prelude module got unloaded. The source code for my
 `ex.hs` module:

 {{{#!hs
 module Ex where

 import Data.Char

 myAny :: (a -> Bool) [a] -> Bool
 myAny pred [] = False
 myAny pred (x:xs) = pred x || myAny pred xs

 }}}

 You'll notice that I missed a `->` in `myAny`'s type signature.

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


More information about the ghc-tickets mailing list