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

Fresnel.Ixed

Synopsis

Indexable collections

class Ixed c where Source #

Associated Types

type Index c Source #

type IxValue c Source #

Methods

ix :: Index c -> Optional' c (IxValue c) Source #

Instances

Instances details
Ixed IntSet Source # 
Instance details

Defined in Fresnel.Ixed

Associated Types

type Index IntSet 
Instance details

Defined in Fresnel.Ixed

type IxValue IntSet 
Instance details

Defined in Fresnel.Ixed

type IxValue IntSet = ()
Ixed (IntMap v) Source # 
Instance details

Defined in Fresnel.Ixed

Associated Types

type Index (IntMap v) 
Instance details

Defined in Fresnel.Ixed

type Index (IntMap v) = Key
type IxValue (IntMap v) 
Instance details

Defined in Fresnel.Ixed

type IxValue (IntMap v) = v

Methods

ix :: Index (IntMap v) -> Optional' (IntMap v) (IxValue (IntMap v)) Source #

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

Defined in Fresnel.Ixed

Associated Types

type Index (Set k) 
Instance details

Defined in Fresnel.Ixed

type Index (Set k) = k
type IxValue (Set k) 
Instance details

Defined in Fresnel.Ixed

type IxValue (Set k) = ()

Methods

ix :: Index (Set k) -> Optional' (Set k) (IxValue (Set k)) Source #

Ixed (NonEmpty v) Source # 
Instance details

Defined in Fresnel.Ixed

Associated Types

type Index (NonEmpty v) 
Instance details

Defined in Fresnel.Ixed

type Index (NonEmpty v) = Int
type IxValue (NonEmpty v) 
Instance details

Defined in Fresnel.Ixed

type IxValue (NonEmpty v) = v
Hashable k => Ixed (HashSet k) Source # 
Instance details

Defined in Fresnel.Ixed

Associated Types

type Index (HashSet k) 
Instance details

Defined in Fresnel.Ixed

type Index (HashSet k) = k
type IxValue (HashSet k) 
Instance details

Defined in Fresnel.Ixed

type IxValue (HashSet k) = ()

Methods

ix :: Index (HashSet k) -> Optional' (HashSet k) (IxValue (HashSet k)) Source #

Ixed (Maybe a) Source # 
Instance details

Defined in Fresnel.Ixed

Associated Types

type Index (Maybe a) 
Instance details

Defined in Fresnel.Ixed

type Index (Maybe a) = ()
type IxValue (Maybe a) 
Instance details

Defined in Fresnel.Ixed

type IxValue (Maybe a) = a

Methods

ix :: Index (Maybe a) -> Optional' (Maybe a) (IxValue (Maybe a)) Source #

Ixed [v] Source # 
Instance details

Defined in Fresnel.Ixed

Associated Types

type Index [v] 
Instance details

Defined in Fresnel.Ixed

type Index [v] = Int
type IxValue [v] 
Instance details

Defined in Fresnel.Ixed

type IxValue [v] = v

Methods

ix :: Index [v] -> Optional' [v] (IxValue [v]) Source #

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

Defined in Fresnel.Ixed

Associated Types

type Index (Map k v) 
Instance details

Defined in Fresnel.Ixed

type Index (Map k v) = k
type IxValue (Map k v) 
Instance details

Defined in Fresnel.Ixed

type IxValue (Map k v) = v

Methods

ix :: Index (Map k v) -> Optional' (Map k v) (IxValue (Map k v)) Source #

Hashable k => Ixed (HashMap k v) Source # 
Instance details

Defined in Fresnel.Ixed

Associated Types

type Index (HashMap k v) 
Instance details

Defined in Fresnel.Ixed

type Index (HashMap k v) = k
type IxValue (HashMap k v) 
Instance details

Defined in Fresnel.Ixed

type IxValue (HashMap k v) = v

Methods

ix :: Index (HashMap k v) -> Optional' (HashMap k v) (IxValue (HashMap k v)) Source #

Construction

ixSet :: (Index c -> c -> Bool) -> (Index c -> c -> c) -> Index c -> Optional' c () Source #

ixMap :: (Index c -> c -> Maybe (IxValue c)) -> (Index c -> IxValue c -> c -> c) -> Index c -> Optional' c (IxValue c) Source #