DataCon do not have location info
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 <simonpj@microsoft.com>
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(-)