packages feed

turtle 1.5.12 → 1.5.13

raw patch · 5 files changed

+51/−3 lines, 5 files

Files

CHANGELOG.md view
@@ -1,3 +1,10 @@+1.5.13++* Fix `chmod` bug+    * See: https://github.com/Gabriel439/Haskell-Turtle-Library/pull/337+* Add `reduce` and re-export `(<&>)`+    * See: https://github.com/Gabriel439/Haskell-Turtle-Library/pull/332+ 1.5.12  * Increase upper bound on `containers`
src/Turtle.hs view
@@ -87,6 +87,7 @@     , ExitCode(..)     , IsString(..)     , (&)+    , (<&>)     ) where  import Turtle.Format@@ -162,4 +163,33 @@ -- application operator '$', which allows '&' to be nested in '$'. (&) :: a -> (a -> b) -> b x & f = f x+#endif++#if __GLASGOW_HASKELL__ >= 821+import Data.Functor ((<&>))+#else+-- | Flipped version of '<$>'.+--+-- @+-- ('<&>') = 'flip' 'fmap'+-- @+--+-- @since 4.11.0.0+--+-- ==== __Examples__+-- Apply @(+1)@ to a list, a 'Data.Maybe.Just' and a 'Data.Either.Right':+--+-- >>> Just 2 <&> (+1)+-- Just 3+--+-- >>> [1,2,3] <&> (+1)+-- [2,3,4]+--+-- >>> Right 3 <&> (+1)+-- Right 4+--+(<&>) :: Functor f => f a -> (a -> b) -> f b+as <&> f = f <$> as++infixl 1 <&> #endif
src/Turtle/Prelude.hs view
@@ -1253,9 +1253,9 @@     let permissions' = fromSystemDirectoryPermissions permissions     let permissions'' = modifyPermissions permissions'         changed = permissions' /= permissions''-    let permissions''' = toSystemDirectoryPermissions permissions'+    let permissions''' = toSystemDirectoryPermissions permissions''     when changed (Directory.setPermissions path' permissions''')-    return permissions' )+    return permissions'' )  -- | Get a file or directory's user permissions getmod :: MonadIO io => FilePath -> io Permissions
src/Turtle/Shell.hs view
@@ -66,6 +66,7 @@     , foldIO     , foldShell     , fold+    , reduce     , sh     , view @@ -142,6 +143,16 @@ -- | Use a `Fold` to reduce the stream of @a@'s produced by a `Shell` fold :: MonadIO io => Shell a -> Fold a b -> io b fold s f = foldIO s (Foldl.generalize f)++-- | Flipped version of 'fold'. Useful for reducing a stream of data+--+-- ==== __Example__+-- Sum a `Shell` of numbers:+--+-- >>> select [1, 2, 3] & reduce Fold.sum+-- 6+reduce :: MonadIO io => Fold a b -> Shell a -> io b+reduce = flip fold  -- | Run a `Shell` to completion, discarding any unused values sh :: MonadIO io => Shell a -> io ()
turtle.cabal view
@@ -1,5 +1,5 @@ Name: turtle-Version: 1.5.12+Version: 1.5.13 Cabal-Version: >=1.10 Build-Type: Simple License: BSD3