Opened 8 years ago

Closed 8 years ago

#5564 closed bug (fixed)

Panic in ghci name suggestion

Reported by: judahj 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 Rev(s):
Wiki Page:


From a plain invocation of ghci:

$ ghci
GHCi, version 7.2.1:  :? 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> 2
Prelude> fit

<interactive>:0:1:ghc: panic! (the 'impossible' happened)
  (GHC version 7.2.1 for x86_64-apple-darwin):
	unknownNameSuggestErr UnhelpfulSpan

Please report this as a GHC bug:


Presumably, ghci wants to suggest the it variable but is getting confused because that variable wasn't defined in a source file.

Note that this doesn't actually crash ghci; the prompt resumes as normal after the error message is printed out.

Change History (4)

comment:1 Changed 8 years ago by simonmar

Component: CompilerGHCi
Milestone: 7.4.1
Owner: set to simonmar
Priority: normalhigh

I'm fixing this.

comment:2 Changed 8 years ago by marlowsd@…

commit 0d6529f669104b6f22049d456a9600d949a09018

Author: Simon Marlow <>
Date:   Wed Oct 19 11:46:20 2011 +0100

    delete shadowed entries from tcg_rdr_env (#5564)
    This just tidies up the out-of-scope error messages in GHCi by not
    suggesting some names twice.

 compiler/typecheck/TcRnDriver.lhs |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

comment:3 Changed 8 years ago by marlowsd@…

commit 1d1cf4acb194a6f6bebb5b5ff3860d3182ac6b6f

Author: Simon Marlow <>
Date:   Wed Oct 19 11:40:43 2011 +0100

    Give a correct SrcSpan to 'it' (#5564)

 compiler/prelude/PrelNames.lhs    |    4 ++--
 compiler/typecheck/TcRnDriver.lhs |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

comment:4 Changed 8 years ago by simonmar

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.