Applicative/Arrow for resource estimation and progress tracking.
|Latest on Hackage:||22.214.171.124|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
A writer-like Applicative/Arrow for resource estimation and progress tracking.
I run scripts in my machine. Their logic is simple and predictable, even if the steps are many and take long to complete.
The following infuriating situations happen:
- The script fails at minute 45 because of a syntax error.
- The script fails at minute 45 because it requests a missing resource whose availability could have been checked when the script started.
- It is difficult to ascertain how far along the execution we are at minute 45.
For the second problem, we need to have a summary of the resources that the computation will require, before running the computation itself. This can be done by hand, adding a new check at the beginning of the script when we change something further down. But it's easy to forget to do so, and the initial checks can become out of sync with the main code. It would be nice if each step of the computation foresaw its own resource needs and these accumulated automatically as we composed the steps.
For the third problem, we need a channel that notifies you whenever a step of the computation starts or finishes. Bonus points if nested steps are supported.
Currently the ApplicativeDo extension doesn't work very well with this package's Applicative because an extant bug in GHC: #10892. Sequencing actions whose values are ignored gives an error.
- Lasagne is now Sylvan.
- runPlanK -> runKPlan
- unliftPlanK -> unliftKPlan
- planK -> kplan
- planKIO -> kplanIO
- Removed non-essential paths function.
- Added "obligatoriness".