[Haskell-cafe] Name My Functor Classes
Ross Paterson
ross at soi.city.ac.uk
Wed Feb 9 07:52:01 EST 2005
On Mon, Feb 07, 2005 at 06:54:50PM -0800, Ashley Yakeley wrote:
> These classes seem like they might correspond to concepts in category
> theory:
>
> class (Functor f) => C1 f where
> f1 :: f (a -> b) -> f a -> f b
>
> class (C1 f) => C2 f where
> return :: a -> f a
> -- must satisfy:
> -- fmap = f1 . return
fmap+return is often called a premonad. I don't know of a good name for
fmap+return+f1. Doaitse Swierstra calls the class Sequence and calls f1
(<*>), Conor McBride calls it Idiom, and I'd call it a weakly symmetric
lax monoidal functor or a strong lax monoidal functor. There are more
equations, too; see
http://www.haskell.org/arrows/arrows/Control.Sequence.html
Also Conor's hack:
http://www.haskell.org//pipermail/haskell/2004-July/014315.html
More information about the Haskell-Cafe
mailing list