Implement modifiers syntax #22624
This MR implements modifiers syntax: GHC proposal 370. The tracking issue is #22624. One-sentence summary: the %m syntax of linear types is now accepted in more places, to allow use by future extensions, though so far linear types is still the only consumer.
This may break existing code where it
- Uses
-XLinearTypes. - Has code of the form
a %m -> b, wheremcan't be inferred to be kindMultiplicity.
The code can be fixed either by adding a kind annotation, or by setting -XLinearTypes -XNoModifiers.
I haven't yet added release notes, and there are a handful of places where I have the string MODS_TODO instead of a version number. The reason is just that I'm not sure how long it's likely to take to merge, or how soon it would need to get in to make the next release. I currently guess it'll be in 9.16.1, but it seemed simpler to wait to fill those in until I have a better idea.
There's probably no one single best place to start reviewing. The syntax is implemented in a lot of places, and a lot of those changes are pretty independent. For any specific place it's implemented, the way to start might be the relevant type definition.