Proposal: Add &&& and *** to Data.Tuple
bertram.felgenhauer at googlemail.com
Tue Oct 16 01:44:54 EDT 2007
Conal Elliott wrote:
> Maybe I've missed the essence of this discussion, but I seem to see to
> opposite sentiments running through. One is to create additional,
> *specialized* (for "->") names for existing general arrow operators, rather
> than using the generalized versions, citing simpler error messages. The
> other thread is regret over th Haskell 98 committee having done just this
> kind of specialization (dumbing down) for monads vs lists.
> I agree that the names "onFst" and "onSnd" are easier to interpret than
> "first" and "second". So let's use those names for the general (Arrow)
> versions, rather than the specializations.
Changing the names of 'first' and 'second' in Control.Arrow is a bad
idea, I think. It'll break a lot of packages.
Adding functions that conflict with Control.Arrow in Data.Tuple looks
far less problematic, because Data.Tuple is quite rarely used. The
Prelude reexport of Data.Tuple for nhc should be pruned, however.
Number of occurences of "Data.Tuple" in various packages:
(note: not all of these are package imports.)
Same for "Control.Arrow":
(note: includes non-imports and imports like Control.Arrow.ListArrow,
so it's overcounting quite a bit)
The sample consists of ghc + testsuite + libraries + extra libraries,
HAppS, X11-extras, binary, derive, gtk2hs, haddock, hssdl, http, hxt, jhc,
lambdabot, tagsoup, uniplate, xmonad and zlib.
More information about the Libraries