I am using the Hugs 1.4 version as currently on the haskell.org website
(marked Beta version on the website). I have tried this on a PC with Win95
and on a sun spac station with sunos4. The problem I find on both machines 
is that neither hGetContents (IO.hs) nor getContents (Prelude.hs) echo 
characters to the screen.

The Haskell report states:

"By default, these input functions echo to standard output. Functions in 
the I/O library provide full control over echoing." 

A program which demonstrates this is

---------------------------

module Test 
where

import IO


main :: IO ()

main = 
   getContents >>= \i ->
   let o = words i in
   putStr (show o) >> 
   return ()

---------------------------

where the session transcript is

Test> main
["this", "is", "an", "example{Interrupted!}


ie the output of the program is fine, but none of the input is echoed.


Amanda Clare

Reply via email to