More on Proposal #2717: Add nubWith, nubOrd

Bart Massey bart at cs.pdx.edu
Tue Dec 2 12:20:15 EST 2008


Yitzchak Gale <gale <at> sefer.org> writes:
> > > Could you please call it IntSet.nubOrd instead?
> 
> Neil Mitchell wrote:
> > I considered raising this, but decided nubInt is better
> > than nubOrd. From a usage point of view, nubInt/nubOrd
> > is much clearer.
> 
> In the case of Map and IntMap,I would like to see us
> strive for the two modules to export *exactly* the same
> set of symbols, except for the type names/constructors Map
> and IntMap.

There's only two possibilities that make sense to me: (1) do
what I did and call the three functions in question nub,
nubOrd, and nubInt, or (2) call them all nub.  If we're
going to be consistent with names across types, then there's
no reason for nubOrd to be a special case either, I think.
And calling a function nubOrd when it won't work with
arbitrary Ord data just seems broken to me.

Given the pain in the neck that is Haskell's management of
names that are duplicated in different imported modules, and
the propensity to use Data.List and Data.Set together, I
prefer (1).  But if folks prefer (2), or if they prefer
Yitzchak's intermediate version, please let us know on-list
ASAP.

    Bart Massey
    bart <at> cs.pdx.edu




More information about the Libraries mailing list