On 5 September 2011 08:35, Max Bolingbroke <batterseapo...@hotmail.com> wrote:
> (If you do want to support the type checker only generating requests
> for an Applicative constraint you could just insist that user code
> writes "pure" instead of "return", in which case this would be quite
> easy to implement)

I take back this parenthetical remark. Using pure instead of return
only solves the most boring 1/2 of the problem :-)

Using the Applicative methods to optimise "do" desugaring is still
possible, it's just not that easy to have that weaken the generated
constraint from Monad to Applicative since only degenerate programs
like this one won't use a Monad method:

do computation1
    computation2
    computation3

Max

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

Reply via email to