[Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

wren ng thornton wren at freegeek.org
Tue Jun 7 09:05:29 CEST 2011

On 6/6/11 7:05 PM, Casey McCann wrote:
> On Mon, Jun 6, 2011 at 5:32 PM, Matthew Steele<mdsteele at alum.mit.edu>  wrote:
>>> branchApplicative = liftA3 (\b t f ->  if b then t else f)
>> This definition doesn't satisfy the laws given for the Branching
>> class; it will execute the effects of both branches regardless of
>> which is chosen.
> How would it violate the laws for Identity or Reader?

It wouldn't violate the laws for those (or other benign effects, given a 
suitable definition of "benign"), but it'd clearly violate the laws for 
things like Writer, ST, IO,...

Live well,

More information about the Haskell-Cafe mailing list