<div dir="ltr"><div>The first version has bar True and False all at the same indentation level. As such they are seen as standalone expressions, rather than being nested under the one introduced by bar.<br><br></div>See <a href="http://en.wikibooks.org/wiki/Haskell/Indentation">http://en.wikibooks.org/wiki/Haskell/Indentation</a><br>

<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 3, 2013 at 8:31 PM, Corentin Dupont <span dir="ltr">&lt;<a href="mailto:corentin.dupont@gmail.com" target="_blank">corentin.dupont@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi the list,<br><div>why do this function doesn&#39;t compile (parse error):<br><br><span style="font-family:courier new,monospace">test :: Bool -&gt; IO ()<br>

test foo = do<br>   let bar = case foo of <br>       True -&gt;  &quot;Foo&quot;; <br>
       False -&gt; &quot;Bar&quot;<br>   return ()</span><br><br></div><div>while this one does (just adding one space in front of True and False):<br><br><span style="font-family:courier new,monospace">test :: Bool -&gt; IO ()<br>


test foo = do<br>   let bar = case foo of <br>        True -&gt;  &quot;Foo&quot;; <br>        False -&gt; &quot;Bar&quot;<br>   return ()</span><br><br><br></div><div>Thanks!!<span class="HOEnZb"><font color="#888888"><br>

</font></span></div><span class="HOEnZb"><font color="#888888"><div>Corentin<br></div></font></span></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>