Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
logged :: (Show a, Read a, Typeable a) => TransientIO a -> TransientIO a Source
synonymous of step
step :: (Show a, Read a, Typeable a) => TransientIO a -> TransientIO a Source
write the result of the computation in the log and return it. but if there is data in the internal log, it read the data from the log and do not execute the computation.
It accept nested step's. The effect is that if the outer step is executed completely the log of the inner steps are erased. If it is not the case, the inner steps are logged this reduce the log of large computations to the minimum. That is a feature not present in the package Workflow.
r <- step $ do step this :: TransIO () step that :: TransIO () step thatOther liftIO $ print r
when print
is executed, the log is just the value of r.
but when thatOther
is executed the log is: [Exec,(), ()]