String vs IO ()

S.D.Mechveliani mechvel@math.botik.ru
Wed, 23 Jan 2002 11:46:41 +0300


I am sorry for, maybe, a silly question.

  f name = readFile name >>= putStr

has the type  String -> IO ()
And I need    String -> String,

so that  (f name)  is a string contained in the given file.

I never learned such things in Haskell because they are rather 
non-functional.

Thank you in advance for the help.

-----------------
Serge Mechveliani
mechvel@botik.ru