Make RegexFlags a newtype and add a Newtype instance#159
Make RegexFlags a newtype and add a Newtype instance#159thomashoneyman merged 1 commit intopurescript:masterfrom
RegexFlags a newtype and add a Newtype instance#159Conversation
|
Maybe should be listed under breaking changes? I don't know whether we count breaking FFI representation as a breaking change, as I'm pretty sure we encourage people to generally rely on a particularly representation for a type (unless it's known to be a newtype, ironically). |
As far as I know, we don't. And if they do, then they implicitly agreed to deal with such problems if/when they ever arise, right? |
|
How about adding a |
|
@MonoidMusician I'm fine with that, but does it bring any real benefits? |
|
Having a newtype instance does make some manipulations easier. But I'm asking for it mostly for consistency with the other newtypes in this library (e.g. |
7b97360 to
2e0a912
Compare
2e0a912 to
5e03c27
Compare
RegexFlags a newtypeRegexFlags a newtype and add a Newtype instance
Description of the change
Make
RegexFlagsanewtypeand add aNewtypeinstance for it. I just thought that since it's merely wrapping a record, making it anewtypesounds appropriate.I also refactored the
Eqinstance.Checklist: