Conversation
|
This came up in slack just now. I mentioned that |
|
I see this All this are If you think it's worth adding tho what you think about the names? are this fine: |
|
Since we're implementing this as a straight coerce, we could drop the constraint entirely too? |
|
If we drop the constraint than it might be unsafe |
|
How would it be unsafe? |
src/Data/Newtype.purs
Outdated
There was a problem hiding this comment.
should we leave the map unwrap?
|
Yes, it actually seems to be safe even for contravention functions |
|
There is no telling what a parameter is used for in the general case. Many libraries use |
|
@eric-corumdigital there is |
|
Yes, it works fine for Functors, but |
But what exactly is a problem? Can you point out some concrete example where the problems of |
|
@safareli |
|
Now that we have safe coercions we could, in the spirit of #22, constrain This would make the |
|
#22 was merged, so this can move forward. |
|
Is this needed now that we have |
|
Those functions could benefit from the functional dependency brought by the Newtype constraint, I’d be inclined to revisit this after 0.14 though: perhaps bare coerce will be enough for most cases and perhaps we’ll discover more helpful combinators for the rest. |
|
I've addressed the merge conflict. Are we still interested in adding this? |
|
CI is now failing with: |
fixes #10