Pattern synonyms and view pattern arguments
In my code, I had a few complicated patterns involving view patterns that depended on local arguments, i.e.
foo env (someView env -> Just x) = ...
I was hoping to be able to use PatternSynonyms to abstract and simplify this:
pattern Pat env x <- (someView env -> Just x)
foo env (Pat env x) = ...
but it says Not in scope: env
.
It would be nice if I could use pattern synonyms here as well.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.2 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |