Is injectReflexive dodgy?
Opened this issue · 2 comments
It seems like injectReflexive is going to give us undecidable instance headaches one day...
Hah, I wondered the same exact thing when I saw it. I don't know, but it seems likely.
This relates to purescript/purescript-free#42, but I thought it might be applicable here.
As another possibility for avoiding overlapping instances, can we just remove the instances defined in the Inject module? So this module would only define the Inject type class with no instances. Then it is on the user to define their own specific instances.
I think the Inject type class is useful to have. And writing your own instances isn't too bad. I just added some prisms for Coproduct, which seems to help:
https://github.com/ethul/purescript-refractor-coproduct
Just a thought!