dhall-1.42.3: A configuration language guaranteed to terminate

Safe Haskell | None
Language | Haskell2010

Dhall.Optics

Contents

- Utilities

Description

Deprecated: Use the definitions from Lens.Micro of the microlens package directly.

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

- 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
- anyOf :: Getting Any s a -> (a -> Bool) -> s -> Bool
- rewriteOf :: ASetter a b a b -> (b -> Maybe a) -> a -> b
- 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
- cosmosOf :: Traversal s t s t -> Traversal s t s b
- to :: (s -> a) -> SimpleGetter s a
- foldOf :: Getting a s a -> s -> a

# Documentation

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

Identical to `Control.Lens.Type.`Optic``

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

Identical to `Control.Lens.Type.`Optic'``

# Utilities

anyOf :: Getting Any s a -> (a -> Bool) -> s -> Bool Source #

Identical to `Control.Lens.`anyOf``

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

Identical to `Control.Lens.`rewriteOf``

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

Identical to `Control.Lens.`transformOf``

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

Identical to `Control.Lens.`rewriteMOf``

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

Identical to `Control.Lens.`transformMOf``

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

Identical to `Control.Lens.`mapMOf``

cosmosOf :: Traversal s t s t -> Traversal s t s b Source #

Identical to `Control.Lens.Plated.`cosmosOf``

to :: (s -> a) -> SimpleGetter s a Source #

Identical to `Control.Lens.Getter.`to``

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

Identical to `Control.Lens.Fold.`foldOf``