[Haskell-cafe] Small syntax question

Chris Kuklewicz chris at mightyreason.com
Mon Feb 13 09:23:02 EST 2006


Maurício wrote:
>   Hi,
> 
>   This is valid code:
> 
> module Main where
> main = do
>     let a = 3
>     return ()


That desugars to

main = do
         let a=3
         in do
              return ()

> 
> 
>   Why isn't this one?
> 
> module Main where
> main = do {
>     let a = 3;
>     return ();
> };
> 

main = do {
           let a = 3
           in return ();
          }


>   Thanks for your help,
>   Maurício
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 



More information about the Haskell-Cafe mailing list