rio-0.1.21.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 :: Traversal (a, a) (b, b) a 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 :: Traversal (Either a b) (Either a' b) a a' #

_Right :: Traversal (Either a b) (Either a b') b b' #

_Just :: Traversal (Maybe a) (Maybe a') a a' #

_Nothing :: Traversal' (Maybe a) () #