Proposal: Value strict versions of containers

Sebastian Fischer fischer at
Mon May 23 16:18:47 CEST 2011

On Mon, May 23, 2011 at 2:14 PM, Johan Tibell <johan.tibell at>wrote:

> On Mon, May 23, 2011 at 1:31 PM, Sebastian Fischer <fischer at>
> wrote:
> > Would it be efficient to define a
> > type Data.IntMap.Strict.IntMap with strict fields (also for values) and
> then
> > define Data.IntMap.Lazy in terms of this implementation and a wrapper
> type?
> Not really, it adds two words worth of overhead and one extra indirection.

Because unboxing can not be used for the polymorphic value component in the
strict structure and there is no way to tell GHC to unbox the specific
instantiation `IntMap (Lazy a)`?

I thought GHC would eliminate the indirection and extra words with

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list