Hi Abdullah, On Wed, 2008-11-26 at 21:48 +0530, abdullah abdul Khadir wrote: > Hi, > > 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. Axel. _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell