{- | Module : Development.Shake.Plus.Cache Copyright : Copyright (C) 2020 Daniel Firth Maintainer : Daniel Firth (k -> RAction r v) -> m (k -> RAction r v) newCache ract = ask >>= \r -> liftRules $ (liftAction . ) <$> Development.Shake.newCache (runRAction r . ract) -- | Lifted version of `Development.Shake.newCacheIO` using `RAction`. newCacheIO :: (MonadIO m, MonadReader r m, Eq k, Hashable k) => (k -> RAction r v) -> m (k -> RAction r v) newCacheIO f = ask >>= \r -> liftIO $ (liftAction . ) <$> Development.Shake.newCacheIO (\y -> runRAction r (f y))