<br><br><div class="gmail_quote">On Fri, Nov 6, 2009 at 10:19 AM, Neil Brown <span dir="ltr">&lt;<a href="mailto:nccb2@kent.ac.uk">nccb2@kent.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



  

<div bgcolor="#ffffff" text="#000000"><div class="im">
Petr Pudlak wrote:
<blockquote type="cite">
  <pre>The problem is the (Ord b) condition, which is required for the Map
functions.  When I try to define the monad instance as</pre>
  <blockquote type="cite">
    <pre>instance Monad Distrib where
    return = dreturn
    (&gt;&gt;=)  = dcompose
    </pre>
  </blockquote>
  <pre>obviously, I get an error at (&gt;&gt;=):
    Could not deduce (Ord b) from the context.

Is there some way around? Either to somehow define the monad, or to
achieve the same functionality without using Map, which requires Ord
instances?
  </pre>
</blockquote></div>
Not being allowed constraints on the variables for class methods is
probably the problem I have most frequently run into recently in
Haskell (is there any way to fix this, or does it open up a whole can
of worms?).<br></div></blockquote><div><br></div><div></div></div><br><div>I believe this paper is intended to propose a solution:</div><div><a href="http://tomschrijvers.blogspot.com/2009/11/haskell-type-constraints-unleashed.html">http://tomschrijvers.blogspot.com/2009/11/haskell-type-constraints-unleashed.html</a></div>
<div><br></div><div>Jason</div>