[Haskell-cafe] What is an "expected type" ...
a.biurvOir4 at asuhan.com
Sun Jun 28 15:52:57 EDT 2009
Could you suggest a better word pair to describe the dichotomy then?
How about 'calculated' vs 'user-imposed' (or even, 'explicitly-
Dan Piponi-2 wrote:
> I really dislike this error message, and I think the terms are
> ambiguous. I think the words 'expected' and 'inferred' apply equally
> well to the term, and the context in which it has been found. Both of
> the incompatible types were 'inferred', and 'unexpected' is a property
> of the combination, not a property of one or the other.
> On Sun, Jun 28, 2009 at 8:24 AM, Martijn van
> Steenbergen<martijn at van.steenbergen.nl> wrote:
>> Hi Michael,
>> 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!
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
View this message in context: http://www.nabble.com/What-is-an-%22expected-type%22-...-tp24242359p24244820.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe