On Fri, 11 Jun 1999, Erik Meijer wrote:
> > Personally I find the convention of using `a', `b', and `c' for type
> > variables to be a poor one. I much prefer using `t' (if there's
> > only one) or `t1', `t2', ... (if there's more than one).
> > I find that for me this makes it much easier to read type declarations,
> > because names like `a', `b', and `c' sound like values, whereas names
> > like `t1', `t2', and `t3' suggest types.
>
> I *love* to use the same name for type variables and term variables, as in
>
> f :: a -> a
> f = \a -> a
>
> I also love to use the same name for type constructors and value constructors, as
in
>
> data Foo a = Foo a
>
> Erik
>
I also am quite fond of using selectors, like this:
data Foo a = Foo { unFoo :: a }
So that you have
foo :: a -> Foo a
unFoo :: Foo a -> a
In my experience this works best with newtype declarations which are
in some sense isomorphic to the arguments, ie
newtype Compose ff gg a = Compose { unCompose :: ff (gg a) } and suchlike.
Jan de Wit