Skip to content

Modern scoped type variables: type arguments in constructor patterns

The accepted GHC Proposal #448 "Modern scoped type variables" contains a section on "Type arguments in constructor patterns" that defines a few amendments to the feature, in particular:

  1. Use a new language extension flag TypeAbstractions (!9666 (closed))
  2. Any type variables mentioned in a type application are considered binding sites, shadowing any in-scope type variables.
  3. It is an error to bring the same type variable into scope in two (or more) places within the same pattern.

This ticket is to track the implementation of that part of the proposal.

Edited by Vladislav Zavialov
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information