<div dir="ltr"><div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":20l" class="a3s" style="overflow:hidden">My guess is that you are running it in GHCi, which means that<br>
it gets coerced to the IO monad. </div></blockquote></div><br></div><div class="gmail_extra">"Coercion" doesn't quite capture it. Also it happens that the haskell research literature uses it in a technically specific context that doesn't apply here.<br><br></div>What's going on in<br><br></div>return (Just 3)<br><div><br></div><div>being _executed_ in ghci to produce<br><br></div><div>Just 3<br></div><div><br>is the REPL's defaulting to IO kicking in.<br><div><div><div><div><div><br></div><div>p.s. In the above, I've made distinct execution from evaluation. This helps folks navigate the beginner-hazardous terrain of overloaded English.<br></div><div><br><div class="gmail_signature">-- Kim-Ee</div><div class="gmail_extra"><div></div>
</div></div></div></div></div></div></div></div>