DataCon do not have location info
|Reported by:||JeanPhilippeMoresmau||Owned by:|
|Type of failure:||Incorrect result at runtime||Test Case:||ghc-api/T6145|
|Related Tickets:||Differential Revisions:|
Description (last modified by simonpj)
A data constructor does not have a valid source location associated with it in the API.
The sample code attached will print True in 7.0.4 and False in 7.4.1, because no valid srcspan is attached to the DataCon.
This is a problem for several EclipseFP/BuildWrapper operations that rely on srcspan being right...
I've notified the mailing list of the issue, and Simon Peyton Jones was kind enough to fix it without an issue, but I wanted to create it, hopefully I'll try the next nightly release:
commit cb705a38d677e2ab4cad37447c8180bd397d5576 Author: Simon Peyton Jones <[email protected]> Date: Tue Jun 5 13:35:07 2012 +0100 Add sensible locations to record-selector bindings compiler/typecheck/TcTyClsDecls.lhs | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)