Generic tries (long)

Ian Lynagh igloo at
Fri Jun 20 10:00:56 EDT 2008

On Fri, Jun 20, 2008 at 11:51:40AM +0100, Adrian Hey wrote:
> >2) Don't use Int# , looks like a premature optimization to me. 
> >Furthermore, I'd change the queer  addSize  to simply
> >
> >  size :: map a -> Int
> This does exist (see above), but it's not a class method. One could
> argue that is was unnecessary to make unboxing explicit. It's something
> I got into the habit of doing because it's way easier to do that than
> is inspecting ghc's output to make it's done it on its own (and figuring
> out what to do about it if it hasn't). Also, because of the nested
> nature generalised tries addSize is more convenient for implementors
> than size IMO.

I agree that using Int# is a bad idea. It makes the package unportable,
and it forces all the packages that implement the class to write code
using Int#.


More information about the Libraries mailing list