As-patterns for type signatures
The proposal: in any type signature, the presence of type variable
x@pat
matches the type specified by pat, and replaces any occurrences of the type variable x with pat. In particular, this might be comparable to defining
type x (free variables in pat) = pat
with scope solely to the right of the as-pattern. Alternately, it might be compared to an equality constraint (x ~ pat).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.11 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |