[Haskell-cafe] MonadPlus or Alternative or ...?

Sean Leather leather at cs.uu.nl
Sat May 1 19:11:15 EDT 2010


I want to generalize a set of functions from lists to some functor type. I
require the following three operation types.

  f a
  a -> f a
  f a -> f a -> f a

Should I choose MonadPlus and use these?

  mzero
  return
  mplus

Or should I choose Alternative and use these?

  empty
  pure
  (<|>)

Or should I make my own class? Or is there another option?

Thanks,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100501/b64135bb/attachment.html


More information about the Haskell-Cafe mailing list