Closed treeowl closed 4 years ago
I realized I can loosen some of the Newtype
constraints to Coercible
ones without losing the inference that is this module's raison d'être.
By the way: the module name is totally up for grabs.
Once #13 is merged, I can replace the implementations in this module with calls to the more-polymorphic versions.
How about we actually replace the existing combinators in CoercibleUtils
with these?
I'm mostly concerned about offering two very similar APIs in the same package – I think that would be confusing.
Thoughts @chessai?
The competing APIs thing seems like it might be a problem to me. The new API requires a generic instance, which I'm not sure is that much of a problem. It also doesn't work with UnliftedNewtypes.
I'm tempted to say keep both for now. But I'm not sure yet.
@sjakobi and @chessai, I think this is ready to go wherever you want it to go and with whatever name you wish to give it. Can we get it done? Creating yet another package with such similar functionality seems a bit silly to me, but I guess I can do that if necessary....
As I'm not aware of any actual users of the combinators in CoercibleUtils
, I don't see the point of keeping them around if we now have better versions of them. UnliftedNewtypes
hasn't even been released yet.
If anyone wants to get the old ones back, I'm sure we can figure something out.
Unless you protest @chessai, I'd merge this as-is and move things into CoercibleUtils
.
Ok. Agreed. My unlifted newtypes criticism wasnt very sensical.
Thanks!
@chessai You seemed interested in this too.