[Haskell-cafe] The difficulty of designing a sequence class
brianh at metamilk.com
Tue Aug 1 11:55:11 EDT 2006
Bulat Ziganshin wrote:
> Hello Brian,
> Tuesday, August 1, 2006, 4:43:23 AM, you wrote:
>> As you've pointed out, there are 2 separate issues that are in
>> danger of being confused:
>> 1) Forcing all sequence instances to support all operations
>> 2) Bundling all the ops into a single huge class
> Collections library (darcs get --partial
> http://darcs.haskell.org/packages/collections/) defines good
> hierarchy of collection classes
Hi Bulat - Thanks for the link to the collections repository. I've at last
taken the plunge and installed darcs and managed to get this onto my
computer (although with a strange warning from darcs: 'plink: unknown option
I'll have to have a proper look into it. On superficial inspection, there
are some unusual choices - for example putting (size) and (null) into
Foldable instead of Collection, and calling "null" "null" instead of
"isEmpty" (considering that Collection has a method called "isSingleton"
which follows the usual convention of starting unary predicates with "is").
In any case it's interesting to see another possible factoring of the
concept of collections to compare with Edison and the existing base
Logic empowers us and Love gives us purpose.
Yet still phantoms restless for eras long past,
congealed in the present in unthought forms,
strive mightily unseen to destroy us.
More information about the Haskell-Cafe