2008/6/30 Joachim Breitner <[EMAIL PROTECTED]>:
> The problem I stumbled over was that considering the type of >>=
>  (>>=): Monad m => m a -> (a -> m b) -> m b
> means that I can not „look ahead" what files would be written without
> actually reading the requested file. Of course this is not always
> possible, although I expect this code to be the exception:

I am somewhat unclear about what you are asking.  My first impression
though is that if you're running into trouble with "looking ahead",
then this algebra is probably not a Monad.  In fact, these use cases
indicate an applicative functor to me (Control.Applicative).  Of
course, the problem with applicative functors is that the syntax that
goes with them is not as imperative as monad syntax, and syntax is a
big motivator for finding monads.

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

Reply via email to