[GHC] #15496: if a variable that isn't in scope is used and main is not defined ghc freaks out

GHC ghc-devs at haskell.org
Thu Aug 9 16:13:49 UTC 2018


#15496: if a variable that isn't in scope is used and main is not defined ghc
freaks out
----------------------------------------+---------------------------------
           Reporter:  kuhnsB            |             Owner:  (none)
               Type:  bug               |            Status:  new
           Priority:  normal            |         Milestone:  8.6.1
          Component:  Compiler          |           Version:  8.4.3
           Keywords:                    |  Operating System:  Linux
       Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
          Test Case:                    |        Blocked By:
           Blocking:                    |   Related Tickets:
Differential Rev(s):                    |         Wiki Page:
----------------------------------------+---------------------------------
 --y = 5::Double

 f::Double ->Double

 f x = x+y

 --main = print 5

 produces:

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

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

 un-commenting either line 1 or 4 causes ghc to identify the other problem
 correctly

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


More information about the ghc-tickets mailing list