Skip to content

GHCi can crash when tabbing a filename

The following sequence of actions:

  1. Type :: I into GHCI
  2. Press the tab key
  3. Hold backspace to erase the resulting text
  4. Repeat steps 2 and 3

May result in the following appearing in the console:

Prelude Data.Map> :: ImageExpo.config ghc.exe: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for i386-unknown-mingw32):
        Prelude.chr: bad argument: (-947713851)

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

followed by the system prompt.

Afterwards I have realised that :: was actually interpreted as a GHCi command rather than the type designation syntax. Tabbing yields all files in the current directory, but actually performing the command yields unknown command '::'

There is only one file that starts with I in my current directory.

Did not manage to reproduce

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture x86
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information