
#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
\\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\
**gives me an error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[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'' \\
- All works when header is gone. - I put this code in separate file and error still occurs so it should not have any dependencies.
I hope I found u a bug :) \\ Have a nice day
New description: Hello, \\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in heared countSame :: (Ord a) => (a -> Bool) **->** [a] -> Int) \\ **gives me an error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[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'' \\ - On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies. I hope I found u a bug :) \\ Have a nice day -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler