haskell/error-messages: Chain of recommending Language Extensions
Motivation
The error message to enable FunctionalDependencies
is not given until MultiParamTypeClasses
is enabled. This is less ergonomic, than recommending directly FunctionalDependencies
, in cases where it should be obvious for the compiler.MultiParamTypeClasses
See these:
- https://youtu.be/Qy_yxVkO8no?t=520
- https://github.com/haskell/error-messages/issues/9#issuecomment-888291276
Proposal
When GHC recommends any language extension, test if there would be follow-up extensions needed to resolve the same error.
Optional
One of:
- Deduplicate the list when there are implied Extensions in the list of recommendations
- Add all extensions explicitly, even if they are implied by another one.