[GHC] #8607: Invalid location reported for type constructors

GHC ghc-devs at haskell.org
Fri Dec 27 14:25:02 UTC 2013


#8607: Invalid location reported for type constructors
-------------------------------------+------------------------------------
        Reporter:  edsko             |            Owner:
            Type:  bug               |           Status:  closed
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.7
      Resolution:  fixed             |         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):

 Replying to [comment:14 Richard Eisenberg <eir@…>]:
 > The solution (after many false starts) is to change the behavior of
 > hsLTyClDeclBinders. The idea is that the locations of the names that
 > the parser generates should really be the names' locations, unlike
 > what was done in 1745779... But, when the renamer is creating Names
 > from the RdrNames, the locations stored in the Names should be the
 > declarations' locations. This is now achieved in hsLTyClDeclBinders,
 > which returns [Located name], but the location is that of the
 > *declaration*, not the name itself.

 Yes, this sounds like the Right Thing To Do. I have tested our code with
 this patch applied and it seems to work perfectly. Thank you very much!

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8607#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list