[Haskell-cafe] Re: [Haskell] Re: Global Variables and IO initializers

Benjamin Franksen benjamin.franksen at bessy.de
Sat Nov 27 16:23:55 EST 2004


On Friday 26 November 2004 08:39, you wrote:
> Benjamin Franksen wrote (snipped):
>  > What non-standard libraries have I used (that you don't)?
>
> OK, but you have to test every element of the dictionary with fromDynamic
> until you find one with the type you want, which is not a good idea if the
> dictionary is big.  My implementation is equally inefficient now (because
> TypeRep's have no Ord), but if TypeRep's had Ord or a hashing function
> (both would be very easy to provide from GHC's implementation) I could make
> my implementation efficient very easily, while you'd have to completely
> rewrite yours to get the same effect.

[completely off-topic but anyway:]

This is yet another incidence where Robert Will's ByMaps would be very useful:

http://www.stud.tu-ilmenau.de/~robertw/dessy/fun/principles.html#bymap

I am quite astonished that apparently none of the data structure library 
projects have taken up the idea.

Ben


More information about the Haskell-Cafe mailing list