|Version 1 (modified by simonmar@…, 8 years ago) (diff)|
Section 3.17.2, "Informal Semantics of Pattern Matching", is a bit vague on matching record patterns. For example, see this GHC bug report:
There are two possible ways forward:
- Clarify the description to ratify GHC's behaviour, i.e. record fields are matched in the order written in the datatype. Pros: this is easier to implement, Cons: it is not quite as intuitive for the programmer.
- Clarify the description to specify that fields are matched in the order written in the pattern.