`ghc: panic!` when loading module
I'm learning Haskell from an online book (haskellbook.com) and when I loaded an answers module, this happened:
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:
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.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |