
16 Mar
2011
16 Mar
'11
10:06 a.m.
On Wed, Mar 16, 2011 at 12:05:56PM +0000, Andrew Coppin wrote:
withContainer ∷ (∀ s. Container s → α) → α
Hmm, yes. That will work, but I wonder if there's some way of doing this that doesn't limit the scope of the container to one single span of code...
You can just pack the container into an existential and pass that around freely. Only the use of cursors is limited into a scope where the owning container's type variable is visible (which you get by unpacking the existential). Lauri