[GHC] #13467: ghc: panic! (the 'impossible' happened), initTc: unsolved constraints

GHC ghc-devs at haskell.org
Wed Mar 22 14:50:58 UTC 2017


#13467: ghc: panic! (the 'impossible' happened), initTc: unsolved constraints
-------------------------------------+-------------------------------------
        Reporter:  jhjonsson         |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:  duplicate         |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13106            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  new => closed
 * os:  MacOS X => Unknown/Multiple
 * resolution:   => duplicate
 * related:   => #13106


Comment:

 Thanks for the bug report.

 This is a duplicate of #13106, which will be fixed in GHC 8.2. The issue
 arises because you're using functions that aren't defined. Here's the
 error message you get in GHC 8.2:

 {{{
 [1 of 1] Compiling Main             ( Bug.hs, interpreted )

 Bug.hs:1:1: error:
     The IO action ‘main’ is not defined in module ‘Main’
   |
 1 | module Main (main) where
   | ^

 Bug.hs:58:18: error:
     Variable not in scope: (–) :: Int -> Int -> Int
    |
 58 | offset = ord 'A' – ord 'a'
    |                  ^
 }}}

 So define `(–)` and `main`, and the panic should go away.

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


More information about the ghc-tickets mailing list