[Haskell-cafe] Re: do/if/then/else confusion

2007-11-01 Thread David Carter
David Carter wrote: Another newbie question, but I can't seem to find any answers on the web... Just figured it out myself ... I need a do after the else, of course. (But I still think the error message is less than helpful!). Sorry for the bandwidth David Can someone tell me what's

Re: [Haskell-cafe] Re: do/if/then/else confusion

2007-11-01 Thread Felipe Lessa
On 11/1/07, David Carter [EMAIL PROTECTED] wrote: (But I still think the error message is less than helpful!). Maybe a bug should be filled? -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: do/if/then/else confusion

2007-11-01 Thread Maurí­cio
(...) Can someone tell me what's wrong with this? import qualified System.Posix.Directory as PD readdirAll :: PD.DirStream - IO [String] readdirAll d = do dir - PD.readDirStream d if dir == then return [] else rest - readdirAll d return (dir:rest)