Input Processing Loops in Haskell

Mark Conway Wirt mark@ArsConcero.org
Tue, 13 Nov 2001 14:35:22 -0500


On Tue, Nov 13, 2001 at 05:02:54PM -0000, Simon Marlow wrote:
> 
> You can paraphrase this in Haskell, in the IO monad, like this:
> 
>    loop = do {
> 	a <- get_input;
> 	if (a == gET_OUT) then return () else loop;
>      }


I follow, but I've never seen brackets used in Haskell code.  Are they
included for clarity, or do they have syntactic value?  Is this the same
as

    loop = do 
           a <- get_input
           if (a == GET_OUT) then return () else loop

?

--Mark