<div dir="ltr"><div><div><div>Imagine if bar was a toplevel function<br><br>bar = case foo of<br></div>True -&gt; &quot; Foo&quot;;<br></div>False -&gt; &quot;Bar&quot;;<br><br></div>Keep in mind that indentation level starts at the function name, not at the let keyword.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 3, 2013 at 2: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>