Why the Prelude must die

Benjamin Franksen benjamin.franksen at bessy.de
Wed Mar 28 15:06:59 EDT 2007

Nicolas Frisby wrote:
> Regarding type variable naming, a few of my more hardware minded
> friends I've asked to try Haskell often tease me about the opaque type
> variable names in the Prelude--it seems greater consideration of type
> variable names in the Prelude might behoove new users.

I think that single letter names are very a good idea for most of the things
in the Prelude. 'a', 'b' etc. are good for very general things like the
basic classes (Eq, Num, etc) and for parametric functions (flip, (.), etc).
I also like the 'm' for Monads of all kinds, but I would suggest to
use 'mt' for monad transformers. For collections I think 'c' is nice
and 'k' for keys seems to be sort of standard, but I would like to propose
using 'e' as generic name for elements of collections, if there are more
element types, then 'e1', e2' etc.

There are more complicated cases where a multi-letter name seems apropriate,
but there appear to me none of them in the Prelude.


More information about the Libraries mailing list