Am Montag 26 Oktober 2009 03:39:13 schrieb Magicloud Magiclouds:
> Hi,
>   In case of this:
> case bala of
>   [ bala
>   , bala
>   , bala ] -> bala bala bala
>   _ -> bala
>   ghc 6.10.4 would fail to compile, because of the wrong indent of
> line ", bala".

Yes. It must, because the `of' opens a new layout block, so a line indented to 
the same 
level as the opening square bracket starts a new definition and it tries to 
parse it as

case bala of
    { [ bala;
      , bala;
      , bala ] -> bala bala bala;
      _ -> bala;
    }

What about

case bala of
    [ bala, bala, bala ]
        -> bala bala bala
    _ -> bala

?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to