#3401: unintuitive error message about unbalanced parentheses
----------------------+-----------------------------------------------------
Reporter: tinlyx | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.3
Severity: normal | Resolution:
Keywords: | Testcase:
Os: Windows | Architecture: Unknown/Multiple
----------------------+-----------------------------------------------------
Comment (by isaacdupree):
I'm not such a GHC author, but it's because the closing-parenthesis
terminates the "do" layout (which is a non-error in some cases if there
had been an open-parenthesis before the "do" for example). I guess it
reports the error in "do"-syntax before getting to the mismatched
parenthesis error.
That said, I'd think that GHC ought to be able to look ahead more. Also
for the "mismatched parentheses (maybe incorrect indentation?)" error. If
parentheses, *regardless* of layout, are still mismatched, then that's
definitely an error that could be reported as such :-)
(implementing that might be more adifficult though.)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3401#comment:1>
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