Closed requested to merge wip/adinapoli-issue-20102 into master
This commit refactors the
SuggestExtension type constructor of the
GhcHint to be more powerful and flexible. In particular, we can now embed extra user information (essentially "sugar") to help clarifying the suggestion. This makes the following possible:
Suggested fix: Perhaps you intended to use GADTs or a similar language extension to enable syntax: data T where
We can still give to IDEs and tools a
LangExt.Extension they can use, but in the pretty-printed message we can tell the user a bit more on why such extension is needed.
On top of that, we now have the ability to express conjunctions and disjunctions, for those cases where GHC suggests to enable "X or Y" and for the cases where we need "X and Y".