hackage-security-0.5.3.0: Hackage security library

Safe HaskellNone
LanguageHaskell2010

Hackage.Security.Util.Lens

Contents

Description

Some very simple lens definitions (to avoid further dependencies)

Intended to be double-imported > import Hackage.Security.Util.Lens (Lens) > import qualified Hackage.Security.Util.Lens as Lens

Synopsis

Generic definitions

type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t Source #

Polymorphic lens

type Lens' s a = Lens s s a a Source #

Monomorphic lens

get :: Lens' s a -> s -> a Source #

modify :: Lens s t a b -> (a -> b) -> s -> t Source #

set :: Lens s t a b -> b -> s -> t Source #

Specific lenses

lookupM :: forall a b. (Eq a, Monoid b) => a -> Lens' [(a, b)] b Source #