Using Arrows for Dependency Handling
jaspervdj.be
jaspervdj.be
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.