[GHC] #1355: Interactive I/O with ghc doesn't prompt until
after reading
GHC
trac at galois.com
Tue May 29 10:45:38 EDT 2007
#1355: Interactive I/O with ghc doesn't prompt until after reading
----------------------------------------------+-----------------------------
Reporter: ok at cs.otago.ac.nz | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Prelude | Version: 6.2
Severity: normal | Resolution: invalid
Keywords: interactive stdio late prompt | Difficulty: Unknown
Os: Multiple | Testcase:
Architecture: Multiple |
----------------------------------------------+-----------------------------
Comment (by simonmar):
I'm aware that everyone else does this, and I'm aware that GHC is
different. Also, the predecessor to GHC's current I/O system had the
behaviour you want.
Nevertheless, I did it this way on purpose. Why? Because I think it's an
ugly special case, and I didn't want to add it to the code. If you expect
stdin/stdout to have this odd interactive behaviour, you might start
expecting it to happen on sockets too, and it won't. The behaviour of
buffering in GHC is simple and works the same on stdin/stdout as it does
on all other Handles. There's nothing in the Haskell 98 spec that
requires us to have magic flushing of stdout.
Still, you wouldn't be the first person to complain about this (it's
question 6.1 in the FAQ!). I guess I wouldn't object if someone were to
submit a patch to implement this special case, as long as it didn't affect
performance.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1355>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list