As discussed on slack, the wording of orphan instance errors reads like a suggestion rather than a requirement. I'm opening this issue to discuss if we want to improve it, and how we can do that.
This is the line in question:
|
, line "Consider moving the instance, if possible, or using a newtype wrapper." |
What if we said something like:
There are two ways to fix this error
1. Move the instance to the same module the class is defined in.
2. Move the instance to the same module the data type is defined in.
Maybe we could make it even easier and mention which module the class and data type are defined in? Do we have that information in the error?
As discussed on slack, the wording of orphan instance errors reads like a suggestion rather than a requirement. I'm opening this issue to discuss if we want to improve it, and how we can do that.
This is the line in question:
purescript/src/Language/PureScript/Errors.hs
Line 776 in ad0c7c0
What if we said something like:
Maybe we could make it even easier and mention which module the class and data type are defined in? Do we have that information in the error?