[GHC] #14641: GHC panics in incomplete program

GHC ghc-devs at haskell.org
Sun Jan 7 08:37:54 UTC 2018


#14641: GHC panics in incomplete program
-------------------------------------+-------------------------------------
           Reporter:  mmc            |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  low            |         Milestone:
          Component:  Compiler       |           Version:  8.0.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I misspell a variable and GHC panics.

 I have the following test1.hs file:

 {{{
 foo :: Double -> Double -> Bool
 foo a b = c > b
 }}}

 Then I do ghc -c test1.hs and get:

 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.2 for x86_64-unknown-linux):
         initTc: unsolved constraints
   WC {wc_insol = [W] x_a1LD :: t_a1LC[tau:1] (CHoleCan: x)}
 }}}

 If I add a "main" method to my test.hs, I get the expected

 {{{
 test1.hs:2:11: error: Variable not in scope: c :: Double
 }}}

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


More information about the ghc-tickets mailing list