
16 Apr
2007
16 Apr
'07
7:04 a.m.
Twan van Laarhoven
The general form of a pattern binding is p match, where a match is the same structure as for function bindings above; in other words, a pattern binding is:
p | g1 = e1 | g2 = e2 ... | gm = em where { decls }
I did not even know these things existed, is there anyone who actually uses general pattern bindings?
It is worth mentioning that such pattern bindings are not only used at the top-level - they are also valid in local definitions, where the guards may involve variables bound at an outer scope. This makes them highly useful. Regards, Malcolm