| If you use Simon PJ's type signatures, you can't really disallow using | a key from one map with another map.
Yes, that's a good point. So there are really three issues: a) single-threaded-ness b) making sure you look up in the right map c) making sure the thing you find has the right type Even if you have typed keys, (Key a), then if you look them up in the wrong map, any guarantee that it maps to a value of type 'a' is out of the window. I can think of two solutions i) Guarantee that keys are unique across all maps, so that a key from one map is never in the domain of another. ii) Use the (ST s) and (STRef s) trick, to connect the key with the map. This seems cleaner, but demands more of the programmer. But my main point remains: that some form of typed finite map ought to exist that does no dynamic type checks, because none are necessary. This must be a terribly old problem; and unsafeCoerce seems like a rather brutal "solution". Simon _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell