Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module Containers
include a lot of general methods for working with
containers. All methods are scattered by classes.
Synopsis
- data Set a
- data Map k a
- data IsoMap a b
- data PrismMap k a
- newtype Pair a = Pair {
- unPair :: (a, a)
- newtype Quadruple a = Quadruple {
- unQuadruple :: (a, a, a, a)
- data Index
- index :: Int -> Index
- class Sizable c where
- class Nullable c where
- class Singletonable c v | c -> v where
- singleton :: v -> c
- class Valuable c v where
- class Keyable c k | c -> k where
- class Indexable c k v | c k -> v, c v -> k where
- class Slicable c k where
- class Operable c where
- union :: c -> c -> c
- (\/) :: c -> c -> c
- (\/~) :: ASetter s t c c -> c -> s -> t
- (\/=) :: MonadState s m => ASetter s s c c -> c -> m ()
- intersection :: c -> c -> c
- (/\) :: c -> c -> c
- (/\~) :: ASetter s t c c -> c -> s -> t
- (/\=) :: MonadState s m => ASetter s s c c -> c -> m ()
- difference :: c -> c -> c
- (\\) :: c -> c -> c
- (\\~) :: ASetter s t c c -> c -> s -> t
- (\\=) :: MonadState s m => ASetter s s c c -> c -> m ()
- class Listable c v | c -> v where
- class UnsafeListable c v | c -> v where
- fromList :: [v] -> c
- class FastUnsafeListable c v | c -> v where
- fromAscList :: [v] -> c
- fromDistinctAscList :: [v] -> c
- fromDescList :: [v] -> c
- fromDistinctDescList :: [v] -> c
- class Containable c v where
- class Gunctor c1 c2 v1 v2 | c1 c2 -> v1 v2 where
- class Filterable c v where
- class Insertable c v where
- insert :: MonadFail m => v -> c -> m c
- unsafeInsert :: v -> c -> c
- (+>) :: v -> c -> c
- (<+) :: c -> v -> c
- (<+~) :: ASetter s t c c -> v -> s -> t
- (<+=) :: MonadState s m => ASetter s s c c -> v -> m ()
- class Deletable c v where
- delete :: MonadFail m => v -> c -> m c
- unsafeDelete :: v -> c -> c
- (\>) :: v -> c -> c
- (<\) :: c -> v -> c
- (<\~) :: ASetter s t c c -> v -> s -> t
- (<\=) :: MonadState s m => ASetter s s c c -> v -> m ()
Documentation
A set of values a
.
Instances
Foldable Set | Folds in order of increasing key. |
Defined in Data.Set.Internal fold :: Monoid m => Set m -> m # foldMap :: Monoid m => (a -> m) -> Set a -> m # foldMap' :: Monoid m => (a -> m) -> Set a -> m # foldr :: (a -> b -> b) -> b -> Set a -> b # foldr' :: (a -> b -> b) -> b -> Set a -> b # foldl :: (b -> a -> b) -> b -> Set a -> b # foldl' :: (b -> a -> b) -> b -> Set a -> b # foldr1 :: (a -> a -> a) -> Set a -> a # foldl1 :: (a -> a -> a) -> Set a -> a # elem :: Eq a => a -> Set a -> Bool # maximum :: Ord a => Set a -> a # | |
Eq1 Set | Since: containers-0.5.9 |
Ord1 Set | Since: containers-0.5.9 |
Defined in Data.Set.Internal | |
Show1 Set | Since: containers-0.5.9 |
Ord a => IsList (Set a) | Since: containers-0.5.6.2 |
Eq a => Eq (Set a) | |
(Data a, Ord a) => Data (Set a) | |
Defined in Data.Set.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Set a -> c (Set a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) # dataTypeOf :: Set a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) # gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r # gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # | |
Ord a => Ord (Set a) | |
(Read a, Ord a) => Read (Set a) | |
Show a => Show (Set a) | |
Ord a => Semigroup (Set a) | Since: containers-0.5.7 |
Ord a => Monoid (Set a) | |
NFData a => NFData (Set a) | |
Defined in Data.Set.Internal | |
Ord a => Contains (Set a) | |
Ord k => Ixed (Set k) | |
Defined in Control.Lens.At | |
Ord k => At (Set k) | |
Ord a => Wrapped (Set a) | |
Ord a => Operable (Set a) Source # | |
Defined in Containers union :: Set a -> Set a -> Set a Source # (\/) :: Set a -> Set a -> Set a Source # (\/~) :: ASetter s t (Set a) (Set a) -> Set a -> s -> t Source # (\/=) :: MonadState s m => ASetter s s (Set a) (Set a) -> Set a -> m () Source # intersection :: Set a -> Set a -> Set a Source # (/\) :: Set a -> Set a -> Set a Source # (/\~) :: ASetter s t (Set a) (Set a) -> Set a -> s -> t Source # (/\=) :: MonadState s m => ASetter s s (Set a) (Set a) -> Set a -> m () Source # difference :: Set a -> Set a -> Set a Source # (\\) :: Set a -> Set a -> Set a Source # (\\~) :: ASetter s t (Set a) (Set a) -> Set a -> s -> t Source # (\\=) :: MonadState s m => ASetter s s (Set a) (Set a) -> Set a -> m () Source # | |
Nullable (Set a) Source # | |
Sizable (Set a) Source # | |
(t ~ Set a', Ord a) => Rewrapped (Set a) t | Use |
Defined in Control.Lens.Wrapped | |
Ord a => Deletable (Set a) a Source # | |
Defined in Containers delete :: MonadFail m => a -> Set a -> m (Set a) Source # unsafeDelete :: a -> Set a -> Set a Source # (\>) :: a -> Set a -> Set a Source # (<\) :: Set a -> a -> Set a Source # (<\~) :: ASetter s t (Set a) (Set a) -> a -> s -> t Source # (<\=) :: MonadState s m => ASetter s s (Set a) (Set a) -> a -> m () Source # | |
Ord a => Insertable (Set a) a Source # | |
Defined in Containers insert :: MonadFail m => a -> Set a -> m (Set a) Source # unsafeInsert :: a -> Set a -> Set a Source # (+>) :: a -> Set a -> Set a Source # (<+) :: Set a -> a -> Set a Source # (<+~) :: ASetter s t (Set a) (Set a) -> a -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (Set a) (Set a) -> a -> m () Source # | |
Filterable (Set a) a Source # | |
Ord a => Containable (Set a) a Source # | |
Eq a => FastUnsafeListable (Set a) a Source # | |
Defined in Containers fromAscList :: [a] -> Set a Source # fromDistinctAscList :: [a] -> Set a Source # fromDescList :: [a] -> Set a Source # fromDistinctDescList :: [a] -> Set a Source # | |
Ord a => UnsafeListable (Set a) a Source # | |
Defined in Containers | |
Ord a => Listable (Set a) a Source # | |
Slicable (Set a) Index Source # | |
Ord a => Valuable (Set a) a Source # | |
Singletonable (Set a) a Source # | |
Defined in Containers | |
Indexable (Set a) Index a Source # | |
Ord b => Gunctor (Set a) (Set b) a b Source # | |
Slicable (Set a) (a -> Bool) Source # | |
type Item (Set a) | |
Defined in Data.Set.Internal | |
type Index (Set a) | |
Defined in Control.Lens.At | |
type IxValue (Set k) | |
Defined in Control.Lens.At | |
type Unwrapped (Set a) | |
Defined in Control.Lens.Wrapped |
A Map from keys k
to values a
.
The Semigroup
operation for Map
is union
, which prefers
values from the left operand. If m1
maps a key k
to a value
a1
, and m2
maps the same key to a different value a2
, then
their union m1 <> m2
maps k
to a1
.
Instances
Eq2 Map | Since: containers-0.5.9 |
Ord2 Map | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
Show2 Map | Since: containers-0.5.9 |
FunctorWithIndex k (Map k) | |
Defined in Control.Lens.Indexed | |
FoldableWithIndex k (Map k) | |
Defined in Control.Lens.Indexed | |
TraversableWithIndex k (Map k) | |
Defined in Control.Lens.Indexed itraverse :: Applicative f => (k -> a -> f b) -> Map k a -> f (Map k b) # itraversed :: IndexedTraversal k (Map k a) (Map k b) a b # | |
Ord k => TraverseMin k (Map k) | |
Defined in Control.Lens.Traversal traverseMin :: IndexedTraversal' k (Map k v) v # | |
Ord k => TraverseMax k (Map k) | |
Defined in Control.Lens.Traversal traverseMax :: IndexedTraversal' k (Map k v) v # | |
Functor (Map k) | |
Foldable (Map k) | Folds in order of increasing key. |
Defined in Data.Map.Internal fold :: Monoid m => Map k m -> m # foldMap :: Monoid m => (a -> m) -> Map k a -> m # foldMap' :: Monoid m => (a -> m) -> Map k a -> m # foldr :: (a -> b -> b) -> b -> Map k a -> b # foldr' :: (a -> b -> b) -> b -> Map k a -> b # foldl :: (b -> a -> b) -> b -> Map k a -> b # foldl' :: (b -> a -> b) -> b -> Map k a -> b # foldr1 :: (a -> a -> a) -> Map k a -> a # foldl1 :: (a -> a -> a) -> Map k a -> a # elem :: Eq a => a -> Map k a -> Bool # maximum :: Ord a => Map k a -> a # minimum :: Ord a => Map k a -> a # | |
Traversable (Map k) | Traverses in order of increasing key. |
Eq k => Eq1 (Map k) | Since: containers-0.5.9 |
Ord k => Ord1 (Map k) | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
(Ord k, Read k) => Read1 (Map k) | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
Show k => Show1 (Map k) | Since: containers-0.5.9 |
Ord k => IsList (Map k v) | Since: containers-0.5.6.2 |
(Eq k, Eq a) => Eq (Map k a) | |
(Data k, Data a, Ord k) => Data (Map k a) | |
Defined in Data.Map.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k a -> c (Map k a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) # toConstr :: Map k a -> Constr # dataTypeOf :: Map k a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) # gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r # gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # | |
(Ord k, Ord v) => Ord (Map k v) | |
(Ord k, Read k, Read e) => Read (Map k e) | |
(Show k, Show a) => Show (Map k a) | |
Ord k => Semigroup (Map k v) | |
Ord k => Monoid (Map k v) | |
(NFData k, NFData a) => NFData (Map k a) | |
Defined in Data.Map.Internal | |
Ord k => Ixed (Map k a) | |
Defined in Control.Lens.At | |
Ord k => At (Map k a) | |
Ord k => Wrapped (Map k a) | |
Ord k => Operable (Map k a) Source # | |
Defined in Containers union :: Map k a -> Map k a -> Map k a Source # (\/) :: Map k a -> Map k a -> Map k a Source # (\/~) :: ASetter s t (Map k a) (Map k a) -> Map k a -> s -> t Source # (\/=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> Map k a -> m () Source # intersection :: Map k a -> Map k a -> Map k a Source # (/\) :: Map k a -> Map k a -> Map k a Source # (/\~) :: ASetter s t (Map k a) (Map k a) -> Map k a -> s -> t Source # (/\=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> Map k a -> m () Source # difference :: Map k a -> Map k a -> Map k a Source # (\\) :: Map k a -> Map k a -> Map k a Source # (\\~) :: ASetter s t (Map k a) (Map k a) -> Map k a -> s -> t Source # (\\=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> Map k a -> m () Source # | |
Nullable (Map k a) Source # | |
Sizable (Map k a) Source # | |
(t ~ Map k' a', Ord k) => Rewrapped (Map k a) t | Use |
Defined in Control.Lens.Wrapped | |
Ord k => Deletable (Map k a) k Source # | |
Defined in Containers delete :: MonadFail m => k -> Map k a -> m (Map k a) Source # unsafeDelete :: k -> Map k a -> Map k a Source # (\>) :: k -> Map k a -> Map k a Source # (<\) :: Map k a -> k -> Map k a Source # (<\~) :: ASetter s t (Map k a) (Map k a) -> k -> s -> t Source # (<\=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> k -> m () Source # | |
Filterable (Map k a) a Source # | |
Filterable (Map k a) k Source # | |
Eq a => Containable (Map k a) a Source # | |
Ord k => Containable (Map k a) k Source # | |
Ord k => Keyable (Map k a) k Source # | |
Valuable (Map k a) a Source # | |
Ord k => Indexable (Map k a) k a Source # | |
(Ord k, Eq a) => Insertable (Map k a) (k, a) Source # | |
Defined in Containers insert :: MonadFail m => (k, a) -> Map k a -> m (Map k a) Source # unsafeInsert :: (k, a) -> Map k a -> Map k a Source # (+>) :: (k, a) -> Map k a -> Map k a Source # (<+) :: Map k a -> (k, a) -> Map k a Source # (<+~) :: ASetter s t (Map k a) (Map k a) -> (k, a) -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> (k, a) -> m () Source # | |
Filterable (Map k a) (k, a) Source # | |
Defined in Containers | |
(Ord k, Eq a) => Containable (Map k a) (k, a) Source # | |
Eq k => FastUnsafeListable (Map k a) (k, a) Source # | |
Defined in Containers fromAscList :: [(k, a)] -> Map k a Source # fromDistinctAscList :: [(k, a)] -> Map k a Source # fromDescList :: [(k, a)] -> Map k a Source # fromDistinctDescList :: [(k, a)] -> Map k a Source # | |
Ord k => UnsafeListable (Map k a) (k, a) Source # | |
Defined in Containers | |
Ord k => Listable (Map k a) (k, a) Source # | |
Singletonable (Map k a) (k, a) Source # | |
Defined in Containers | |
c ~ d => Each (Map c a) (Map d b) a b |
|
Gunctor (Map k a) (Map k b) a b Source # | |
Ord l => Gunctor (Map k a) (Map l a) k l Source # | |
type Item (Map k v) | |
Defined in Data.Map.Internal | |
type Index (Map k a) | |
Defined in Control.Lens.At | |
type IxValue (Map k a) | |
Defined in Control.Lens.At | |
type Unwrapped (Map k a) | |
Defined in Control.Lens.Wrapped |
Instances
(Eq a, Eq b) => Eq (IsoMap a b) Source # | |
(Show a, Show b) => Show (IsoMap a b) Source # | |
Nullable (IsoMap a b) Source # | |
Sizable (IsoMap a b) Source # | |
(Ord a, Ord b) => Deletable (IsoMap a b) b Source # | |
Defined in Containers delete :: MonadFail m => b -> IsoMap a b -> m (IsoMap a b) Source # unsafeDelete :: b -> IsoMap a b -> IsoMap a b Source # (\>) :: b -> IsoMap a b -> IsoMap a b Source # (<\) :: IsoMap a b -> b -> IsoMap a b Source # (<\~) :: ASetter s t (IsoMap a b) (IsoMap a b) -> b -> s -> t Source # (<\=) :: MonadState s m => ASetter s s (IsoMap a b) (IsoMap a b) -> b -> m () Source # | |
(Ord a, Ord b) => Deletable (IsoMap a b) a Source # | |
Defined in Containers delete :: MonadFail m => a -> IsoMap a b -> m (IsoMap a b) Source # unsafeDelete :: a -> IsoMap a b -> IsoMap a b Source # (\>) :: a -> IsoMap a b -> IsoMap a b Source # (<\) :: IsoMap a b -> a -> IsoMap a b Source # (<\~) :: ASetter s t (IsoMap a b) (IsoMap a b) -> a -> s -> t Source # (<\=) :: MonadState s m => ASetter s s (IsoMap a b) (IsoMap a b) -> a -> m () Source # | |
(Ord a, Ord b) => Filterable (IsoMap a b) b Source # | |
Defined in Containers | |
(Ord a, Ord b) => Filterable (IsoMap a b) a Source # | |
Defined in Containers | |
(Ord a, Ord b) => Containable (IsoMap a b) b Source # | |
(Ord a, Ord b) => Containable (IsoMap a b) a Source # | |
(Ord a, Ord b) => Valuable (IsoMap a b) b Source # | |
(Ord a, Ord b) => Valuable (IsoMap a b) a Source # | |
(Ord a, Ord b) => Iso (IsoMap a b) b a Source # | |
Defined in Containers.IsoMap (~$) :: MonadFail m => IsoMap a b -> b -> m a Source # (~&) :: MonadFail m => b -> IsoMap a b -> m a Source # values :: IsoMap a b -> Set b Source # member :: b -> IsoMap a b -> Bool Source # filter :: (b -> Bool) -> IsoMap a b -> IsoMap a b Source # insert :: MonadFail m => (b, a) -> IsoMap a b -> m (IsoMap a b) Source # delete :: b -> IsoMap a b -> IsoMap a b Source # toMap :: IsoMap a b -> Map b a Source # fromList :: MonadFail m => [(b, a)] -> m (IsoMap a b) Source # fromList' :: [(b, a)] -> IsoMap a b Source # | |
(Ord a, Ord b) => Iso (IsoMap a b) a b Source # | |
Defined in Containers.IsoMap (~$) :: MonadFail m => IsoMap a b -> a -> m b Source # (~&) :: MonadFail m => a -> IsoMap a b -> m b Source # values :: IsoMap a b -> Set a Source # member :: a -> IsoMap a b -> Bool Source # filter :: (a -> Bool) -> IsoMap a b -> IsoMap a b Source # insert :: MonadFail m => (a, b) -> IsoMap a b -> m (IsoMap a b) Source # delete :: a -> IsoMap a b -> IsoMap a b Source # toMap :: IsoMap a b -> Map a b Source # fromList :: MonadFail m => [(a, b)] -> m (IsoMap a b) Source # fromList' :: [(a, b)] -> IsoMap a b Source # | |
(Ord a, Ord b) => Indexable (IsoMap a b) b a Source # | |
(Ord a, Ord b) => Indexable (IsoMap a b) a b Source # | |
(Ord a, Ord b) => Insertable (IsoMap a b) (b, a) Source # | |
Defined in Containers insert :: MonadFail m => (b, a) -> IsoMap a b -> m (IsoMap a b) Source # unsafeInsert :: (b, a) -> IsoMap a b -> IsoMap a b Source # (+>) :: (b, a) -> IsoMap a b -> IsoMap a b Source # (<+) :: IsoMap a b -> (b, a) -> IsoMap a b Source # (<+~) :: ASetter s t (IsoMap a b) (IsoMap a b) -> (b, a) -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (IsoMap a b) (IsoMap a b) -> (b, a) -> m () Source # | |
(Ord a, Ord b) => Insertable (IsoMap a b) (a, b) Source # | |
Defined in Containers insert :: MonadFail m => (a, b) -> IsoMap a b -> m (IsoMap a b) Source # unsafeInsert :: (a, b) -> IsoMap a b -> IsoMap a b Source # (+>) :: (a, b) -> IsoMap a b -> IsoMap a b Source # (<+) :: IsoMap a b -> (a, b) -> IsoMap a b Source # (<+~) :: ASetter s t (IsoMap a b) (IsoMap a b) -> (a, b) -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (IsoMap a b) (IsoMap a b) -> (a, b) -> m () Source # | |
(Ord a, Ord b) => UnsafeListable (IsoMap a b) (a, b) Source # | |
Defined in Containers | |
(Ord a, Ord b) => Listable (IsoMap a b) (a, b) Source # | |
(Ord a, Ord b) => Singletonable (IsoMap a b) (a, b) Source # | |
Defined in Containers | |
Ord b2 => Gunctor (IsoMap a b1) (IsoMap b2 a) b1 b2 Source # | |
Ord a2 => Gunctor (IsoMap a1 b) (IsoMap b a2) a1 a2 Source # | |
Ord b2 => Gunctor (IsoMap a b1) (IsoMap a b2) b1 b2 Source # | |
Ord a2 => Gunctor (IsoMap a1 b) (IsoMap a2 b) a1 a2 Source # | |
Instances
Instances
Functor Pair Source # | |
Applicative Pair Source # | |
Foldable Pair Source # | |
Defined in Containers.Pair fold :: Monoid m => Pair m -> m # foldMap :: Monoid m => (a -> m) -> Pair a -> m # foldMap' :: Monoid m => (a -> m) -> Pair a -> m # foldr :: (a -> b -> b) -> b -> Pair a -> b # foldr' :: (a -> b -> b) -> b -> Pair a -> b # foldl :: (b -> a -> b) -> b -> Pair a -> b # foldl' :: (b -> a -> b) -> b -> Pair a -> b # foldr1 :: (a -> a -> a) -> Pair a -> a # foldl1 :: (a -> a -> a) -> Pair a -> a # elem :: Eq a => a -> Pair a -> Bool # maximum :: Ord a => Pair a -> a # | |
Traversable Pair Source # | |
Eq a => Eq (Pair a) Source # | |
Ord a => Ord (Pair a) Source # | |
Sizable (Pair a) Source # | |
Eq a => Containable (Pair a) a Source # | |
Listable (Pair a) a Source # | |
Keyable (Pair a) Index Source # | |
Valuable (Pair a) a Source # | |
Indexable (Pair a) Index a Source # | |
Each (Pair a) (Pair b) a b Source # | |
Quadruple | |
|
Instances
Instances
Enum Index Source # | |
Eq Index Source # | |
Num Index Source # | |
Ord Index Source # | |
Deletable [a] Index Source # | |
Defined in Containers | |
Containable [a] Index Source # | |
Slicable [a] Index Source # | |
Slicable (Set a) Index Source # | |
Keyable [a] Index Source # | |
Keyable (Pair a) Index Source # | |
Keyable (Quadruple a) Index Source # | |
Eq a => Indexable [a] a Index Source # | |
Indexable [a] Index a Source # | |
Indexable (Set a) Index a Source # | |
Indexable (Pair a) Index a Source # | |
Indexable (Quadruple a) Index a Source # | |
class Singletonable c v | c -> v where Source #
Instances
Singletonable [a] a Source # | |
Defined in Containers | |
Singletonable (Set a) a Source # | |
Defined in Containers | |
Singletonable (Map k a) (k, a) Source # | |
Defined in Containers | |
(Ord a, Ord b) => Singletonable (IsoMap a b) (a, b) Source # | |
Defined in Containers | |
Singletonable (PrismMap k a) (k, a) Source # | |
Defined in Containers |
class Valuable c v where Source #
Nothing
Instances
class Keyable c k | c -> k where Source #
Nothing
class Indexable c k v | c k -> v, c v -> k where Source #
Nothing
(!?) :: MonadFail m => c -> k -> m v infixl 9 Source #
(!<>) :: c -> k -> Set v infixl 9 Source #
(.@) :: MonadFail m => Getting x y c -> k -> Getting x y (m v) infixr 9 Source #
(.<@>) :: Getting x y c -> k -> Getting x y (Set v) infixr 9 Source #
Instances
Eq a => Indexable [a] a Index Source # | |
Indexable [a] Index a Source # | |
Indexable (Set a) Index a Source # | |
Indexable (Pair a) Index a Source # | |
Indexable (Quadruple a) Index a Source # | |
Ord k => Indexable (Map k a) k a Source # | |
(Ord a, Ord b) => Indexable (IsoMap a b) b a Source # | |
(Ord a, Ord b) => Indexable (IsoMap a b) a b Source # | |
Ord a => Indexable (PrismMap k a) a k Source # | |
Ord k => Indexable (PrismMap k a) k a Source # | |
class Operable c where Source #
(\/) :: c -> c -> c infixl 5 Source #
(\/~) :: ASetter s t c c -> c -> s -> t infixr 4 Source #
(\/=) :: MonadState s m => ASetter s s c c -> c -> m () infix 4 Source #
intersection :: c -> c -> c Source #
(/\) :: c -> c -> c infixl 5 Source #
(/\~) :: ASetter s t c c -> c -> s -> t infixr 4 Source #
(/\=) :: MonadState s m => ASetter s s c c -> c -> m () infix 4 Source #
difference :: c -> c -> c Source #
(\\) :: c -> c -> c infixl 5 Source #
(\\~) :: ASetter s t c c -> c -> s -> t infixr 4 Source #
(\\=) :: MonadState s m => ASetter s s c c -> c -> m () infix 4 Source #
Instances
Eq a => Operable [a] Source # | |
Defined in Containers union :: [a] -> [a] -> [a] Source # (\/) :: [a] -> [a] -> [a] Source # (\/~) :: ASetter s t [a] [a] -> [a] -> s -> t Source # (\/=) :: MonadState s m => ASetter s s [a] [a] -> [a] -> m () Source # intersection :: [a] -> [a] -> [a] Source # (/\) :: [a] -> [a] -> [a] Source # (/\~) :: ASetter s t [a] [a] -> [a] -> s -> t Source # (/\=) :: MonadState s m => ASetter s s [a] [a] -> [a] -> m () Source # difference :: [a] -> [a] -> [a] Source # (\\) :: [a] -> [a] -> [a] Source # (\\~) :: ASetter s t [a] [a] -> [a] -> s -> t Source # (\\=) :: MonadState s m => ASetter s s [a] [a] -> [a] -> m () Source # | |
Ord a => Operable (Set a) Source # | |
Defined in Containers union :: Set a -> Set a -> Set a Source # (\/) :: Set a -> Set a -> Set a Source # (\/~) :: ASetter s t (Set a) (Set a) -> Set a -> s -> t Source # (\/=) :: MonadState s m => ASetter s s (Set a) (Set a) -> Set a -> m () Source # intersection :: Set a -> Set a -> Set a Source # (/\) :: Set a -> Set a -> Set a Source # (/\~) :: ASetter s t (Set a) (Set a) -> Set a -> s -> t Source # (/\=) :: MonadState s m => ASetter s s (Set a) (Set a) -> Set a -> m () Source # difference :: Set a -> Set a -> Set a Source # (\\) :: Set a -> Set a -> Set a Source # (\\~) :: ASetter s t (Set a) (Set a) -> Set a -> s -> t Source # (\\=) :: MonadState s m => ASetter s s (Set a) (Set a) -> Set a -> m () Source # | |
Ord k => Operable (Map k a) Source # | |
Defined in Containers union :: Map k a -> Map k a -> Map k a Source # (\/) :: Map k a -> Map k a -> Map k a Source # (\/~) :: ASetter s t (Map k a) (Map k a) -> Map k a -> s -> t Source # (\/=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> Map k a -> m () Source # intersection :: Map k a -> Map k a -> Map k a Source # (/\) :: Map k a -> Map k a -> Map k a Source # (/\~) :: ASetter s t (Map k a) (Map k a) -> Map k a -> s -> t Source # (/\=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> Map k a -> m () Source # difference :: Map k a -> Map k a -> Map k a Source # (\\) :: Map k a -> Map k a -> Map k a Source # (\\~) :: ASetter s t (Map k a) (Map k a) -> Map k a -> s -> t Source # (\\=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> Map k a -> m () Source # | |
(Ord k, Ord a) => Operable (PrismMap k a) Source # | |
Defined in Containers union :: PrismMap k a -> PrismMap k a -> PrismMap k a Source # (\/) :: PrismMap k a -> PrismMap k a -> PrismMap k a Source # (\/~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> PrismMap k a -> s -> t Source # (\/=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> PrismMap k a -> m () Source # intersection :: PrismMap k a -> PrismMap k a -> PrismMap k a Source # (/\) :: PrismMap k a -> PrismMap k a -> PrismMap k a Source # (/\~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> PrismMap k a -> s -> t Source # (/\=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> PrismMap k a -> m () Source # difference :: PrismMap k a -> PrismMap k a -> PrismMap k a Source # (\\) :: PrismMap k a -> PrismMap k a -> PrismMap k a Source # (\\~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> PrismMap k a -> s -> t Source # (\\=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> PrismMap k a -> m () Source # |
class Listable c v | c -> v where Source #
Nothing
fromList_ :: MonadFail m => [v] -> m c Source #
default fromList_ :: (UnsafeListable c v, MonadFail m) => [v] -> m c Source #
class UnsafeListable c v | c -> v where Source #
Instances
UnsafeListable [a] a Source # | |
Defined in Containers | |
Ord a => UnsafeListable (Set a) a Source # | |
Defined in Containers | |
Ord k => UnsafeListable (Map k a) (k, a) Source # | |
Defined in Containers | |
(Ord a, Ord b) => UnsafeListable (IsoMap a b) (a, b) Source # | |
Defined in Containers | |
(Ord k, Ord a) => UnsafeListable (PrismMap k a) (k, a) Source # | |
Defined in Containers |
class FastUnsafeListable c v | c -> v where Source #
fromAscList :: [v] -> c Source #
fromDistinctAscList :: [v] -> c Source #
fromDescList :: [v] -> c Source #
fromDistinctDescList :: [v] -> c Source #
Instances
Eq a => FastUnsafeListable (Set a) a Source # | |
Defined in Containers fromAscList :: [a] -> Set a Source # fromDistinctAscList :: [a] -> Set a Source # fromDescList :: [a] -> Set a Source # fromDistinctDescList :: [a] -> Set a Source # | |
Eq k => FastUnsafeListable (Map k a) (k, a) Source # | |
Defined in Containers fromAscList :: [(k, a)] -> Map k a Source # fromDistinctAscList :: [(k, a)] -> Map k a Source # fromDescList :: [(k, a)] -> Map k a Source # fromDistinctDescList :: [(k, a)] -> Map k a Source # |
class Containable c v where Source #
Nothing
Instances
Containable [a] Index Source # | |
Eq a => Containable [a] a Source # | |
Ord a => Containable (Set a) a Source # | |
Eq a => Containable (Pair a) a Source # | |
Eq a => Containable (Quadruple a) a Source # | |
Eq a => Containable (Map k a) a Source # | |
Ord k => Containable (Map k a) k Source # | |
(Ord a, Ord b) => Containable (IsoMap a b) b Source # | |
(Ord a, Ord b) => Containable (IsoMap a b) a Source # | |
Ord a => Containable (PrismMap k a) a Source # | |
Ord k => Containable (PrismMap k a) k Source # | |
(Ord k, Eq a) => Containable (Map k a) (k, a) Source # | |
(Ord k, Ord a) => Containable (PrismMap k a) (k, a) Source # | |
class Gunctor c1 c2 v1 v2 | c1 c2 -> v1 v2 where Source #
Nothing
Instances
Ord b => Gunctor (Set a) (Set b) a b Source # | |
Gunctor (Map k a) (Map k b) a b Source # | |
Ord l => Gunctor (Map k a) (Map l a) k l Source # | |
Ord b2 => Gunctor (IsoMap a b1) (IsoMap b2 a) b1 b2 Source # | |
Ord a2 => Gunctor (IsoMap a1 b) (IsoMap b a2) a1 a2 Source # | |
Ord b2 => Gunctor (IsoMap a b1) (IsoMap a b2) b1 b2 Source # | |
Ord a2 => Gunctor (IsoMap a1 b) (IsoMap a2 b) a1 a2 Source # | |
Ord b => Gunctor (PrismMap k a) (PrismMap k b) a b Source # | |
Ord l => Gunctor (PrismMap k a) (PrismMap l a) k l Source # | |
class Filterable c v where Source #
filterC :: (v -> Bool) -> c -> c Source #
(<?>) :: (v -> Bool) -> c -> c infix 4 Source #
(<?>~) :: ASetter s t c c -> (v -> Bool) -> s -> t infixr 4 Source #
(<?>=) :: MonadState s m => ASetter s s c c -> (v -> Bool) -> m () infix 4 Source #
Instances
class Insertable c v where Source #
Nothing
insert :: MonadFail m => v -> c -> m c Source #
default insert :: (Containable c v, MonadFail m) => v -> c -> m c Source #
unsafeInsert :: v -> c -> c Source #
(+>) :: v -> c -> c infixr 7 Source #
(<+) :: c -> v -> c infixl 6 Source #
(<+~) :: ASetter s t c c -> v -> s -> t infixr 4 Source #
(<+=) :: MonadState s m => ASetter s s c c -> v -> m () infix 4 Source #
Instances
Insertable Title Char Source # | |
Defined in ShowInfo insert :: MonadFail m => Char -> Title -> m Title Source # unsafeInsert :: Char -> Title -> Title Source # (+>) :: Char -> Title -> Title Source # (<+) :: Title -> Char -> Title Source # (<+~) :: ASetter s t Title Title -> Char -> s -> t Source # (<+=) :: MonadState s m => ASetter s s Title Title -> Char -> m () Source # | |
Insertable [a] a Source # | |
Ord a => Insertable (Set a) a Source # | |
Defined in Containers insert :: MonadFail m => a -> Set a -> m (Set a) Source # unsafeInsert :: a -> Set a -> Set a Source # (+>) :: a -> Set a -> Set a Source # (<+) :: Set a -> a -> Set a Source # (<+~) :: ASetter s t (Set a) (Set a) -> a -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (Set a) (Set a) -> a -> m () Source # | |
(Ord k, Eq a) => Insertable (Map k a) (k, a) Source # | |
Defined in Containers insert :: MonadFail m => (k, a) -> Map k a -> m (Map k a) Source # unsafeInsert :: (k, a) -> Map k a -> Map k a Source # (+>) :: (k, a) -> Map k a -> Map k a Source # (<+) :: Map k a -> (k, a) -> Map k a Source # (<+~) :: ASetter s t (Map k a) (Map k a) -> (k, a) -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (Map k a) (Map k a) -> (k, a) -> m () Source # | |
(Ord a, Ord b) => Insertable (IsoMap a b) (b, a) Source # | |
Defined in Containers insert :: MonadFail m => (b, a) -> IsoMap a b -> m (IsoMap a b) Source # unsafeInsert :: (b, a) -> IsoMap a b -> IsoMap a b Source # (+>) :: (b, a) -> IsoMap a b -> IsoMap a b Source # (<+) :: IsoMap a b -> (b, a) -> IsoMap a b Source # (<+~) :: ASetter s t (IsoMap a b) (IsoMap a b) -> (b, a) -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (IsoMap a b) (IsoMap a b) -> (b, a) -> m () Source # | |
(Ord a, Ord b) => Insertable (IsoMap a b) (a, b) Source # | |
Defined in Containers insert :: MonadFail m => (a, b) -> IsoMap a b -> m (IsoMap a b) Source # unsafeInsert :: (a, b) -> IsoMap a b -> IsoMap a b Source # (+>) :: (a, b) -> IsoMap a b -> IsoMap a b Source # (<+) :: IsoMap a b -> (a, b) -> IsoMap a b Source # (<+~) :: ASetter s t (IsoMap a b) (IsoMap a b) -> (a, b) -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (IsoMap a b) (IsoMap a b) -> (a, b) -> m () Source # | |
(Ord k, Ord a) => Insertable (PrismMap k a) (k, a) Source # | |
Defined in Containers insert :: MonadFail m => (k, a) -> PrismMap k a -> m (PrismMap k a) Source # unsafeInsert :: (k, a) -> PrismMap k a -> PrismMap k a Source # (+>) :: (k, a) -> PrismMap k a -> PrismMap k a Source # (<+) :: PrismMap k a -> (k, a) -> PrismMap k a Source # (<+~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> (k, a) -> s -> t Source # (<+=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> (k, a) -> m () Source # |
class Deletable c v where Source #
Nothing
delete :: MonadFail m => v -> c -> m c Source #
default delete :: (Containable c v, MonadFail m) => v -> c -> m c Source #
unsafeDelete :: v -> c -> c Source #
(\>) :: v -> c -> c infixr 7 Source #
(<\) :: c -> v -> c infixl 6 Source #
(<\~) :: ASetter s t c c -> v -> s -> t infixr 4 Source #
(<\=) :: MonadState s m => ASetter s s c c -> v -> m () infix 4 Source #