You still need IO to get the stable name out to use. :)
I don't understand this statement. Consider the lookup operation in the paper and in your System.Mem.StableName.Map:
> lookupSNMap :: SNMap k v -> StableName k -> IO (Maybe v)
> lookup :: StableName a -> Map f -> Maybe (f a)
Unless you are intending f to be instantiated to IO -- which is not how I read it -- then, lookupSNMap is requiring some aspect of IO, probably mutability, and lookup is not.
I am wondering if there is some fundamental difference between the two. Is the paper using immutability only for performance reasons? In that case, it's not a fundamental difference.
Regards,
Sean
Sent from my iPad
Hi Edward,
On Thu, Sep 22, 2011 at 16:50, Edward Kmett wrote:
I have a "stable-maps" package that provides lookup and inserting into a map via stable names.
The paper mentions the need for a mutable finite map, and all the operations are IO. Do you know why this is and what's different with your pure implementation?
Regards,
Sean