wren ng thornton wrote:
(Though it doesn't necessarily generalize to cover similar messages like:
Prelude> :t (\x -> x) :: a -> b
<interactive>:1:7:
Couldn't match expected type `b' against inferred type `a'
`b' is a rigid type variable bound by
the polymorphic type `forall a b. a -> b' at <interactive>:1:0
`a' is a rigid type variable bound by
the polymorphic type `forall a b. a -> b' at <interactive>:1:0
In the expression: x
)
I find this slightly more complicated case quite confusing with the
current wording:
Prelude> :t (\x -> x) :: (a -> b) -> (a -> a)
<interactive>:1:7:
Couldn't match expected type `a' against inferred type `b'
`a' is a rigid type variable bound by
an expression type signature at <interactive>:1:14
`b' is a rigid type variable bound by
an expression type signature at <interactive>:1:19
In the expression: x
In the expression: (\ x -> x) :: (a -> b) -> (a -> a)
This message suggests that ghc has inferred type b for x.
Tillmann
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe