Proposal: Add &&& and *** to Data.Tuple

ajb at ajb at
Mon Oct 15 22:54:04 EDT 2007

G'day all.

Quoting Conal Elliott <conal at>:

> 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.

Just for the record, my problem is not that there are specialised
versions of things for lists/functions rather than monads/arrows, but
rather that some of the "good" names are taken by the specialised
versions (e.g. map vs fmap).

I should point out the following operations, which are in
Data.Graph.Inductive.Query.Monad (so no wonder nobody knows about

     mapFst :: (a -> b) -> (a, c) -> (b, c)
     mapSnd :: (a -> b) -> (c, a) -> (c, b)
     (><) :: (a -> b) -> (c -> d) -> (a, c) -> (b, d)

How about moving those into Data.Tuple, along with a work-alike
for (***)?  How about (>*<)?

Andrew Bromage

More information about the Libraries mailing list