packages feed

rio 0.1.15.1 → 0.1.16.0

raw patch · 5 files changed

+57/−11 lines, 5 filesdep +microlens-mtlPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: microlens-mtl

API changes (from Hackage documentation)

+ RIO: (%~) :: () => ASetter s t a b -> (a -> b) -> s -> t
+ RIO: (.~) :: () => ASetter s t a b -> b -> s -> t
+ RIO: (^..) :: () => s -> Getting (Endo [a]) s a -> [a]
+ RIO: (^?) :: () => s -> Getting (First a) s a -> Maybe a
+ RIO: infixr 4 .~
+ RIO: preview :: MonadReader s m => Getting (First a) s a -> m (Maybe a)
+ RIO.Lens: _1 :: Field1 s t a b => Lens s t a b
+ RIO.Lens: _2 :: Field2 s t a b => Lens s t a b
+ RIO.Lens: _3 :: Field3 s t a b => Lens s t a b
+ RIO.Lens: _4 :: Field4 s t a b => Lens s t a b
+ RIO.Lens: _5 :: Field5 s t a b => Lens s t a b
+ RIO.Lens: _Just :: () => Traversal (Maybe a) (Maybe a') a a'
+ RIO.Lens: _Left :: () => Traversal (Either a b) (Either a' b) a a'
+ RIO.Lens: _Nothing :: () => Traversal' (Maybe a) ()
+ RIO.Lens: _Right :: () => Traversal (Either a b) (Either a b') b b'
+ RIO.Lens: _head :: Cons s s a a => Traversal' s a
+ RIO.Lens: _init :: Snoc s s a a => Traversal' s s
+ RIO.Lens: _last :: Snoc s s a a => Traversal' s a
+ RIO.Lens: _tail :: Cons s s a a => Traversal' s s
+ RIO.Lens: at :: At m => Index m -> Lens' m (Maybe (IxValue m))
+ RIO.Lens: both :: () => Traversal (a, a) (b, b) a b
+ RIO.Lens: each :: Each s t a b => Traversal s t a b
+ RIO.Lens: failing :: () => Traversal s t a b -> Traversal s t a b -> Traversal s t a b
+ RIO.Lens: filtered :: () => (a -> Bool) -> Traversal' a a
+ RIO.Lens: has :: () => Getting Any s a -> s -> Bool
+ RIO.Lens: infixl 5 `failing`
+ RIO.Lens: ix :: Ixed m => Index m -> Traversal' m (IxValue m)
+ RIO.Lens: lens :: () => (s -> a) -> (s -> b -> t) -> Lens s t a b
+ RIO.Lens: non :: Eq a => a -> Lens' (Maybe a) a
+ RIO.Lens: singular :: HasCallStack => Traversal s t a a -> Lens s t a a
+ RIO.Lens: toListOf :: () => Getting (Endo [a]) s a -> s -> [a]
+ RIO.Lens: traversed :: Traversable f => Traversal (f a) (f b) a b
+ RIO.Lens: type SimpleFold s a = forall r. Monoid r => Getting r s a
- RIO: infixl 8 ^.
+ RIO: infixl 8 ^..

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Changelog for rio +## 0.1.16.0++* Expand the number of `microlens` functions exported by the RIO prelude.+* Add new module `RIO.Lens` which provides the rest of `microlens`.+ ## 0.1.15.1  * Replace `canonicalizePath` with `makeAbsolute` [#217](https://github.com/commercialhaskell/rio/issues/217)
rio.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.1. -- -- see: https://github.com/sol/hpack------ hash: 30ccd150c619c6c6fa96ebc7d3b33d6cb4ea1b2e45228e4cba5c35c1bc64cd63  name:           rio-version:        0.1.15.1+version:        0.1.16.0 synopsis:       A standard library for Haskell description:    See README and Haddocks at <https://www.stackage.org/package/rio> category:       Control@@ -42,6 +40,7 @@       RIO.HashMap       RIO.HashMap.Partial       RIO.HashSet+      RIO.Lens       RIO.List       RIO.List.Partial       RIO.Map@@ -102,6 +101,7 @@     , filepath     , hashable     , microlens+    , microlens-mtl     , mtl     , primitive     , process@@ -150,6 +150,7 @@     , hashable     , hspec     , microlens+    , microlens-mtl     , mtl     , primitive     , process
src/RIO.hs view
@@ -41,7 +41,8 @@   , module RIO.Prelude.Logger     -- * Display   , module RIO.Prelude.Display-    -- * Lens+    -- * Optics+    -- | @microlens@-based Lenses, Traversals, etc.   , module RIO.Prelude.Lens     -- * Concurrency   , UnliftIO.Concurrent.ThreadId
+ src/RIO/Lens.hs view
@@ -0,0 +1,39 @@+-- |+-- Module    : RIO.Lens+-- License   : MIT+-- Maintainer: Colin Woodbury <colin@fosskers.ca>+--+-- Extra utilities from @microlens@.+--+-- @since: 0.1.16.0+module RIO.Lens+  ( -- * Fold+    SimpleFold+  , toListOf+  , has+    -- * Lens+  , _1, _2, _3, _4, _5+  , at+  , lens+    -- * Iso+  , non+    -- * Traversal+  , singular+  , failing+  , filtered+  , both+  , traversed+  , each+  , ix+  , _head+  , _tail+  , _init+  , _last+    -- * Prism+  , _Left+  , _Right+  , _Just+  , _Nothing+  ) where++import Lens.Micro
src/RIO/Prelude/Lens.hs view
@@ -1,5 +1,6 @@ module RIO.Prelude.Lens   ( view+  , preview   , Lens.Micro.ASetter   , Lens.Micro.ASetter'   , Lens.Micro.Getting@@ -12,12 +13,11 @@   , Lens.Micro.sets   , Lens.Micro.to   , (Lens.Micro.^.)+  , (Lens.Micro.^?)+  , (Lens.Micro.^..)+  , (Lens.Micro.%~)+  , (Lens.Micro..~)   ) where  import Lens.Micro-import Control.Monad.Reader (MonadReader, asks)-import           Lens.Micro.Internal      (( #. ))-import           Control.Applicative      (Const (..))--view :: MonadReader s m => Getting a s a -> m a-view l = asks (getConst #. l Const)+import Lens.Micro.Mtl