Opened 12 years ago

Closed 12 years ago

Last modified 48 years ago

#469 closed bug (Fixed)

Corruption of expression typed at prompt

Reported by: nobody Owned by: nobody
Priority: normal Milestone:
Component: GHCi Version: 6.4.1
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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
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...

Attachments (1)

goFile.2.gif (7.4 KB) - added by nobody 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by nobody

Attachment: goFile.2.gif added

comment:1 Changed 12 years ago by nobody

Status: assignedclosed

comment:2 Changed 12 years ago by simonpj

Status: assignedclosed
Logged In: YES 

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.

Note: See TracTickets for help on using tickets.