title: ghc-7.10: Non type-variable argument (Use FlexibleContexts to permit this)
body: <p>I was trying to use ghc-7.10 (RC 2) and got this message in a number of cases, e.g.,</p>
  
  <pre><code>src/Text/Regex/XMLSchema/Generic/RegexParser.hs:439:5:
      Non type-variable argument
        in the constraint: Text.Parsec.Prim.Stream s m Char
      (Use FlexibleContexts to permit this)
      When checking that ‘prop’ has the inferred type
        prop :: forall s u (m :: * -&gt; *) (t :: * -&gt; *).
                (Foldable t, Text.Parsec.Prim.Stream s m Char) =&gt;
                Char -&gt; t Char -&gt; Text.Parsec.Prim.ParsecT s u m [Char]
      In an equation for ‘isCategory'’:
          isCategory'
            = (foldr1 (&lt;|&gt;) . map (uncurry prop)
               $ [('L', "ultmo"), ('M', "nce"), ('N', "dlo"), ....])
              &lt;?&gt; "illegal Unicode character property"
            where
                prop c1 cs2
                  = do { _ &lt;- char c1;
                         .... }
  Failed to install hxt-regex-xmlschema-9.2.0
  </code></pre>
  
  <p>This must be something that is introduced by the new ghc, or the new base that comes with it, or the new parsec (3.1.8), since it worked before. </p>
  
  <p>source code snippet:</p>
  
  <pre><code>isCategory'     :: Parser String
  isCategory'
      = ( foldr1 (&lt;|&gt;) . map (uncurry prop) $
          [ ('L', "ultmo")
          , ('M', "nce")
          , ('N', "dlo")
          , ('P', "cdseifo")
          , ('Z', "slp")
          , ('S', "mcko")
          , ('C', "cfon")
          ]
        ) &lt;?&gt; "illegal Unicode character property"
      where
      prop c1 cs2
          = do
            _ &lt;- char c1
            s2 &lt;- option ""
                  ( do
                    c2 &lt;- satisfy (`elem` cs2)
                    return [c2] )
            return $ c1:s2
  </code></pre>
  
  <p>Note: I am not asking about this specific libray (hxt-*) since I observed this in other places also.</p>