title: Type quantifiers in Haskell functions
body: <p>Suppose I have two Haskell functions of the following types, with ExplicitForAll activated,</p>
  
  <pre><code>f :: forall a. (a -&gt; Int)
  g :: forall a. (Int -&gt; a)
  </code></pre>
  
  <p>It seems to me that the type of <code>g</code> is isomorphic to <code>Int -&gt; (forall a. a)</code>, because for example the type of <code>g(2)</code> is <code>forall a. a</code>.</p>
  
  <p>However, the type of <code>f</code> doesn't look isomorphic to <code>(forall a. a) -&gt; Int</code>. <code>f</code> is a polymorphic function, it knows what to compute on each input type <code>a</code>, in mathematics I guess it would rather be a family of functions ; but I don't think it can handle a single argument that has all types.</p>
  
  <p>Is it a rule of typed lambda calculus that type quantifiers distribute on functions target types, but not on functions source types ?</p>
  
  <p>Does the type <code>(forall a. a) -&gt; Int</code> exist in Haskell, possibly restrained to a type class <code>(forall a. SomeClass a =&gt; a) -&gt; Int</code> ? Is it useful ?</p>