[GHC] #12091: 'Variable not in scope" when using GHCi with `-fobject-code`

GHC ghc-devs at haskell.org
Fri May 20 07:56:52 UTC 2016


#12091: 'Variable not in scope" when using GHCi with `-fobject-code`
-------------------------------------+-------------------------------------
           Reporter:  thomie         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  high           |         Milestone:
          Component:  GHCi           |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #7253
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Since b98ff3ccb14e36145404f075349c8689762a2913 was landed (#7253), you
 don't need `let` to define stuff in GHCi:
 {{{
 $ ghci
 Prelude> x = 3
 Prelude> x
 3
 }}}

 But when using `-fobject-code`, this results in an error:
 {{{
 $ ghci -fobject-code
 Prelude> x = 3
 Prelude> x

 <interactive>:2:1: error: Variable not in scope: x
 }}}

 Very strange.

 CC @roshats, who implemented this feature, but the bug is probably in some
 part of the code he didn't touch.

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


More information about the ghc-tickets mailing list