title: How to subject the function argument to typeclass instantiation?
body: <p>Okay, I can do this:</p>
  
  <pre><code>class Fun fun where
      fm :: (b -&gt; b) -&gt; fun b -&gt; fun b
  
  instance Fun ((-&gt;) a) where
      fm g f = g . f
  </code></pre>
  
  <p>Can I also instantiate <code>Fun</code> with regard to the argument instead of the result?</p>
  
  <p>Something like this:</p>
  
  <pre><code>instance Fun (\x -&gt; (-&gt;) x a) where
      fm g f = f . g
  </code></pre>
  
  <p>That is just conceptual because I don't know how to write this correctly - but I hope the idea is made clear.</p>
  
  <p>I also tried this:</p>
  
  <pre><code>type F b a = (-&gt;) a b
  
  instance Fun (F b) where
      fm g f = f . g
  </code></pre>
  
  <p>But that seems to be fundamentally flawed.</p>
  
  <hr>
  
  <p>In other words: <code>(-&gt;) a b</code> is a <code>Fun</code>. Is <code>(&lt;-) a b</code> also a <code>Fun</code>?</p>