[Haskell-cafe] The difficulty of designing a sequence class

ajb at spamcop.net ajb at spamcop.net
Mon Jul 31 17:17:37 EDT 2006


G'day all.

Quoting Robert Dockins <robdockins at fastmail.fm>:

> Edison's design hails from a time when MPTCs were not only non-standard (as
> they still are), but also not widely used, and before fundeps were avaliable
> (I think).

Yes.  Chris Okasaki's original version of Edison was standard H98.

> I've considered
> reformulating the Sequence class to be more similar to the Collection classes
> (which use MPTCs, fundeps and mention the element type),

The redesign of the Collection hierarchy was from my tree.  The main
reason why I changed it was that ternary tries couldn't really be typed
properly.  (Chris' implementation of Patricia trees used a phantom key
type along with a stern warning to only define the Int instance.  That
didn't work for ternary tries, since the key type is polymorphic.)

I didn't get around to fixing Sequence because there wasn't a need for
it yet, but yes, it should be done.

Cheers,
Andrew Bromage


More information about the Haskell-Cafe mailing list