Opened 3 years ago

Closed 3 years ago

#13383 closed bug (duplicate)

ghc: panic!

Reported by: henenenerik Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: Panic Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Compile-time crash or panic Test Case:
Blocked By: Blocking:
Related Tickets: #13106 Differential Rev(s):
Wiki Page:

Description

Tried to compile some code provided in the course I'm taking and caused ghc to panic. Got this in my command prompt:

[1 of 1] Compiling Main             ( temp.hs, temp.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.2 for x86_64-unknown-mingw32):
        initTc: unsolved constraints
  WC {wc_insol =
        [W] throw_a2dw :: t_a2dv[tau:1] (CHoleCan: throw)
        [W] throw_a2eY :: t_a2eX[tau:1] (CHoleCan: throw)
        [W] throw_a2fc :: t_a2fb[tau:1] (CHoleCan: throw)}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug }}}

Attachments (1)

temp.hs (802 bytes) - added by henenenerik 3 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 3 years ago by henenenerik

Type of failure: Incorrect API annotationCompile-time crash or panic

Changed 3 years ago by henenenerik

Attachment: temp.hs added

comment:2 Changed 3 years ago by RyanGlScott

Resolution: duplicate
Status: newclosed

Thanks for the bug report.

This is a duplicate of #13106, which has been fixed as of GHC 8.0.2. The error relates to the fact that throw is not defined. On 8.0.2 or later, it properly reports this:

GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Main             ( temp.hs, interpreted )

temp.hs:7:11: error:
    Variable not in scope: throw :: Exception -> Exceptional Int

temp.hs:16:50: error:
    Variable not in scope: throw :: Exception -> Exceptional String

temp.hs:19:25: error:
    Variable not in scope: throw :: Exception -> Exceptional String
Note: See TracTickets for help on using tickets.