[Haskell] Re: Help : A problem with IO
Axel.Simon at ens.fr
Wed Nov 26 11:29:07 EST 2008
On Wed, 2008-11-26 at 21:48 +0530, abdullah abdul Khadir wrote:
> The function getMyLine written by me is intended for getting a
> complete string from the standard input.
> import IO
> getMyLine :: IO [Char]
> getMyLine = do
> c <- getChar
> if(c == '\n')
> then return ""
> else cs <- getMyLine
> return [c]
a) you forgot a 'do' after 'else'
b) your email would be answered quicker on haskell-beginners or
haskell-cafe since haskell is mainly used for announcements.
More information about the Haskell