Re: [Haskell] Re: Help : A problem with IO

2008-11-27 Thread abdullah abdul Khadir
Thanks all, I got it working finally. What did i learn ? a) I need to put a do after else for more than one instruction (?) b) All similar type of questions are to be redirected to haskell-beginner and haskell-cafe Points noted. Thank you once again, Abdullah Abdul Khadir On Wed

Re: [Haskell] Re: Help : A problem with IO

2008-11-26 Thread Chris Eidhof
On 26 nov 2008, at 17:18, 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')

Re: [Haskell] Re: Help : A problem with IO

2008-11-26 Thread Axel Simon
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 >

[Haskell] Re: Help : A problem with IO

2008-11-26 Thread abdullah abdul Khadir
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 "" elsecs <-