

Using Arrows for Dependency Handling - nudded
http://jaspervdj.be/posts/2010-03-26-arrows-dependencies.html

======
leif
If anyone can explain to me why monads are insufficient, that would be swell.
I'm really not going to get it on my own any time soon.

~~~
jaspervdj
Author of the article here. I'll try to give a quick informal explanation. If
you look at the type signature of `>>=`:

    
    
      m a -> (a -> m b) -> m b
    

Let's suppose there's a HakyllAction monad. The >>= signature would be:

    
    
      HakyllAction a -> (a -> HakyllAction b) -> HakyllAction b
    

If we implement this operator, we get a value `HakyllAction a` and a function
`a -> HakyllAction b`. We can look at the dependencies of the value, but we
don't have access to the dependencies of the `a -> HakyllAction b`. If we want
that, we need to apply it to the first value.

This goes against the idea of dependency handling -- we want to know the
dependencies first, and then only execute the function if needed.

Hope this helps.

~~~
leif
This helps very much, thanks! :)

