module Development.Shake.Plus.Forward (
shakeForward
, shakeArgsForward
, Development.Shake.Forward.forwardOptions
, forwardRule
, cache
, cacheAction
, cacheActionWith
) where
import Development.Shake (ShakeOptions)
import Development.Shake.Classes
import qualified Development.Shake.Forward
import Development.Shake.Plus.Core
import Development.Shake.Plus.Command
import RIO
shakeForward :: MonadIO m => ShakeOptions -> r -> RAction r () -> m ()
shakeForward opts env ract = liftIO $ Development.Shake.Forward.shakeForward opts (runRAction env ract)
shakeArgsForward :: MonadIO m => ShakeOptions -> r -> RAction r () -> m ()
shakeArgsForward opts env ract = liftIO $ Development.Shake.Forward.shakeArgsForward opts (runRAction env ract)
forwardRule :: (MonadReader r m, MonadRules m) => RAction r () -> m ()
forwardRule ract = ask >>= \r -> liftRules $ Development.Shake.Forward.forwardRule (runRAction r ract)
cache :: MonadAction m => (forall r. CmdArguments r => r) -> m ()
cache = liftAction
cacheAction :: (MonadUnliftAction m, Typeable a, Binary a, Show a, Typeable b, Binary b, Show b) => a -> m b -> m b
cacheAction x a = withRunInAction $ \run -> Development.Shake.Forward.cacheAction x (run a)
cacheActionWith :: (MonadUnliftAction m, Typeable a, Binary a, Show a, Typeable b, Binary b, Show b, Typeable c, Binary c, Show c) => a -> b -> m c -> m c
cacheActionWith a b m = withRunInAction $ \run -> Development.Shake.Forward.cacheActionWith a b (run m)