[GHC] #8607: Invalid location reported for type constructors
GHC
ghc-devs at haskell.org
Fri Dec 13 16:25:27 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 goldfire):
I'm not sure what chunk of code you're talking about. While I agree that a
`Located Name` is redundant, I don't see how that helps us here. It seems
to me that the function of interest is `checkValidTyCl`, which just takes
a `TyThing`, devoid of any location information other than what is stored
in the `n_loc` field of `Name`s. By passing in an extra location (by using
`Located TyThing`), we can get good error messages and proper spans on
identifiers.
I do feel a little dirty decorating the Core-ish `TyThing` with the
Haskell-ish `Located`, but I think this is a reasonable place to do so.
Other suggestions are welcome.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8607#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list