Skip to content

GHCi user interface bug

GHCi can do some weird things, with the letter g and the up arrow:

ghci> :m Control.Concurrent
ghci> threadDelay 5000000

(now, while thread delay is running, press the up arrow once) (once the computation has returned, the following will be on the line) (i.e. you don't type threadDelay again)

ghci> threadDelay 5000000

(now just press enter)

<interactive>:1:0: Not in scope: `ghreadDelay'

This works for any computation that runs long enough for the user to press up while its still going. The result is always a g replacing the first letter - I have had gain for main etc. And the buffer always appears correct to visual inspection.

Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information