Tab-completing in a directory with Unicode heiroglyph crashes ghci
With a file called 𓅖.hs in C:\Users\acfoltzer
, the following in cmd.exe
:
C:\Users\acfoltzer>chcp 65001
Active code page: 65001
C:\Users\acfoltzer>ghci
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
Prelude> :l C:\cygwin\home\acfoltzer\<TAB>
ghc.exe: panic! (the 'impossible' happened)
(GHC version 7.10.1 for i386-unknown-mingw32):
Enum.toEnum{Word16}: tag (78166) is outside of bounds (0,65535)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Here, I'm setting the code page first according to the various bits of folk wisdom on the Internet about getting Unicode to properly display in cmd.exe
. I don't get this crash with a Cygwin terminal, but rather see ??.hs
.
I came across this because I was getting the same exception in the Cryptol REPL, so I suspect it's not unique to GHCi, but is rather something fishy in base.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | hvr |
Operating system | |
Architecture |