Typesafe MRef with a regular monad

Keith Wansbrough Keith.Wansbrough@cl.cam.ac.uk
Fri, 13 Jun 2003 10:10:14 +0100


> In article <v4j7k7qsp5c.fsf@newtonlabs.com>,
>  cwitty@newtonlabs.com (Carl R. Witty) wrote:
> 
> > Here's a hand-waving argument that you need either Typeable (or
> > something else that has a run-time concrete representation of types)
> > or ST/STRef (or something else, probably monadic, that can track
> > unique objects) to do this.
> 
> George Russell already showed this, didn't he? You can implement 
> Typeable given type-safe MRefs, and you can implement type-safe MRefs 
> given Typeable.

But George Russell's implementation relied on looking up something in
one map with a key obtained from another map.  I thought type-safe
MRefs should disallow this.

--KW 8-)