Hans Aberg wrote:
> At 10:40 -0800 1998/11/13, Jeffrey R. Lewis wrote:
> > Say you've got some code that wasn't originally
> >monadic, and you now need to re-express your code in monadic form. You
> >apply the monad translation. Using the `kleisli' functions makes this
> >process simpler. Consider:
> >
>
> It is a fact that every such monadic modification also have such a monadic
> lifting. Could you not implement this fact in such a way that people need
> not bother writing out the details for every specific case?
Do you mean: wouldn't it be nice if haskell had a way to do the monad
translation automatically? Yes - I think it would be nice. The `do' notation
provides a partial solution in that it is a monad translation of let
expressions. Something more ambitious that I've often longed for would be full
monadic reflection (some kind of brackets to enclose monadic compuations and
quoting mechanism to escape them).
--Jeff