Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This module defines two different strategies of self-tracking, based around the idea of storing task descriptions that can be parsed into a Task.
- For Monad it works out beautifully. You just store the rule on the disk, and depend on it.
- For Applicative, we generate a fresh Task each time, but have that Task depend on a fake version of the rules. This is a change in the Task, but it's one for which the standard implementations tend to cope with just fine. Most Applicative systems with self-tracking probably do it this way.
Documentation
selfTrackingM :: (t -> Task Monad k v) -> Tasks Monad k t -> Tasks Monad (Key k) (Value v t) Source #
A model using Monad, works beautifully and allows storing the key on the disk.
selfTrackingA :: (t -> Task Applicative k v) -> (k -> t) -> Tasks Applicative (Key k) (Value v t) Source #
The Applicative model requires every key to be able to associate with its environment (e.g. a reader somewhere). Does not support cutoff if a key changes.