Re: Can we do better than duplicate APIs? [was: Data.CompactString 0.3]

Jean-Philippe Bernardy wrote:
Please look at http://darcs.haskell.org/packages/collections/doc/html/Data-Collections.html for an effort to make most common operation on bulk types fit in a single framework.
The last time I looked at this (shortly after you started the project) I wasn't sure if I would want to use it. Now it seems like an oasis in a desert to me. I am pretty much impressed, for instance, you managed to unify all the nine existing 'filter' types into a common type class. Cool. The only hair in the (otherwise very tasty) soup is "Portability: MPTC, FD, undecidable instances" which doesn't sound like it is going to replace the Prelude any time soon ;-) Never mind: I definitely consider using this instead of importing all these different Data.XYZ modules directly (and, heaven forbid, having to import them qualified whenever I need two of them in the same module). Do you forsee any particular obstacle to an integration (=providing the appropriate instances) of e.g. CompactStrings? I would even try to do this myself, as an exercise of sorts. How difficult is it in practice to work with 'undecidable instances'? Are there special traps one has to be careful to walk around?
Also, we expect indexed types to solve, or at least alleviate, some problems you mention in your "rant". http://haskell.org/haskellwiki/GHC/Indexed_types
I have been hoping for that to resolve (some of) our troubles, but have been confused by the all the back and forth among the experts about whether they offer more, or less, or the same, as MPTCs+fundeps+whatever (and that they will probably not go into Haskell'). BTW, any reason I didn't find your collections library in the HackageDB (other than stupidity on my part)? (Just interested, I already found the darcs repo.) Cheers Ben PS: Since I read and post to the Haskell lists via gmane and a news client: Do mail clients usually respect the follow-up header, such as I insert when cross-posting, so as to restrict follow-ups to the intended list?

On 3/26/07, Benjamin Franksen
Jean-Philippe Bernardy wrote:
Please look at http://darcs.haskell.org/packages/collections/doc/html/Data-Collections.html for an effort to make most common operation on bulk types fit in a single framework.
The last time I looked at this (shortly after you started the project) I wasn't sure if I would want to use it. Now it seems like an oasis in a desert to me. I am pretty much impressed, for instance, you managed to unify all the nine existing 'filter' types into a common type class. Cool.
The only hair in the (otherwise very tasty) soup is "Portability: MPTC, FD, undecidable instances" which doesn't sound like it is going to replace the Prelude any time soon ;-) Never mind: I definitely consider using this instead of importing all these different Data.XYZ modules directly (and, heaven forbid, having to import them qualified whenever I need two of them in the same module).
Do you forsee any particular obstacle to an integration (=providing the appropriate instances) of e.g. CompactStrings? I would even try to do this myself, as an exercise of sorts. How difficult is it in practice to work with 'undecidable instances'? Are there special traps one has to be careful to walk around?
There are traps. However, if you are already comfortable with MPTC+FD, I forsee no big trouble.
Also, we expect indexed types to solve, or at least alleviate, some problems you mention in your "rant". http://haskell.org/haskellwiki/GHC/Indexed_types
I have been hoping for that to resolve (some of) our troubles, but have been confused by the all the back and forth among the experts about whether they offer more, or less, or the same, as MPTCs+fundeps+whatever (and that they will probably not go into Haskell').
BTW, any reason I didn't find your collections library in the HackageDB (other than stupidity on my part)? (Just interested, I already found the darcs repo.)
I just uploaded the latest revision to HackageDB. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/collections-0.3 Cheers, JP.

Jean-Philippe Bernardy wrote:
I just uploaded the latest revision to HackageDB.
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/collections-0.3
I'm afraid this doesn't seem to build for me (on winxp with ghc 6.6 at least). There seems to be stuff missing (like the include directory). Regards -- Adrian Hey

On 3/31/07, Adrian Hey
Jean-Philippe Bernardy wrote:
I just uploaded the latest revision to HackageDB.
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/collections-0.3
I'm afraid this doesn't seem to build for me (on winxp with ghc 6.6 at least). There seems to be stuff missing (like the include directory).
I think I don't master cabal distribution mechanism well enough yet. Till I get better, please use the darcs repo: http://darcs.haskell.org/packages/collections-ghc6.6/ Cheers, JP.

I think I don't master cabal distribution mechanism well enough yet. Till I get better, please use the darcs repo: http://darcs.haskell.org/packages/collections-ghc6.6/
This has now been fixed (thanks to Ross). To make things clear: http://darcs.haskell.org/packages/collections-ghc6.6/ repository working against the latest stable release of ghc/base http://darcs.haskell.org/packages/collections/ development repository (you basically need ghc 6.7 for this one) http://hackage.haskell.org/cgi-bin/hackage-scripts/package/collections-0.3 latest snapshot of the former (ie. stable version). Cheers, JP.
participants (3)
-
Adrian Hey
-
Benjamin Franksen
-
Jean-Philippe Bernardy