On Mon, May 23, 2011 at 2:14 PM, Johan Tibell <johan.tibell@gmail.com> wrote:
On Mon, May 23, 2011 at 1:31 PM, Sebastian Fischer <fischer@nii.ac.jp> 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 -funbox-strict-fields.

Sebastian