On Thu, Dec 15, 2011 at 07:29:20PM +1300, Chris Wong wrote:
> > Okay, so how about the following as a user narrative for some and many?
> >
> > ...
> 
> I was in the middle of writing my own version of Applicative when I
> stumbled on this intense debate. Here's what I wrote for the
> documentation:
> 
> class (Applicative f, Monoid f) => Alternative f where

Note that 'Monoid f' does not make sense, since the kinds do not
match. Perhaps what you mean is  (forall a. Monoid (f a)) but that is
(currently) impossible to express.  One could, of course, make a new
typeclass

  class Monoid1 f where
    mempty1 :: f a
    mappend1 :: f a -> f a -> f a

-Brent

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to