Introduce the TypeAbstractions language flag
GHC Proposals #448 "Modern scoped type variables" and #425 "Invisible binders in type declarations" introduce a new language extension flag: TypeAbstractions
.
Part of the functionality guarded by this flag has already been implemented, namely type abstractions in constructor patterns, but it was guarded by a combination of TypeApplications
and ScopedTypeVariables
instead of a dedicated language extension flag.
This patch does the following:
- introduces a new language extension flag
TypeAbstractions
- requires
TypeAbstractions
for@a
-syntax in constructor patterns instead ofTypeApplications
andScopedTypeVariables
- creates a User's Guide page for
TypeAbstractions
and moves the "Type Applications in Patterns" section there
To avoid a breaking change, the new flag is implied by
ScopedTypeVariables
and is retroactively added to GHC2021
.