Namrata asks... | So, when x1' + x2' is evaluated, | Is (1,2) pattern matched against (a,b) twice -- once for x1' and once | for x2' ?? The translation you give (correctly I think) expresses the required *semantics*. But the translation is not the required *implementation*. A compiler can do anything to improve runtime, provided it maintains the defined semantics. In particular, a good compiler will spot the optimsation you indicate, and match only once. Simon
- Semantics of Irrefutable Pattern Matching Shah Namrata Abhaykumar
- Semantics of Irrefutable Pattern Matching Simon L Peyton Jones
- Semantics of Irrefutable Pattern Matching smk
