<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This thread is suggesting to add a special case -- one that seems to match intuition, but it's still a special case. And my question is: should the special case be for unboxed tuples? or should the special case be for any pattern whose overall type is unlifted?</div></div></blockquote><div><br></div><div>My intuition would be: for all unlifted types. I'd submit that the distinction between lazy and strict pattern-matching doesn't really make a ton of sense for unlifted types. To implement lazy pattern-matching on an unlifted type, one has to actually indirect through another type, which I find deeply suspicious.</div><div><br></div><div>That being said</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Right now, there is one rule: if the type of any variable bound in the pattern is unlifted, then the pattern is an unlifter-var pattern and is strict. The pattern must be banged, unless the bound variable is not nested. This rule is consistent across all features.</div></blockquote><div><br></div><div> I realise that there are a lot of subtil details to get right to specify pattern-matching. Or at the very least, that it's difficult to come up with a straightforward specification which is as clear as the one above.</div><div><br></div><div>I'm wondering though: have there been discussions which led to the above rule, or did it just come to be, mostly informally? (and if there have been explicit discussions, are they recorded somewhere?)<br></div></div>