On May 2, 2010, at 11:10 AM, Sean Leather wrote:
Or should I make my own class?
Then, there obviously won't be any instances for existing types
other than your own (which might be a good or bad thing). You may
want to do this, if you don't want to require either (>>=) or (<*>),
which may not be supported for reasonable instances of your own class.
I don't really want to do this option, because it increases the
understanding overhead needlessly, I think. Everything else that is
provided by Applicative/Monad doesn't matter. I require only the
three operations above and do not disallow extra operations.
By not making your own class, you prohibit types that do not support
<*> (or >>=). That's fine, but an additional burden to instance
writers. By not listing extra operations in your own class you would
not disallow them. You require them by not making your own class
without them.
But still, your wish to reuse existing classes may be a fine reason to
impose an additional burden.
Sebastian
--
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe