haskell / haskell/error-messages
A warning for the monomorphism restriction
- Dominant language
- No language data
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
I have previously opened #40 which considers the case where an error is caused by the monomorphism restriction, however I think that the monomorphism restriction can be unexpected even if it doesn't cause other issues (e.g. [in this stack overflow question](https://stackoverflow.com/q/71950215/15207568)). So perhaps it would be a good idea to add a warning for functions that are affected by the monomorphism restriction.
I guess the warning would be very similar to the defaulting warning, but only once per function and specifically mentioning the monomorphism restriction so that users can search for that keyword on the internet. Alternatively, the defaulting warning could be modified to mention the monomorphism restriction if that is the cause.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.