lens-utils-1.4.2: Collection of missing lens utilities.

Safe HaskellNone
LanguageHaskell2010

Control.Lens.Utils.Nested

Synopsis

Documentation

type NestedCtx a = (Index a ~ Index (IxValue a), IxValue a ~ IxValue (IxValue a)) Source #

type NestedAtCtx a = (NestedCtx a, At a, At (IxValue a)) Source #

emptyMap :: Prism' (Map k a) () Source #

subMapAt :: (Ord p, Functor f) => p -> (Maybe a -> f (Maybe a)) -> Maybe (Map p a) -> f (Maybe (Map p a)) Source #

at' :: (Functor f, Ord p) => p -> (Maybe a -> f (Maybe a)) -> Maybe (Map p a) -> f (Maybe (Map p a)) Source #

unsafeLensedMapAt :: (Ord k, Default v) => k -> Lens' v a -> Lens' (Map k v) (Maybe a) Source #

Warning! This function does not hold lens laws: deleting and re-adding a key destroys everything appart of a, so `set l (Just x) (set l Nothing s) /= set l (Just x) s`