Opened 9 years ago

Closed 9 years ago

Last modified 44 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: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by nobody

comment:1 Changed 9 years ago by nobody

  • Status changed from assigned to closed

comment:2 Changed 9 years ago by simonpj

  • Status changed from assigned to closed
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.

Note: See TracTickets for help on using tickets.