
17 Nov
2015
17 Nov
'15
11:40 a.m.
Simon Peyton Jones
| I don't think this would work in the case where there are no fields | initialised?
Oh yes, silly me. I was thinking that then we wouldn’t need to look at 'labels' at all, but that's not true.
Well, at least then I'd replace [PostTc id [FieldLabel] with (PostTc ConLike). This makes it like ConPatOut in HsPat. Then the (Located id) field is redundant (we can get it from the ConLike), but that’s only true after typechecking, so maybe simpler to keep both.
It amounts to moving the call to conLikeFieldLabels from tcExpr (RecordCon ...) to dsExpr (RecordCon ...). A small thing but I think it'd be better.
Mathew, did you ever get to this? Cheers, - Ben