[Haskell-beginners] University project - weird problem

Daniel Fischer daniel.is.fischer at web.de
Wed Apr 21 20:18:27 EDT 2010


Am Donnerstag 22 April 2010 02:09:35 schrieb Renato dos Santos Leal:
> I've seen that there is something like hIsEOF that I can use to find EOF
>
> to do so I need something like eof <- hIsEOF hdl
> (hdl: the file that i'm reading)
>
> how can I put it as a guard in le_bloco?

No, that's not what you want.
What you need is

le_bloco (x:xs) ... (what you have)
le_bloco "" = return ()
-- when the end of the string is reached, we're done.


More information about the Beginners mailing list