[GHC] #14371: ghc: panic! when reloading file with code

GHC ghc-devs at haskell.org
Wed Oct 18 21:50:58 UTC 2017


#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)
> }}}
> \\
> (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.
> - (found on manjaro linux, ubuntu works OK. I have no other machines to
> compare)
>

> 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 header ''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.
 - (found on manjaro linux, ubuntu works OK. I have no other machines to
 compare)


 I hope I found u a bug :)
 \\
 Have a nice day

--

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


More information about the ghc-tickets mailing list