#2993: Precedence errors are reported for undefined operators
-----------------------------+----------------------------------------------
Reporter: Olathe | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 6.10.1 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
I found a misleading error message.
If I add the import for (<$>), but I forget to save the file
{{{
-- other imports
-- import Control.Applicative ((<$>))
main = print $ (+1).(+2) <$> Just 5
}}}
I get the error
{{{
precedence parsing error
cannot mix `(.)' [infixr 9] and `(<$>)' [infixl 9] in the same
infix expression
}}}
which is rather hard to debug, since it makes it seem that the problem is
either with Control.Applicative's precedence definitions or that I've
somehow imported (<$>) with a different precedence from somewhere else.
It would be nice if it would report instead that (<$>) wasn't defined yet.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2993>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs