Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
This module reexports all container related stuff from Prelude
.
Synopsis
Documentation
class Eq a => Hashable a where #
The class of types that can be converted to a hash value.
Minimal implementation: hashWithSalt
.
Note: the hash is not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.
If you are looking for Hashable
instance in time
package,
check time-compat
Nothing
hashWithSalt :: Int -> a -> Int infixl 0 #
Return a hash value for the argument, using the given salt.
The general contract of hashWithSalt
is:
- If two values are equal according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce the same integer result if the same salt is used in each case. - It is not required that if two values are unequal
according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal values may improve the performance of hashing-based data structures. - This method can be used to compute different hash values for
the same input by providing a different salt in each
application of the method. This implies that any instance
that defines
hashWithSalt
must make use of the salt in its implementation. hashWithSalt
may return negativeInt
values.
Instances
A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.
Instances
Bifoldable HashMap | Since: unordered-containers-0.2.11 |
Eq2 HashMap | |
Ord2 HashMap | |
Defined in Data.HashMap.Internal | |
Show2 HashMap | |
NFData2 HashMap | Since: unordered-containers-0.2.14.0 |
Defined in Data.HashMap.Internal | |
Hashable2 HashMap | |
Defined in Data.HashMap.Internal | |
(Lift k, Lift v) => Lift (HashMap k v :: Type) | Since: unordered-containers-0.2.17.0 |
Functor (HashMap k) | |
Foldable (HashMap k) | |
Defined in Data.HashMap.Internal fold :: Monoid m => HashMap k m -> m # foldMap :: Monoid m => (a -> m) -> HashMap k a -> m # foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m # foldr :: (a -> b -> b) -> b -> HashMap k a -> b # foldr' :: (a -> b -> b) -> b -> HashMap k a -> b # foldl :: (b -> a -> b) -> b -> HashMap k a -> b # foldl' :: (b -> a -> b) -> b -> HashMap k a -> b # foldr1 :: (a -> a -> a) -> HashMap k a -> a # foldl1 :: (a -> a -> a) -> HashMap k a -> a # toList :: HashMap k a -> [a] # length :: HashMap k a -> Int # elem :: Eq a => a -> HashMap k a -> Bool # maximum :: Ord a => HashMap k a -> a # minimum :: Ord a => HashMap k a -> a # | |
Traversable (HashMap k) | |
Eq k => Eq1 (HashMap k) | |
Ord k => Ord1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
(Eq k, Hashable k, Read k) => Read1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
Show k => Show1 (HashMap k) | |
NFData k => NFData1 (HashMap k) | Since: unordered-containers-0.2.14.0 |
Defined in Data.HashMap.Internal | |
Hashable k => Hashable1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
(Eq k, Hashable k) => IsList (HashMap k v) | |
(Eq k, Eq v) => Eq (HashMap k v) | Note that, in the presence of hash collisions, equal
In general, the lack of substitutivity can be observed with any function that depends on the key ordering, such as folds and traversals. |
(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) | |
Defined in Data.HashMap.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) # toConstr :: HashMap k v -> Constr # dataTypeOf :: HashMap k v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) # gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # | |
(Ord k, Ord v) => Ord (HashMap k v) | The ordering is total and consistent with the |
Defined in Data.HashMap.Internal | |
(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) | |
(Show k, Show v) => Show (HashMap k v) | |
(Eq k, Hashable k) => Semigroup (HashMap k v) | If a key occurs in both maps, the mapping from the first will be the mapping in the result. Examples
|
(Eq k, Hashable k) => Monoid (HashMap k v) | If a key occurs in both maps, the mapping from the first will be the mapping in the result. Examples
|
(NFData k, NFData v) => NFData (HashMap k v) | |
Defined in Data.HashMap.Internal | |
(Hashable k, Hashable v) => Hashable (HashMap k v) | |
Defined in Data.HashMap.Internal | |
Hashable k => One (HashMap k v) Source # | |
Container (HashMap k v) Source # | |
Defined in Universum.Container.Class toList :: HashMap k v -> [Element (HashMap k v)] Source # null :: HashMap k v -> Bool Source # foldr :: (Element (HashMap k v) -> b -> b) -> b -> HashMap k v -> b Source # foldl :: (b -> Element (HashMap k v) -> b) -> b -> HashMap k v -> b Source # foldl' :: (b -> Element (HashMap k v) -> b) -> b -> HashMap k v -> b Source # length :: HashMap k v -> Int Source # elem :: Element (HashMap k v) -> HashMap k v -> Bool Source # foldMap :: Monoid m => (Element (HashMap k v) -> m) -> HashMap k v -> m Source # fold :: HashMap k v -> Element (HashMap k v) Source # foldr' :: (Element (HashMap k v) -> b -> b) -> b -> HashMap k v -> b Source # notElem :: Element (HashMap k v) -> HashMap k v -> Bool Source # all :: (Element (HashMap k v) -> Bool) -> HashMap k v -> Bool Source # any :: (Element (HashMap k v) -> Bool) -> HashMap k v -> Bool Source # and :: HashMap k v -> Bool Source # or :: HashMap k v -> Bool Source # find :: (Element (HashMap k v) -> Bool) -> HashMap k v -> Maybe (Element (HashMap k v)) Source # safeHead :: HashMap k v -> Maybe (Element (HashMap k v)) Source # safeMaximum :: HashMap k v -> Maybe (Element (HashMap k v)) Source # safeMinimum :: HashMap k v -> Maybe (Element (HashMap k v)) Source # safeFoldr1 :: (Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> Maybe (Element (HashMap k v)) Source # safeFoldl1 :: (Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> Maybe (Element (HashMap k v)) Source # | |
(Eq k, Hashable k) => FromList (HashMap k v) Source # | |
Defined in Universum.Container.Class | |
ToPairs (HashMap k v) Source # | |
type Item (HashMap k v) | |
Defined in Data.HashMap.Internal | |
type OneItem (HashMap k v) Source # | |
Defined in Universum.Container.Class | |
type Element (HashMap k v) Source # | |
Defined in Universum.Container.Class | |
type ListElement (HashMap k v) Source # | |
Defined in Universum.Container.Class | |
type FromListC (HashMap k v) Source # | |
Defined in Universum.Container.Class | |
type Key (HashMap k v) Source # | |
Defined in Universum.Container.Class | |
type Val (HashMap k v) Source # | |
Defined in Universum.Container.Class |
A set of values. A set cannot contain duplicate values.
Instances
Foldable HashSet | |
Defined in Data.HashSet.Internal fold :: Monoid m => HashSet m -> m # foldMap :: Monoid m => (a -> m) -> HashSet a -> m # foldMap' :: Monoid m => (a -> m) -> HashSet a -> m # foldr :: (a -> b -> b) -> b -> HashSet a -> b # foldr' :: (a -> b -> b) -> b -> HashSet a -> b # foldl :: (b -> a -> b) -> b -> HashSet a -> b # foldl' :: (b -> a -> b) -> b -> HashSet a -> b # foldr1 :: (a -> a -> a) -> HashSet a -> a # foldl1 :: (a -> a -> a) -> HashSet a -> a # elem :: Eq a => a -> HashSet a -> Bool # maximum :: Ord a => HashSet a -> a # minimum :: Ord a => HashSet a -> a # | |
Eq1 HashSet | |
Ord1 HashSet | |
Defined in Data.HashSet.Internal | |
Show1 HashSet | |
NFData1 HashSet | Since: unordered-containers-0.2.14.0 |
Defined in Data.HashSet.Internal | |
Hashable1 HashSet | |
Defined in Data.HashSet.Internal | |
Lift a => Lift (HashSet a :: Type) | Since: unordered-containers-0.2.17.0 |
(Eq a, Hashable a) => IsList (HashSet a) | |
Eq a => Eq (HashSet a) | Note that, in the presence of hash collisions, equal
In general, the lack of substitutivity can be observed with any function that depends on the key ordering, such as folds and traversals. |
(Data a, Eq a, Hashable a) => Data (HashSet a) | |
Defined in Data.HashSet.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashSet a -> c (HashSet a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashSet a) # toConstr :: HashSet a -> Constr # dataTypeOf :: HashSet a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashSet a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashSet a)) # gmapT :: (forall b. Data b => b -> b) -> HashSet a -> HashSet a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r # gmapQ :: (forall d. Data d => d -> u) -> HashSet a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HashSet a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) # | |
Ord a => Ord (HashSet a) | |
Defined in Data.HashSet.Internal | |
(Eq a, Hashable a, Read a) => Read (HashSet a) | |
Show a => Show (HashSet a) | |
(Hashable a, Eq a) => Semigroup (HashSet a) | O(n+m) To obtain good performance, the smaller set must be presented as the first argument. Examples
|
(Hashable a, Eq a) => Monoid (HashSet a) | O(n+m) To obtain good performance, the smaller set must be presented as the first argument. Examples
|
NFData a => NFData (HashSet a) | |
Defined in Data.HashSet.Internal | |
Hashable a => Hashable (HashSet a) | |
Defined in Data.HashSet.Internal | |
Hashable v => One (HashSet v) Source # | |
(Eq v, Hashable v) => Container (HashSet v) Source # | |
Defined in Universum.Container.Class toList :: HashSet v -> [Element (HashSet v)] Source # null :: HashSet v -> Bool Source # foldr :: (Element (HashSet v) -> b -> b) -> b -> HashSet v -> b Source # foldl :: (b -> Element (HashSet v) -> b) -> b -> HashSet v -> b Source # foldl' :: (b -> Element (HashSet v) -> b) -> b -> HashSet v -> b Source # length :: HashSet v -> Int Source # elem :: Element (HashSet v) -> HashSet v -> Bool Source # foldMap :: Monoid m => (Element (HashSet v) -> m) -> HashSet v -> m Source # fold :: HashSet v -> Element (HashSet v) Source # foldr' :: (Element (HashSet v) -> b -> b) -> b -> HashSet v -> b Source # notElem :: Element (HashSet v) -> HashSet v -> Bool Source # all :: (Element (HashSet v) -> Bool) -> HashSet v -> Bool Source # any :: (Element (HashSet v) -> Bool) -> HashSet v -> Bool Source # and :: HashSet v -> Bool Source # or :: HashSet v -> Bool Source # find :: (Element (HashSet v) -> Bool) -> HashSet v -> Maybe (Element (HashSet v)) Source # safeHead :: HashSet v -> Maybe (Element (HashSet v)) Source # safeMaximum :: HashSet v -> Maybe (Element (HashSet v)) Source # safeMinimum :: HashSet v -> Maybe (Element (HashSet v)) Source # safeFoldr1 :: (Element (HashSet v) -> Element (HashSet v) -> Element (HashSet v)) -> HashSet v -> Maybe (Element (HashSet v)) Source # safeFoldl1 :: (Element (HashSet v) -> Element (HashSet v) -> Element (HashSet v)) -> HashSet v -> Maybe (Element (HashSet v)) Source # | |
type Item (HashSet a) | |
Defined in Data.HashSet.Internal | |
type OneItem (HashSet v) Source # | |
Defined in Universum.Container.Class | |
type Element (HashSet v) Source # | |
Defined in Universum.Container.Class |
A map of integers to values a
.
Instances
Functor IntMap | |
Foldable IntMap | Folds in order of increasing key. |
Defined in Data.IntMap.Internal fold :: Monoid m => IntMap m -> m # foldMap :: Monoid m => (a -> m) -> IntMap a -> m # foldMap' :: Monoid m => (a -> m) -> IntMap a -> m # foldr :: (a -> b -> b) -> b -> IntMap a -> b # foldr' :: (a -> b -> b) -> b -> IntMap a -> b # foldl :: (b -> a -> b) -> b -> IntMap a -> b # foldl' :: (b -> a -> b) -> b -> IntMap a -> b # foldr1 :: (a -> a -> a) -> IntMap a -> a # foldl1 :: (a -> a -> a) -> IntMap a -> a # elem :: Eq a => a -> IntMap a -> Bool # maximum :: Ord a => IntMap a -> a # minimum :: Ord a => IntMap a -> a # | |
Traversable IntMap | Traverses in order of increasing key. |
Eq1 IntMap | Since: containers-0.5.9 |
Ord1 IntMap | Since: containers-0.5.9 |
Defined in Data.IntMap.Internal | |
Read1 IntMap | Since: containers-0.5.9 |
Defined in Data.IntMap.Internal | |
Show1 IntMap | Since: containers-0.5.9 |
Hashable1 IntMap | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
IsList (IntMap a) | Since: containers-0.5.6.2 |
Eq a => Eq (IntMap a) | |
Data a => Data (IntMap a) | |
Defined in Data.IntMap.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntMap a -> c (IntMap a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IntMap a) # toConstr :: IntMap a -> Constr # dataTypeOf :: IntMap a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IntMap a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IntMap a)) # gmapT :: (forall b. Data b => b -> b) -> IntMap a -> IntMap a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r # gmapQ :: (forall d. Data d => d -> u) -> IntMap a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IntMap a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) # | |
Ord a => Ord (IntMap a) | |
Defined in Data.IntMap.Internal | |
Read e => Read (IntMap e) | |
Show a => Show (IntMap a) | |
Semigroup (IntMap a) | Since: containers-0.5.7 |
Monoid (IntMap a) | |
NFData a => NFData (IntMap a) | |
Defined in Data.IntMap.Internal | |
Hashable v => Hashable (IntMap v) | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
One (IntMap v) Source # | |
Container (IntMap v) Source # | |
Defined in Universum.Container.Class toList :: IntMap v -> [Element (IntMap v)] Source # null :: IntMap v -> Bool Source # foldr :: (Element (IntMap v) -> b -> b) -> b -> IntMap v -> b Source # foldl :: (b -> Element (IntMap v) -> b) -> b -> IntMap v -> b Source # foldl' :: (b -> Element (IntMap v) -> b) -> b -> IntMap v -> b Source # length :: IntMap v -> Int Source # elem :: Element (IntMap v) -> IntMap v -> Bool Source # foldMap :: Monoid m => (Element (IntMap v) -> m) -> IntMap v -> m Source # fold :: IntMap v -> Element (IntMap v) Source # foldr' :: (Element (IntMap v) -> b -> b) -> b -> IntMap v -> b Source # notElem :: Element (IntMap v) -> IntMap v -> Bool Source # all :: (Element (IntMap v) -> Bool) -> IntMap v -> Bool Source # any :: (Element (IntMap v) -> Bool) -> IntMap v -> Bool Source # and :: IntMap v -> Bool Source # or :: IntMap v -> Bool Source # find :: (Element (IntMap v) -> Bool) -> IntMap v -> Maybe (Element (IntMap v)) Source # safeHead :: IntMap v -> Maybe (Element (IntMap v)) Source # safeMaximum :: IntMap v -> Maybe (Element (IntMap v)) Source # safeMinimum :: IntMap v -> Maybe (Element (IntMap v)) Source # safeFoldr1 :: (Element (IntMap v) -> Element (IntMap v) -> Element (IntMap v)) -> IntMap v -> Maybe (Element (IntMap v)) Source # safeFoldl1 :: (Element (IntMap v) -> Element (IntMap v) -> Element (IntMap v)) -> IntMap v -> Maybe (Element (IntMap v)) Source # | |
FromList (IntMap v) Source # | |
Defined in Universum.Container.Class | |
ToPairs (IntMap v) Source # | |
type Item (IntMap a) | |
Defined in Data.IntMap.Internal | |
type OneItem (IntMap v) Source # | |
Defined in Universum.Container.Class | |
type Element (IntMap v) Source # | |
Defined in Universum.Container.Class | |
type ListElement (IntMap v) Source # | |
Defined in Universum.Container.Class | |
type FromListC (IntMap v) Source # | |
Defined in Universum.Container.Class | |
type Key (IntMap v) Source # | |
Defined in Universum.Container.Class | |
type Val (IntMap v) Source # | |
Defined in Universum.Container.Class |
A set of integers.
Instances
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 |
Hashable2 Map | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
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 |
Hashable k => Hashable1 (Map k) | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
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 | |
(Hashable k, Hashable v) => Hashable (Map k v) | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
One (Map k v) Source # | |
Container (Map k v) Source # | |
Defined in Universum.Container.Class toList :: Map k v -> [Element (Map k v)] Source # null :: Map k v -> Bool Source # foldr :: (Element (Map k v) -> b -> b) -> b -> Map k v -> b Source # foldl :: (b -> Element (Map k v) -> b) -> b -> Map k v -> b Source # foldl' :: (b -> Element (Map k v) -> b) -> b -> Map k v -> b Source # length :: Map k v -> Int Source # elem :: Element (Map k v) -> Map k v -> Bool Source # foldMap :: Monoid m => (Element (Map k v) -> m) -> Map k v -> m Source # fold :: Map k v -> Element (Map k v) Source # foldr' :: (Element (Map k v) -> b -> b) -> b -> Map k v -> b Source # notElem :: Element (Map k v) -> Map k v -> Bool Source # all :: (Element (Map k v) -> Bool) -> Map k v -> Bool Source # any :: (Element (Map k v) -> Bool) -> Map k v -> Bool Source # and :: Map k v -> Bool Source # or :: Map k v -> Bool Source # find :: (Element (Map k v) -> Bool) -> Map k v -> Maybe (Element (Map k v)) Source # safeHead :: Map k v -> Maybe (Element (Map k v)) Source # safeMaximum :: Map k v -> Maybe (Element (Map k v)) Source # safeMinimum :: Map k v -> Maybe (Element (Map k v)) Source # safeFoldr1 :: (Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Maybe (Element (Map k v)) Source # safeFoldl1 :: (Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Maybe (Element (Map k v)) Source # | |
Ord k => FromList (Map k v) Source # | |
Defined in Universum.Container.Class | |
ToPairs (Map k v) Source # | |
type Item (Map k v) | |
Defined in Data.Map.Internal | |
type OneItem (Map k v) Source # | |
Defined in Universum.Container.Class | |
type Element (Map k v) Source # | |
Defined in Universum.Container.Class | |
type ListElement (Map k v) Source # | |
Defined in Universum.Container.Class | |
type FromListC (Map k v) Source # | |
Defined in Universum.Container.Class | |
type Key (Map k v) Source # | |
Defined in Universum.Container.Class | |
type Val (Map k v) Source # | |
Defined in Universum.Container.Class |
General-purpose finite sequences.
Instances
Monad Seq | |
Functor Seq | |
MonadFix Seq | Since: containers-0.5.11 |
Defined in Data.Sequence.Internal | |
Applicative Seq | Since: containers-0.5.4 |
Foldable Seq | |
Defined in Data.Sequence.Internal fold :: Monoid m => Seq m -> m # foldMap :: Monoid m => (a -> m) -> Seq a -> m # foldMap' :: Monoid m => (a -> m) -> Seq a -> m # foldr :: (a -> b -> b) -> b -> Seq a -> b # foldr' :: (a -> b -> b) -> b -> Seq a -> b # foldl :: (b -> a -> b) -> b -> Seq a -> b # foldl' :: (b -> a -> b) -> b -> Seq a -> b # foldr1 :: (a -> a -> a) -> Seq a -> a # foldl1 :: (a -> a -> a) -> Seq a -> a # elem :: Eq a => a -> Seq a -> Bool # maximum :: Ord a => Seq a -> a # | |
Traversable Seq | |
Eq1 Seq | Since: containers-0.5.9 |
Ord1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
Read1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
Show1 Seq | Since: containers-0.5.9 |
MonadZip Seq |
|
Alternative Seq | Since: containers-0.5.4 |
MonadPlus Seq | |
Hashable1 Seq | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
UnzipWith Seq | |
Defined in Data.Sequence.Internal unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b) | |
IsList (Seq a) | |
Eq a => Eq (Seq a) | |
Data a => Data (Seq a) | |
Defined in Data.Sequence.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) # dataTypeOf :: Seq a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) # gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r # gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # | |
Ord a => Ord (Seq a) | |
Read a => Read (Seq a) | |
Show a => Show (Seq a) | |
a ~ Char => IsString (Seq a) | Since: containers-0.5.7 |
Defined in Data.Sequence.Internal fromString :: String -> Seq a # | |
Semigroup (Seq a) | Since: containers-0.5.7 |
Monoid (Seq a) | |
NFData a => NFData (Seq a) | |
Defined in Data.Sequence.Internal | |
Hashable v => Hashable (Seq v) | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
One (Seq a) Source # | |
Container (Seq a) Source # | |
Defined in Universum.Container.Class toList :: Seq a -> [Element (Seq a)] Source # null :: Seq a -> Bool Source # foldr :: (Element (Seq a) -> b -> b) -> b -> Seq a -> b Source # foldl :: (b -> Element (Seq a) -> b) -> b -> Seq a -> b Source # foldl' :: (b -> Element (Seq a) -> b) -> b -> Seq a -> b Source # length :: Seq a -> Int Source # elem :: Element (Seq a) -> Seq a -> Bool Source # foldMap :: Monoid m => (Element (Seq a) -> m) -> Seq a -> m Source # fold :: Seq a -> Element (Seq a) Source # foldr' :: (Element (Seq a) -> b -> b) -> b -> Seq a -> b Source # notElem :: Element (Seq a) -> Seq a -> Bool Source # all :: (Element (Seq a) -> Bool) -> Seq a -> Bool Source # any :: (Element (Seq a) -> Bool) -> Seq a -> Bool Source # find :: (Element (Seq a) -> Bool) -> Seq a -> Maybe (Element (Seq a)) Source # safeHead :: Seq a -> Maybe (Element (Seq a)) Source # safeMaximum :: Seq a -> Maybe (Element (Seq a)) Source # safeMinimum :: Seq a -> Maybe (Element (Seq a)) Source # safeFoldr1 :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Maybe (Element (Seq a)) Source # safeFoldl1 :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Maybe (Element (Seq a)) Source # | |
FromList (Seq a) Source # | |
Defined in Universum.Container.Class | |
type Item (Seq a) | |
Defined in Data.Sequence.Internal | |
type OneItem (Seq a) Source # | |
Defined in Universum.Container.Class | |
type Element (Seq a) Source # | |
Defined in Universum.Container.Class | |
type ListElement (Seq a) Source # | |
Defined in Universum.Container.Class | |
type FromListC (Seq a) Source # | |
Defined in Universum.Container.Class |
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 |
Hashable1 Set | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
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 | |
Hashable v => Hashable (Set v) | Since: hashable-1.3.4.0 |
Defined in Data.Hashable.Class | |
One (Set v) Source # | |
Ord v => Container (Set v) Source # | |
Defined in Universum.Container.Class toList :: Set v -> [Element (Set v)] Source # null :: Set v -> Bool Source # foldr :: (Element (Set v) -> b -> b) -> b -> Set v -> b Source # foldl :: (b -> Element (Set v) -> b) -> b -> Set v -> b Source # foldl' :: (b -> Element (Set v) -> b) -> b -> Set v -> b Source # length :: Set v -> Int Source # elem :: Element (Set v) -> Set v -> Bool Source # foldMap :: Monoid m => (Element (Set v) -> m) -> Set v -> m Source # fold :: Set v -> Element (Set v) Source # foldr' :: (Element (Set v) -> b -> b) -> b -> Set v -> b Source # notElem :: Element (Set v) -> Set v -> Bool Source # all :: (Element (Set v) -> Bool) -> Set v -> Bool Source # any :: (Element (Set v) -> Bool) -> Set v -> Bool Source # find :: (Element (Set v) -> Bool) -> Set v -> Maybe (Element (Set v)) Source # safeHead :: Set v -> Maybe (Element (Set v)) Source # safeMaximum :: Set v -> Maybe (Element (Set v)) Source # safeMinimum :: Set v -> Maybe (Element (Set v)) Source # safeFoldr1 :: (Element (Set v) -> Element (Set v) -> Element (Set v)) -> Set v -> Maybe (Element (Set v)) Source # safeFoldl1 :: (Element (Set v) -> Element (Set v) -> Element (Set v)) -> Set v -> Maybe (Element (Set v)) Source # | |
Ord a => FromList (Set a) Source # | |
Defined in Universum.Container.Class | |
type Item (Set a) | |
Defined in Data.Set.Internal | |
type OneItem (Set v) Source # | |
Defined in Universum.Container.Class | |
type Element (Set v) Source # | |
Defined in Universum.Container.Class | |
type ListElement (Set a) Source # | |
Defined in Universum.Container.Class | |
type FromListC (Set a) Source # | |
Defined in Universum.Container.Class |
uncurry :: (a -> b -> c) -> (a, b) -> c #
uncurry
converts a curried function to a function on pairs.
Examples
>>>
uncurry (+) (1,2)
3
>>>
uncurry ($) (show, 1)
"1"
>>>
map (uncurry max) [(1,2), (3,4), (6,8)]
[2,4,8]
Boxed vectors, supporting efficient slicing.