hackage-security-0.5.2.2: 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 #

Polymorphic lens

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

Monomorphic lens

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

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

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

Specific lenses

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