Make forall a keyword
At the moment, forall
is a keyword at the type level but an identifier at the term level:
forall = undefined -- accepted by GHC today
GHC Proposal #281 makes forall
a keyword at both levels.
Since this is a breaking change, the first step was to add a warning (see #20609 (closed)). This was done in dfc4093c.
Main.hs:5:1: warning: [-Wforall-identifier]
The use of ‘forall’ as an identifier
will become an error in a future GHC release.
Suggested fix:
Consider using another name, such as
‘forAll’, ‘for_all’, or ‘forall_’.
The warning -Wforall-identifier
has been available for three releases (GHC 9.4, 9.6, and the soon-to-be-released 9.8), meaning we can complete the transition in GHC 9.10.
Now forall
can become a proper keyword and the warning should become a deprecated no-op.