<div dir="ltr"><div dir="ltr">On Wed, 24 Jan 2024 at 16:39, Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com" target="_blank">simon.peytonjones@gmail.com</a>> wrote:</div><div class="gmail_quote"><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 style="font-family:tahoma,sans-serif"><div>Do newtypes make a difference?  E.g      let N x = e in ...</div><div>where N is the data contructor of a newtype?</div></div></div></blockquote><div><br></div>I don't think it has too. So for the moment, I vote to stick to the current proposal and consider this like all lazy non-variable patterns: must be unrestricted.</div><div class="gmail_quote"><br></div><div class="gmail_quote">I suspect that there's a possible refinement where we say that a happy pattern is either:</div><div class="gmail_quote">- A variable</div><div class="gmail_quote">- Strict</div><div class="gmail_quote">- A newtype constructor where the inner pattern is happy.</div><div class="gmail_quote"><br></div><div class="gmail_quote">(then if pat is an unhappy pattern, `let pat` must be unrestricted).</div><div class="gmail_quote"><br></div><div class="gmail_quote">But I don't think I'm quite ready to go there for the time being, and that'll be a backward compatible change if we change our mind.<br></div></div>