[GHC] #13917: The line on which to locate the error indication is bad.
GHC
ghc-devs at haskell.org
Fri Jul 7 14:55:18 UTC 2017
#13917: The line on which to locate the error indication is bad.
-------------------------------------+-------------------------------------
Reporter: vanto | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
The correction to the code is irrelevant for parsing errors: GHC just
reports where it first encounters a parsing error. There is no promise
that a fix is available on that line -- indeed, in this case it's just a
stroke of luck that there is.
While it's conceivable to imagine some program analysis tool that uses
heuristics to do what you want -- make the suggestion an expert Haskeller
would make -- that is well beyond the scope of what GHC does. The amount
of engineering would be huge. Perhaps this kind of tool would pay off in
the long run (imagine always having an "expert Haskeller" at your side
while programming!), it doesn't seem necessary to tie such a tool into
GHC.
So, my recommendation is to treat the current behavior as correct and move
onto other problems.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13917#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list