title: How many dictionaries/parameters for method overloadings?
body: <p>I can put constraints superclass; I can put constraints on particular methods in the class; I can put extra constraints on instances for the class. Constraints are implemented as dictionary-passing. Does that mean different overloadings for a method get different numbers of dictionary arguments? Consider:</p>
  <pre><code>class Bar1 a                    -- just some classes
  class Bar2 a
  class Bar3 a
  class Bar4 a
  class Bar5 a
  
  class (Bar1 a, Bar2 a) =&gt; Foo a  where
    foo :: Bar3 b =&gt; a -&gt; b -&gt; Bool             -- `b` is not in class head
  
  instance (Bar1 (Maybe a), Bar2 (Maybe a),     -- needed from superclass
                                                -- ?but (Bar3 b) not needed (nor could it be expressed)
            Bar4 (Maybe a), Bar5 a)             -- additional instance-specific, Bar5 is for part of instance head
           =&gt; Foo (Maybe a)  where
    foo x y = True
  </code></pre>
  <p>As I understand from <a href="https://stackoverflow.com/questions/55358056/typeclasses-without-methods-used-as-constraints-do-they-get-dictionaries">this q</a>, the <code>Bar</code>s not having methods doesn't matter.</p>
  <p>So different instances of <code>Foo</code> might have different instance-specific constraints, some maybe for the whole instance head, some for only part -- like <code>Bar5 a</code> within the <code>Maybe a</code>. Does that mean that function <code>foo</code> specialised for <code>(Maybe a)</code> needs a different number of dictionaries passed, vs say for <code>Int</code>? How is that organised?</p>
  <p>Reason for asking is <a href="https://mail.haskell.org/pipermail/haskell-cafe/2004-March/005995.html" rel="nofollow noreferrer">this thread</a>, where SPJ talks about &quot;<code>bindSet</code> takes two <code>Ord</code> parameters at
  run-time, whereas ordinary <code>bind</code> does not&quot;. (Yes quite true, but <code>bindSet</code> is not a method of a class.) I'm wondering if there's already a mechanism for a method's instances taking different numbers of dictionary parameters?</p>