darcs patch: Add equating p x y = p x == p y
Malcolm.Wallace at cs.york.ac.uk
Tue Oct 24 13:13:12 EDT 2006
Simon Marlow <simonmarhaskell at gmail.com> wrote:
> > I would like to propose a new module for functions like this, which
> > are in some sense "purely" functional, that is, they do not involve
> > any data structure at all, just functions. Other examples would be
> > const
> > id
> > flip
> > (.)
> > ($)
> > ($!)
> > Any suggestions for a good name for such a module? Data.Function
> > does not sound right to my ears.
> Seriously, currently they are all provided by Prelude, and lacking an
> obvious separate place to put them, I think Prelude is just fine.
Yes! That is the answer I wanted. In fact, my proposal for Haskell'
is that these are the _only_ things that should be in the Prelude.
This is a very minimalist approach, but I believe everything else
currently in Prelude can be more readily given a home in some separate
library module named after its main data structure.
Of course, some aggregation of small utility functions back into a
single larger collection would be useful to most people, probably
but the idea would be that the Prelude only gives you the basics, on top
of which everything else is built. You should be able to replace the
Std.Haskell with some alternative of your own choosing.
More information about the Libraries