packages feed

shake-plus-extended 0.1.2.0 → 0.2.0.0

raw patch · 6 files changed

+33/−24 lines, 6 filesdep +ixset-typed-binary-instancedep +ixset-typed-hashable-instancedep +path-binary-instancesetup-changed

Dependencies added: ixset-typed-binary-instance, ixset-typed-hashable-instance, path-binary-instance

Files

ChangeLog.md view
@@ -1,5 +1,12 @@ # Changelog for shake-plus-extended +## v0.2.0.0++* Re-export `Binary Path` orphan.+* Re-export `Binary IxSet` orphan.+* Re-export `Hashable IxSet` orphan.+* Merge `Shakebook.Local` with `Shakebook.FileRules`+ ## v0.1.2.0  * Add a proxy version of `batchLoadIndex`.
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
shake-plus-extended.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           shake-plus-extended-version:        0.1.2.0+version:        0.2.0.0 synopsis:       Experimental extensions to shake-plus description:    Experimental extensions to shake-plus - `within`-style file rules, HashMap and IxSet batch loaders. category:       development, shake@@ -28,7 +28,6 @@       Development.Shake.Plus.Extended       Development.Shake.Plus.Extended.FileRules       Development.Shake.Plus.Extended.Loaders-      Development.Shake.Plus.Extended.Local       Development.Shake.Plus.Extended.Simple   other-modules:       Paths_shake_plus_extended@@ -40,7 +39,10 @@     , comonad     , extra     , ixset-typed+    , ixset-typed-binary-instance+    , ixset-typed-hashable-instance     , path+    , path-binary-instance     , rio     , shake     , shake-plus >=0.3.0.0
src/Development/Shake/Plus/Extended.hs view
@@ -19,3 +19,6 @@ import Development.Shake.Plus.Extended.Loaders import Development.Shake.Plus.Extended.Local import Development.Shake.Plus.Extended.Simple+import Path.Binary()+import Data.IxSet.Typed.Binary()+import Data.IxSet.Typed.Hashable()
src/Development/Shake/Plus/Extended/FileRules.hs view
@@ -7,7 +7,10 @@  -} module Development.Shake.Plus.Extended.FileRules (-  (%^>)+  HasLocalOut(..)+, (/%>)+, (|/%>)+, (%^>) , (|%^>) ) where @@ -17,6 +20,21 @@ import           Development.Shake.Plus import           RIO                         as R import           Within++class HasLocalOut r where+  localOutL :: Lens' r (Path Rel Dir)++-- | Variant of `(%>)` that passes the local directory from the environment into the callback.+(/%>) :: (MonadReader r m, HasLocalOut r, MonadRules m) => FilePattern -> ((Path Rel Dir, Path Rel File) -> RAction r ()) -> m ()+(/%>) xs ract = ask >>= \r -> do+  let d = view localOutL r+  (toFilePath d <> xs) %> (stripProperPrefix d >=> \x -> ract (d, x))++-- | Variant of `(|%>)` that passes the local directory from the environment into the callback.+(/|%>) :: (MonadReader r m, HasLocalOut r, MonadRules m) => [FilePattern] -> ((Path Rel Dir, Path Rel File) -> RAction r ()) -> m ()+(/|%>) xs ract = ask >>= \r -> do+  let d = view localOutL r+  ((toFilePath d <>) <$> xs) |%> (stripProperPrefix d >=> \x -> ract (d, x))  -- | `Within` variant of `(%>)`, used to keep track of local directories. (%^>) :: (Partial, MonadReader r m, MonadRules m) => Within Rel FilePattern -> (Within Rel (Path Rel File) -> RAction r ()) -> m ()
− src/Development/Shake/Plus/Extended/Local.hs
@@ -1,19 +0,0 @@-module Development.Shake.Plus.Extended.Local where--import Development.Shake.Plus-import RIO-import Path-import Within--class HasLocalOut r where-  localOutL :: Lens' r (Path Rel Dir)--(/%>) :: (MonadReader r m, HasLocalOut r, MonadRules m) => FilePattern -> ((Path Rel Dir, Path Rel File) -> RAction r ()) -> m ()-(/%>) xs ract = ask >>= \r -> do-  let d = view localOutL r-  (toFilePath d <> xs) %> (stripProperPrefix d >=> \x -> ract (d, x))--(/|%>) :: (MonadReader r m, HasLocalOut r, MonadRules m) => [FilePattern] -> ((Path Rel Dir, Path Rel File) -> RAction r ()) -> m ()-(/|%>) xs ract = ask >>= \r -> do-  let d = view localOutL r-  ((toFilePath d <>) <$> xs) |%> (stripProperPrefix d >=> \x -> ract (d, x))