25 May
2016
25 May
'16
4:20 a.m.
No, because the pattern matching semantics are different. Matching on the constructor *must* force the contents to maintain type safety. It's really strict data with the newtype optimization, rather than a bona fide newtype. On Tue, May 24, 2016 at 4:18 PM, Ben Gamari <ben@well-typed.com> wrote:
David Feuer <david.feuer@gmail.com> writes:
Not really. It's really just the newtype optimization, although it's not a newtype.
Ahh, I see. Yes, you are right. I was being silly.
However, in this case wouldn't it make more sense to just call it a newtype?
Cheers,
- Ben