
#8607: Invalid location reported for type constructors ------------------------------------+------------------------------------- Reporter: edsko | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Given {{{ module Example where data T = MkT }}} The locations as reported in 7.4 and 7.7 are different: * In 7.4 the ADT is represented as a `TyData`, itself part of an `HsGroup`. The `TyData` contains a `Located Name`; the location of this name is reported correctly as 3:6. The `SrcSpan` associated with the `Name` itself (which represents the def site) is also reported as 3:6, which is dubious. * In 7.8 the ADT is represented as a `DataDecl` (part of ` TyClGroup` inside a `HsGroup`). As before, the `DataDecl`contains a `Located Name`; the location now however is 3:1-12, which doesn't make sense. The def site associated with the name itself is also 3:1-12, which ''does'' make sense. It seems that when the def site was fixed, it also changed the location of the identifier itself. These two are separate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8607 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler