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

#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

#14344: `ghc: panic!` when loading module -------------------------------------+------------------------------------- Reporter: javi | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #13819 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13819 Comment: Thanks for the bug report. This is a duplicate of #13819, and has been fixed in the upcoming GHC 8.2.2 release: {{{ $ /opt/ghc/8.2.2/bin/ghci Bug.hs GHCi, version 8.2.1.20170928: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Ex ( Bug.hs, interpreted ) Bug.hs:5:10: error: • Expecting one fewer arguments to ‘a -> Bool’ Expected kind ‘* -> *’, but ‘a -> Bool’ has kind ‘*’ • In the type signature: myAny :: (a -> Bool) [a] -> Bool | 5 | myAny :: (a -> Bool) [a] -> Bool | ^^^^^^^^^^^^^^^ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14344#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14344: `ghc: panic!` when loading module -------------------------------------+------------------------------------- Reporter: javi | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #13819 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by javi): Cool, thanks! sorry for the dup... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14344#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC