type mismatch error message with operator sections counts the arguments incorrectly
It seems that when an operator section gets a Couldn't match... error, then the message regards the argument given as the second, even where it appears before the operator. A quick test case is:
ghci> ('c' >>=)
<interactive>:1:1:
Couldn't match expected type `m a' against inferred type `Char'
In the second argument of `(>>=)', namely 'c'
In the expression: ('c' >>=)
In the definition of `it': it = ('c' >>=)
It seems to say "second argument" regardless of whether the argument appears before or after the operator.
This happens on 6.10.4 and 6.11.20090911, but it doesn't seem to happen with 6.8.2
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |