[Haskell-cafe] Where is SNMap for stable names?

Sean Leather leather at cs.uu.nl
Sat Sep 24 12:44:47 CEST 2011


On Sat, Sep 24, 2011 at 01:41, Edward Kmett wrote:

> 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
>
> On Sep 23, 2011, at 5:33 AM, Sean Leather <leather at cs.uu.nl> wrote:
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110924/c74d2922/attachment.htm>


More information about the Haskell-Cafe mailing list