
24 Jan
2024
24 Jan
'24
11:38 a.m.
On Wed, 24 Jan 2024 at 16:39, Simon Peyton Jones < simon.peytonjones@gmail.com> wrote:
Do newtypes make a difference? E.g let N x = e in ... where N is the data contructor of a newtype?
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. I suspect that there's a possible refinement where we say that a happy pattern is either: - A variable - Strict - A newtype constructor where the inner pattern is happy. (then if pat is an unhappy pattern, `let pat` must be unrestricted). 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.