packages feed

shake-plus 0.3.1.0 → 0.3.2.0

raw patch · 14 files changed

+58/−27 lines, 14 files

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for shake-plus +## v0.3.2.0++* Re-export `Development.Shake.Forward`.+ ## v0.3.1.0  * Remove unnecessary comonad dependency.@@ -77,7 +81,7 @@ * Add convenience functions `loadSortFilterApply` and `loadSortFilterApplyW` for batch   loading via `MonadAction`. * Add more of the API surface with `Path` and `Within` including variants of `need`, `want`-  `readFile`, `writeFile`. +  `readFile`, `writeFile`.  ## v0.0.1.0 
shake-plus.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: a2653e4c9541cc14dbcb4abb08093b5c495df699140a24db21f1a74da7e4bef1+-- hash: 6139b6faddf55117f1945ba2cd6201b0a5f37656df9ddde586065f078dfc97ea  name:           shake-plus-version:        0.3.1.0+version:        0.3.2.0 synopsis:       Re-export of Shake using well-typed paths and ReaderT. description:    Re-export of Shake using well-typed paths and ReaderT. You can thread logging through your Shake Actions. category:       development, shake@@ -34,6 +34,7 @@       Development.Shake.Plus.Env       Development.Shake.Plus.File       Development.Shake.Plus.FileRules+      Development.Shake.Plus.Forward       Development.Shake.Plus.Oracle       Development.Shake.Plus.Temp   other-modules:
src/Development/Shake/Plus/Cache.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Cache-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
src/Development/Shake/Plus/Command.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Command-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental @@ -40,7 +38,7 @@ import RIO  -- | Lifted version of `Development.Shake.command`.-command :: (Partial, CmdResult r, MonadAction m) => [CmdOption] -> String -> [String] -> m r +command :: (Partial, CmdResult r, MonadAction m) => [CmdOption] -> String -> [String] -> m r command x y z = liftAction $ Development.Shake.command x y z  -- | Lifted version of `Development.Shake.command_`.
src/Development/Shake/Plus/Config.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Config-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
src/Development/Shake/Plus/Core.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Core-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental @@ -28,6 +26,7 @@ , Development.Shake.shake , Development.Shake.shakeArgs , Development.Shake.shakeOptions+, Development.Shake.ShakeOptions(..) ) where  import           Control.Exception@@ -116,5 +115,5 @@ forP x f = withRunInAction $ \run -> Development.Shake.forP x $ run . f  -- | Unlifted `Development.Shake.par`.-par :: MonadUnliftAction m => m a -> m b -> m (a, b) +par :: MonadUnliftAction m => m a -> m b -> m (a, b) par a b = withRunInAction $ \run -> Development.Shake.par (run a) (run b)
src/Development/Shake/Plus/Database.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Database-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
src/Development/Shake/Plus/Directory.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Directory-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
src/Development/Shake/Plus/Env.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Env-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
src/Development/Shake/Plus/File.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.File-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
src/Development/Shake/Plus/FileRules.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.FileRules-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
+ src/Development/Shake/Plus/Forward.hs view
@@ -0,0 +1,47 @@+{- |+   Module     : Development.Shake.Plus.Forward+   License    : MIT+   Stability  : experimental++Forward mode utilities in "Development.Shake.Forward" lifted to `MonadAction` and `MonadRules`.+-}+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++-- | Lifted version of `Development.Shake.Forward.shakeForward` using `RAction`.+shakeForward :: MonadIO m => ShakeOptions -> r -> RAction r () -> m ()+shakeForward opts env ract = liftIO $ Development.Shake.Forward.shakeForward opts (runRAction env ract)++-- | Lifted version of `Development.Shake.Forward.shakeArgsForward` using `RAction`.+shakeArgsForward :: MonadIO m => ShakeOptions -> r -> RAction r () -> m ()+shakeArgsForward opts env ract = liftIO $ Development.Shake.Forward.shakeArgsForward opts (runRAction env ract)++-- | Lifted version of `Development.Shake.forwardRule` using `RAction`.+forwardRule :: (MonadReader r m, MonadRules m) => RAction r () -> m ()+forwardRule ract = ask >>= \r -> liftRules $ Development.Shake.Forward.forwardRule (runRAction r ract)++-- | Lifted version of `Development.Shake.cache`.+cache :: MonadAction m => (forall r. CmdArguments r => r) -> m ()+cache = liftAction++-- | Lifted version of `Development.Shake.Forward.cacheAction`.+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)++-- | Lifted version of `Development.Shake.Forward.cacheActionWith`.+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)
src/Development/Shake/Plus/Oracle.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Oracle-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental 
src/Development/Shake/Plus/Temp.hs view
@@ -1,7 +1,5 @@ {- |    Module     : Development.Shake.Plus.Temp-   Copyright  : Copyright (C) 2020 Daniel Firth-   Maintainer : Daniel Firth <dan.firth@homotopic.tech>    License    : MIT    Stability  : experimental