<div dir="ltr">On Tue, Jul 3, 2012 at 5:02 PM, Robert Heumüller <span dir="ltr">&lt;<a href="mailto:mailing@heum.de" target="_blank">mailing@heum.de</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Whenever monads apper things seem to get tricky - sadly there won&#39;t be<br>
a lecture on functional programming in the next semester at the<br>
university I study at :(<br></blockquote><div><br></div><div>The only trick here is that the text wants to introduce you to monads by doing something that won&#39;t work in a normal Haskell; you need to put the compiler in a mode which allows you to in effect rebuild them from scratch.  (You can&#39;t simply provide your own definitions because &quot;do&quot; notation is hardwired to use the standard ones anyway, unless you use the RebindableSyntax extension to tell it to use yours.  You&#39;d also have to make sure you don&#39;t get the standard definitions, which means NoImplicitPrelude and manually importing Prelude minus the standard machinery.  I don&#39;t think RebindableSyntax let you rebind &quot;do&quot; notation properly when that textbook was written, btw, so when it was written *no* Haskell compiler supported the direct use of its examples.)  This was a rather unfortunate choice on Hutton&#39;s part, as it means his examples *only* work on paper.</div>
<div><br></div></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br>
<br>
</div>