[Haskell] Long live Edison

ajb at spamcop.net ajb at spamcop.net
Mon Feb 20 17:19:40 EST 2006

G'day all.

Quoting Robert Dockins <robdockins at fastmail.fm>:

> Although I am not a data structures expert, several weeks ago I
> decided that I would try my hand at maintaining Edison and see if I
> could overcome these barriers.  Toward this end I have taken the most
> recent Edison codebase I could find (from Andrew Bromage's HFL
> project) and updated it in the following ways:

Yay!  Thanks for doing this.  Maybe I can close down HFL now. :-)

> -- The Sequence 'rcons' method takes its arguments in the opposite
> order as the 'lcons' method (for mnemonic purposes).  Should the
> arguments to 'rcons' be reversed?

The argument is that they both take their arguments in the order
that they would do were they implemented with concatenation:

    lcons x xs === [x] ++ xs
    rcons xs x === xs ++ [x]

This certainly makes sense to me.  Is there an argument for using
the other order?

> -- There are a few places where 'Data.Map' and/or 'Data.Set' have
> methods named similarly (but not identical) to the Edison API.  By
> and large I have left those differences.  Should I instead modify
> Edison to match those names?

If you want to change it, change it to whatever makes the most sense
for you.  (This, for example, is why I dumped all of the old Edison
Maybe-like data structures in favour of a NotJustMaybe-like interface.
It made more sense at the time.)

Data.Set, Data.Map, Data.Hash and the various Array interfaces are all
inconsistent in subtle ways, so whatever you do, do not take them as
the ideal to which Edison should aspire.  A better idea would be to
look at all of them, and decide which convention you think makes the
most sense.  An even better idea is to lay out the differences and
invite feedback on which is best.

Andrew Bromage

More information about the Haskell mailing list