Closed AshleyYakeley closed 1 year ago
Currently we have to do this:
f: P *: Q; let p: P = f >- fn (p,_) => p; q: Q = f >- fn (_,q) => q; in expr;
It would be nice to be able to do something like:
let (p,q) = f; in expr;
The problem is that : in pattern-matching now has two different meanings. Consider
:
g = fn y => let x: T = y; in x;
Does g have type T -> T or D(T) -> T?
g
T -> T
D(T) -> T
If option 2, then :? is the obvious syntax.
:?
Done.
Currently we have to do this:
It would be nice to be able to do something like:
The problem is that
:
in pattern-matching now has two different meanings. ConsiderDoes
g
have typeT -> T
orD(T) -> T
?