[Haskell-cafe] GHC, names of inferred type variables

Albert Y. C. Lai trebla at vex.net
Tue Sep 30 13:05:57 EDT 2008


Shiqi Cao wrote:
> Error messages from GHC contain inferred type variables, is there
> anyway to find out which term an inferred type variable is for(if the
> term exists)?

Example:

f :: a -> a
f xs = map not xs

This causes:

     Couldn't match expected type `[Bool]' against inferred type `a'
       `a' is a rigid type variable bound by
           the type signature for `f' at F.hs:3:5
     In the second argument of `map', namely `xs'

It says `a' is for `xs'.


More information about the Haskell-Cafe mailing list