[Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators
wren ng thornton
wren at freegeek.org
Sun May 8 03:53:03 CEST 2011
On 5/7/11 5:15 PM, dm-list-haskell-cafe at scs.stanford.edu wrote:
> In general, I try to place as few requirements in the contexts of
> functions as possible.
One counterargument to this philosophy is that there are many cases
where fmap can be defined more efficiently than the liftM derived from
return and (>>=). Similarly, the applicative operators (<*) and (*>)
often admit more efficient implementations than the default.
So, when dealing with monads that have those more efficient definitions,
you're restricting performance unnecessarily by forcing them to use the
generic monadic definitions. There's nothing wrong with having multiple
constraints in the context.
More information about the Haskell-Cafe