title: Haskell RankNTypes - restriction of function domain
body: <p>I don't understand why it is so, referring to : <a href="https://stackoverflow.com/questions/12031878/what-is-the-purpose-of-rank2types/24717685?noredirect=1#comment121399355_24717685">What is the purpose of Rank2Types?</a> -&gt; @dfeuer explanation:</p>
  <blockquote>
  <p>... Requiring an argument to be polymorphic doesn't just allow it to be used with multiple types; it also restricts what that function can do with its argument(s) and how it can produce its result
  ...</p>
  <pre><code>f :: (forall a . [a] -&gt; a) -&gt; IO ()
  </code></pre>
  <p>... In fact, no function returning an <strong>element not in the list</strong> it is given will typecheck</p>
  </blockquote>
  <p>In any explanation of rank-N types I haven't see this effect (or benefit) described, much of the time it was the story about letting the callee choose the type etc... that is clear for me and easy to grasp but I don't see by which virtue (only of extending the rank) we can control/restrict the function domain (and co-domain)...</p>
  <p>if somebody could give a deeper insigth of the rankN mechanism involved here. thx</p>