Hi, ghc implements the (Haskell98-specified) default behaviour of stdin being line buffered ; Hugs opts (for good reasons) to make stdin un-buffered by default. Use hSetBuffering to be sure that you get the same buffering across systems. --sigbjorn [EMAIL PROTECTED] <[EMAIL PROTECTED]> writes: > > ghc-4.02 and hugs98-March99 perform differently the program > > main = getChar >> putStr "finished" > > > ghc accepts the input keys a, b ... without proceeding to putStr, > finally, the Enter key forces this putStr. > > hugs gets to putStr after any first key stroke (which was my aim). > > Does the Hugs dialogue shell matter here? > Which behaviour is of correct Haskell-98 ? > > ------------------ > Sergey Mechveliani > [EMAIL PROTECTED] >
RE: getChar in ghc-4.02, hugs
Sigbjorn Finne (Intl Vendor) Fri, 30 Apr 1999 10:52:11 +0200 (MET DST)
