Thanks to all for your replies!
I asked the question because I often make this kind of transformations
(please don't mind the non-sensical example):

test :: Bool -> IO ()
test foo = do
   bar <- case foo of
      True ->  return "Foo"
      False -> return "Bar"
   return ()

into

test :: Bool -> IO ()
test foo = do
   let bar = case foo of
        True ->  "Foo"
        False -> "Bar"
   return ()

And was wondering why can't I maintain the initial (and nicer) indentation.
But since let allows for several bindings, it make sense...

Best,
Corentin




On Thu, Oct 3, 2013 at 8:31 PM, Corentin Dupont
<corentin.dup...@gmail.com>wrote:

> test :: Bool -> IO ()
> test foo = do
>    let bar = case foo of
>        True ->  "Foo";
>        False -> "Bar"
>    return ()
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to