title: Overlapping instances in Haskell when I'd expect it not to overlap due to constraints
body: <p>Reading the book <code>Real world Haskell</code> geting below example of Overlapping instances  </p>
  
  <pre><code>instance (JSON a) =&gt; JSON [a] where
      toJValue = undefined
      fromJValue = undefined
  
  instance (JSON a) =&gt; JSON [(String, a)] where
      toJValue = undefined
      fromJValue = undefined
  
  ghci&gt; toJValue [("foo","bar")]
  
  &lt;interactive&gt;:1:0:
      Overlapping instances for JSON [([Char], [Char])]
        arising from a use of `toJValue' at &lt;interactive&gt;:1:0-23
  Matching instances:
    instance (JSON a) =&gt; JSON [a]
      -- Defined at BrokenClass.hs:(44,0)-(46,25)
    instance (JSON a) =&gt; JSON [(String, a)]
      -- Defined at BrokenClass.hs:(50,0)-(52,25)
     In the expression: toJValue [("foo", "bar")]
     In the definition of `it': it = toJValue [("foo", "bar")]
  </code></pre>
  
  <p>By my understanding this won't be a overlapping, as [a] shouldn't be a choice, since The restriction on JSON [a] was that 'a' must be an instance itself of JSON. There is no instance of JSON for (String, a).</p>