rio-0.1.22.0: A standard library for Haskell
LicenseMIT
MaintainerColin Woodbury <colin@fosskers.ca>
Safe HaskellSafe-Inferred
LanguageHaskell2010

RIO.Lens

Description

Extra utilities from microlens.

@since: 0.1.16.0

Synopsis

Fold

type SimpleFold s a = forall r. Monoid r => Getting r s a #

toListOf :: Getting (Endo [a]) s a -> s -> [a] #

has :: Getting Any s a -> s -> Bool #

Lens

_1 :: Field1 s t a b => Lens s t a b #

_2 :: Field2 s t a b => Lens s t a b #

_3 :: Field3 s t a b => Lens s t a b #

_4 :: Field4 s t a b => Lens s t a b #

_5 :: Field5 s t a b => Lens s t a b #

at :: At m => Index m -> Lens' m (Maybe (IxValue m)) #

lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b #

Iso

non :: Eq a => a -> Lens' (Maybe a) a #

Traversal

singular :: HasCallStack => Traversal s t a a -> Lens s t a a #

failing :: Traversal s t a b -> Traversal s t a b -> Traversal s t a b #

filtered :: (a -> Bool) -> Traversal' a a #

both :: forall a b f. Applicative f => (a -> f b) -> (a, a) -> f (b, b) #

traversed :: forall (f :: Type -> Type) a b. Traversable f => Traversal (f a) (f b) a b #

each :: Each s t a b => Traversal s t a b #

ix :: Ixed m => Index m -> Traversal' m (IxValue m) #

_head :: Cons s s a a => Traversal' s a #

_tail :: Cons s s a a => Traversal' s s #

_init :: Snoc s s a a => Traversal' s s #

_last :: Snoc s s a a => Traversal' s a #

Prism

_Left :: forall a b a' f. Applicative f => (a -> f a') -> Either a b -> f (Either a' b) #

_Right :: forall a b b' f. Applicative f => (b -> f b') -> Either a b -> f (Either a b') #

_Just :: forall a a' f. Applicative f => (a -> f a') -> Maybe a -> f (Maybe a') #

_Nothing :: forall a f. Applicative f => (() -> f ()) -> Maybe a -> f (Maybe a) #