[GHC] #8607: Invalid location reported for type constructors
GHC
ghc-devs at haskell.org
Fri Dec 13 15:52:24 UTC 2013
#8607: Invalid location reported for type constructors
-------------------------------------+------------------------------------
Reporter: edsko | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by edsko):
FYI, I sent the following email to SPJ, but he won't be back until next
year:
In the commit message you say "The only wrinkle is that, since we don't
have the original declaration, we don't have its `SrcSpan` to put in the
error message". But the function you are talking about is checkValidDecl,
right? And that takes a Located Name as argument -- would it be possible
to use the nameSrcSpan of the Name instead of the error message? I.e.,
have the def site of the Name be the entire declaration of the type, but
the location of the identifier itself still the actual location of the
identifier? Changing the `SrcSpan` associated with the identifier itself
is troublesome for IDEs that want to know information about identifiers at
particular locations.
I'm not 100% how to go about this though, because the parser obviously
generates a `RdrName`, not a Name, so we don't yet have the distinction
between the location of a name (Located Name) and its nameSrcSpan.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8607#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list