Invalid location reported for type constructors
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 anHsGroup. TheTyDatacontains aLocated Name; the location of this name is reported correctly as 3:6. TheSrcSpanassociated with theNameitself (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 ofTyClGroupinside aHsGroup). As before, theDataDeclcontains aLocated 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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |