Explicit Specificity in Type Variable Binders
Implementation for Ticket #16393 (closed). As this is my first time working on GHC, feedback is very much appreciated
The main results:
- Additional syntax is supported in the parser, allowing users to write { } brackets in type variable binders (in type signatures, data constructor declarations etc.), denoting them as inferred.
- The AST for type variables binders (HsTyVarBndr) has been updated to include a specificity flag on each user-written variable.
- Similarly, the AST for data constructors (both Haskell98-syntax and GADT-syntax), pattern synonyms and partial signatures have been updated to annotate variables with their specificity.
- The feature has been added to Template Haskell as well, requiring only a small change to the AST.
- The Haddock code has been updated to reflect these changes.
- This information is passed along through the renamer, and verified in the type checker.