
1 Feb
2011
1 Feb
'11
7:23 a.m.
On Tue, Feb 1, 2011 at 9:52 AM, Max Bolingbroke
Local declarations at module scope can be emulated using pattern bindings:
""" (foo, bar) = (foo, bar) where foo = .. bar = .. private = ... """
If instance declarations supported pattern bindings you could get the same effect for your instances too. This would be a minimal change that avoided introducing any extra syntax.
This is kind of ugly, I think, and there are proposals to make pattern bindings monomorphic which would make this sort of thing no longer possible in general. I think I would be in favour of a declaration analogue to let.