[Haskell-cafe] What is an "expected type" ...
Martijn van Steenbergen
martijn at van.steenbergen.nl
Sun Jun 28 11:24:07 EDT 2009
michael rice wrote:
> as opposed to an "inferred type"?
Can you deduce from the following example?
> Prelude> let foo = () :: Int
> Couldn't match expected type `Int' against inferred type `()'
> In the expression: () :: Int
> In the definition of `foo': foo = () :: Int
Hope this helps!
More information about the Haskell-Cafe