Allow ViewPatterns in function definitions to refer to where-bound names
Motivation
You can't refer to where-bound variables in ViewPattern
s in the LHS of a function definition. It seems like it would be useful to be able to do so.
Example:
f (g -> x) = ...
where
g = ...
doesn't work, but
f = \(g -> x) -> ...
where
g = ...
does
I'm not sure if any issues arise from allowing this.
Proposal
It would be nice if the first example from above also worked.