Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5545 closed bug (fixed)

($!) not in scope

Reported by: daniel.is.fischer Owned by: simonmar
Priority: high Milestone: 7.4.1
Component: GHCi Version: 7.2.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

When no module is interpreted, ghci doesn't know ($!) anymore:

$ ghci -ignore-dot-ghci
GHCi, version 7.2.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> const 3 $! 5

<interactive>:0:9:
    Not in scope: `$!'
    Perhaps you meant one of these:
      `$' (imported from Prelude), `!!' (imported from Prelude)

The same happens when only compiled modules are loaded, but it's there when there's an interpreted module loaded. The same behaviour is exhibited by HEAD.

Change History (6)

comment:1 Changed 3 years ago by daniel.is.fischer

Hmm, it's available as Prelude.$!.

comment:2 Changed 3 years ago by simonpj

  • Owner set to simonpj

Deeply strange. I'll look into it.

comment:3 Changed 3 years ago by simonmar

  • Milestone set to 7.4.1
  • Owner changed from simonpj to simonmar
  • Priority changed from normal to high

I have a fix for this, validating now.

comment:4 Changed 3 years ago by marlowsd@…

commit 6a342059c19c85a929884453806b1727b526df68

Author: Simon Marlow <[email protected]>
Date:   Tue Oct 18 11:31:53 2011 +0100

    fix value of this_mod passed to tcRnImports (#5545)

 compiler/main/HscMain.lhs        |    7 +++----
 compiler/main/InteractiveEval.hs |    7 +------
 2 files changed, 4 insertions(+), 10 deletions(-)

comment:5 Changed 3 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed

comment:6 Changed 3 years ago by simonpj@…

commit bcd8fdb0301adb78654a5e2794301b38a8fa2a41

Author: Simon Peyton Jones <[email protected]>
Date:   Fri Oct 21 16:41:13 2011 +0100

    A little more refactoring, triggered by the fix to Trac #5545

 compiler/main/HscMain.lhs         |    5 +----
 compiler/main/InteractiveEval.hs  |    8 ++++----
 compiler/typecheck/TcRnDriver.lhs |   11 ++++++++++-
 3 files changed, 15 insertions(+), 9 deletions(-)
Note: See TracTickets for help on using tickets.