title: MultiParamTypeClasses - Why is this type variable ambiguous?
body: <p>Suppose I define a <a href="https://wiki.haskell.org/Multi-parameter_type_class" rel="nofollow noreferrer">multi-parameter type class</a>:</p>
  
  <pre><code>{-# LANGUAGE MultiParamTypeClasses, AllowAmbiguousTypes, FlexibleContexts, FlexibleInstances #-}
  
  class Table a b c where
    decrement :: a -&gt; a
    evalutate :: a -&gt; b -&gt; c
  </code></pre>
  
  <p>Then I define a function that uses <code>decrement</code>, for simplicity:</p>
  
  <pre><code>d = decrement
  </code></pre>
  
  <p>When I try to load this in <code>ghci</code> (version 8.6.3):</p>
  
  <pre><code>• Could not deduce (Table a b0 c0)
      arising from a use of ‘decrement’
    from the context: Table a b c
      bound by the type signature for:
                 d :: forall a b c. Table a b c =&gt; a -&gt; a
      at Thing.hs:13:1-28
    The type variables ‘b0’, ‘c0’ are ambiguous
    Relevant bindings include d :: a -&gt; a (bound at Thing.hs:14:1)
    These potential instance exist:
      instance Table (DummyTable a b) a b
  </code></pre>
  
  <p>This is confusing to me because the type of <code>d</code> is exactly the type of <code>decrement</code>, which is denoted in the class declaration.</p>
  
  <p>I thought of the following workaround:</p>
  
  <pre><code>data Table a b = Table (a -&gt; b) ((Table a b) -&gt; (Table a b))
  </code></pre>
  
  <p>But this seems notationally inconvenient, and I also just wanted to know why I was getting this error message in the first place.</p>