dhall-1.42.2: A configuration language guaranteed to terminate
Safe HaskellSafe-Inferred
LanguageHaskell2010

Dhall.Optics

Contents

Description

This module contains some useful utilities copy-and-pasted from the lens library to avoid a dependency which are used internally and also re-exported for convenience

Synopsis

Documentation

type Optic (p :: Type -> Type -> Type) (f :: Type -> Type) s t a b = p a (f b) -> p s (f t) #

type Optic' (p :: Type -> Type -> Type) (f :: Type -> Type) s a = Optic p f s s a a #

Utilities

rewriteOf :: ASetter a b a b -> (b -> Maybe a) -> a -> b #

Identical to Control.Lens.rewriteOf

transformOf :: ASetter a b a b -> (b -> b) -> a -> b #

rewriteMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m (Maybe a)) -> a -> m b #

transformMOf :: Monad m => LensLike (WrappedMonad m) a b a b -> (b -> m b) -> a -> m b #

mapMOf :: LensLike (WrappedMonad m) s t a b -> (a -> m b) -> s -> m t #

Identical to Control.Lens.mapMOf

to :: (Profunctor p, Contravariant f) => (s -> a) -> Optic' p f s a #

Identical to Control.Lens.Getter.to

foldOf :: Getting a s a -> s -> a #