title: Why is FunctionalDependency needed for defining MonadReader?
body: <p>I just managed to understand the definition of the class <code>MonadReader</code></p>
  
  <pre><code>class Monad m =&gt; MonadReader r m | m -&gt; r where
  ...
  </code></pre>
  
  <p>After reading the document of Functional Dependency in Haskell, now I can understand that <code>| m -&gt; r</code> specifies that type variable <code>r</code> is uniquely decided by <code>m</code>. I think this requirement is reasonable based on the few typical instances of MonadReader I have seen so far (e.g. <code>Reader</code>), but it seems to me that we can still define instances like <code>Reader</code> even without this functional dependency clause.</p>
  
  <p>My question is why we need functional dependency in the definition of MonadReader? Is this functionally necessary for defining MonadReader in a sense that MonadReader cannot be properly defined without it, or it is merely a restriction to limit the ways how MonadReader can be used so that the instances of MonadReader will all behave in a certain expected way?</p>