fresnel-0.0.0.0: high-powered optics in a small package
Safe HaskellNone
LanguageHaskell2010

Fresnel.At

Synopsis

Updateable collections

class Ixed c => At c where Source #

Methods

at :: Index c -> Lens' c (Maybe (IxValue c)) Source #

Instances

Instances details
At IntSet Source # 
Instance details

Defined in Fresnel.At

At (Maybe a) Source # 
Instance details

Defined in Fresnel.At

Methods

at :: Index (Maybe a) -> Lens' (Maybe a) (Maybe (IxValue (Maybe a))) Source #

At (IntMap v) Source # 
Instance details

Defined in Fresnel.At

Methods

at :: Index (IntMap v) -> Lens' (IntMap v) (Maybe (IxValue (IntMap v))) Source #

Ord k => At (Set k) Source # 
Instance details

Defined in Fresnel.At

Methods

at :: Index (Set k) -> Lens' (Set k) (Maybe (IxValue (Set k))) Source #

(Eq k, Hashable k) => At (HashSet k) Source # 
Instance details

Defined in Fresnel.At

Methods

at :: Index (HashSet k) -> Lens' (HashSet k) (Maybe (IxValue (HashSet k))) Source #

Ord k => At (Map k v) Source # 
Instance details

Defined in Fresnel.At

Methods

at :: Index (Map k v) -> Lens' (Map k v) (Maybe (IxValue (Map k v))) Source #

(Eq k, Hashable k) => At (HashMap k v) Source # 
Instance details

Defined in Fresnel.At

Methods

at :: Index (HashMap k v) -> Lens' (HashMap k v) (Maybe (IxValue (HashMap k v))) Source #

type family Index c Source #

Instances

Instances details
type Index IntSet Source # 
Instance details

Defined in Fresnel.Ixed

type Index [v] Source # 
Instance details

Defined in Fresnel.Ixed

type Index [v] = Int
type Index (Maybe a) Source # 
Instance details

Defined in Fresnel.Ixed

type Index (Maybe a) = ()
type Index (NonEmpty v) Source # 
Instance details

Defined in Fresnel.Ixed

type Index (NonEmpty v) = Int
type Index (IntMap v) Source # 
Instance details

Defined in Fresnel.Ixed

type Index (IntMap v) = Key
type Index (Set k) Source # 
Instance details

Defined in Fresnel.Ixed

type Index (Set k) = k
type Index (HashSet k) Source # 
Instance details

Defined in Fresnel.Ixed

type Index (HashSet k) = k
type Index (Map k v) Source # 
Instance details

Defined in Fresnel.Ixed

type Index (Map k v) = k
type Index (HashMap k v) Source # 
Instance details

Defined in Fresnel.Ixed

type Index (HashMap k v) = k

type family IxValue c Source #

Instances

Instances details
type IxValue IntSet Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue IntSet = ()
type IxValue [v] Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue [v] = v
type IxValue (Maybe a) Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue (Maybe a) = a
type IxValue (NonEmpty v) Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue (NonEmpty v) = v
type IxValue (IntMap v) Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue (IntMap v) = v
type IxValue (Set k) Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue (Set k) = ()
type IxValue (HashSet k) Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue (HashSet k) = ()
type IxValue (Map k v) Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue (Map k v) = v
type IxValue (HashMap k v) Source # 
Instance details

Defined in Fresnel.Ixed

type IxValue (HashMap k v) = v

Construction

atSet :: (Index c -> c -> Bool) -> (Index c -> c -> c) -> (Index c -> c -> c) -> Index c -> Lens' c (Maybe ()) Source #

atMap :: (Index c -> c -> Maybe (IxValue c)) -> (Index c -> IxValue c -> c -> c) -> (Index c -> c -> c) -> Index c -> Lens' c (Maybe (IxValue c)) Source #

ixAt :: At a => Index a -> Optional' a (IxValue a) Source #

Elimination

sans :: At c => Index c -> c -> c Source #