On Friday 26 November 2004 08:39, George Russell 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
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to