Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#528 Corruption of expression typed at prompt

6.4.1
closed-fixed
nobody
GHCi (16)
5
2005-10-20
2005-10-18
Anonymous
No

cjbackhouse@hotmail.com

WinXP SP2 GHC 6.4.1

On two occasions now I have loaded my program and typed
at the prompt "toFile blah" and got the error "Not in
scope 'goFile'". Repeating the expressione evaluates it
correctly. Is strange that both times it was exactly
the same function whose name was corrupted.
Does not seem to particularly repeatable (I've had it
twice out of maybe a hundred times I've done this)
Doubt it has anything to do with the details of my code
(which has changed substantially since last time this
happened)
Assume some (completely random) part of ghc is
corrupting what was typed at the prompt. This will,
unfortunately, probably make it completely impossible
to find...

Discussion

  • screenshot of interaction

     
    Attachments
  • Logged In: YES
    user_id=50165

    This is a bug in Windows, I'm afraid. It corrupts the first
    character of typeahead.

    To mitigate its effects, GHCi does try to disable typeahead by
    flushing the console input buffer, that was how we resolved
    this issue a couple of months back. The flushing wasn't done
    as late as it could have been though, leaving a (short) window
    for the user to stick some characters into the input queue
    before the prompt appeared. Sigbjorn has narrowed down the
    size of this window to its minimum & included that mod with
    the new installer for 6.4.1. Thanks Sigbjorn.

     
    • status: open --> closed-fixed