Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.CanonicalMaps
Synopsis
- class Eq t => CanonicalZero t where
- canonicalInsert :: ( Ord k, CanonicalZero a) => (a -> a -> a) -> k -> a -> Map k a -> Map k a
- canonicalMapUnion :: ( Ord k, CanonicalZero a) => (a -> a -> a) -> Map k a -> Map k a -> Map k a
- canonicalMap :: ( Ord k, CanonicalZero a) => (a -> a) -> Map k a -> Map k a
- pointWise :: ( Ord k, CanonicalZero v) => (v -> v -> Bool ) -> Map k v -> Map k v -> Bool
- data Map k a
Documentation
class Eq t => CanonicalZero t where Source #
Instances
CanonicalZero Integer Source # | |
( Eq k, Eq v, Ord k, CanonicalZero v) => CanonicalZero ( Map k v) Source # | |
canonicalInsert :: ( Ord k, CanonicalZero a) => (a -> a -> a) -> k -> a -> Map k a -> Map k a Source #
canonicalMapUnion :: ( Ord k, CanonicalZero a) => (a -> a -> a) -> Map k a -> Map k a -> Map k a Source #
canonicalMap :: ( Ord k, CanonicalZero a) => (a -> a) -> Map k a -> Map k a Source #
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
Bifoldable Map |
Since: containers-0.6.3.1 |
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 |
Defined in Data.Map.Internal |
|
Hashable2 Map |
Since: hashable-1.3.4.0 |
Functor ( Map k) | |
Foldable ( Map k) |
Folds in order of increasing key. |
Defined in Data.Map.Internal Methods fold :: Monoid m => Map k m -> m Source # foldMap :: Monoid m => (a -> m) -> Map k a -> m Source # foldMap' :: Monoid m => (a -> m) -> Map k a -> m Source # foldr :: (a -> b -> b) -> b -> Map k a -> b Source # foldr' :: (a -> b -> b) -> b -> Map k a -> b Source # foldl :: (b -> a -> b) -> b -> Map k a -> b Source # foldl' :: (b -> a -> b) -> b -> Map k a -> b Source # foldr1 :: (a -> a -> a) -> Map k a -> a Source # foldl1 :: (a -> a -> a) -> Map k a -> a Source # toList :: Map k a -> [a] Source # null :: Map k a -> Bool Source # length :: Map k a -> Int Source # elem :: Eq a => a -> Map k a -> Bool Source # maximum :: Ord a => Map k a -> a Source # minimum :: Ord a => Map k a -> a Source # |
|
Traversable ( Map k) |
Traverses in order of increasing key. |
Defined in Data.Map.Internal |
|
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 Methods liftReadsPrec :: ( Int -> ReadS a) -> ReadS [a] -> Int -> ReadS ( Map k a) Source # liftReadList :: ( Int -> ReadS a) -> ReadS [a] -> ReadS [ Map k a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec ( Map k a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ Map k a] Source # |
|
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 Methods gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Map k a -> c ( Map k a) Source # gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Map k a) Source # toConstr :: Map k a -> Constr Source # dataTypeOf :: Map k a -> DataType Source # dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Map k a)) Source # dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Map k a)) Source # gmapT :: ( forall b. Data b => b -> b) -> Map k a -> Map k a Source # gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Map k a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Map k a -> r Source # gmapQ :: ( forall d. Data d => d -> u) -> Map k a -> [u] Source # gmapQi :: Int -> ( forall d. Data d => d -> u) -> Map k a -> u Source # gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Map k a -> m ( Map k a) Source # gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Map k a -> m ( Map k a) Source # gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Map k a -> m ( Map k a) Source # |
|
( Ord k, Ord v) => Ord ( Map k v) | |
Defined in Data.Map.Internal |
|
( 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) | |
( Hashable k, Hashable v) => Hashable ( Map k v) |
Since: hashable-1.3.4.0 |
( Ord k, ToCBOR k, ToCBOR v) => ToCBOR ( Map k v) | |
( Ord k, FromCBOR k, FromCBOR v) => FromCBOR ( Map k v) | |
( NFData k, NFData a) => NFData ( Map k a) | |
Defined in Data.Map.Internal |
|
( NoThunks k, NoThunks v) => NoThunks ( Map k v) | |
( Eq k, Eq v, Ord k, CanonicalZero v) => CanonicalZero ( Map k v) Source # | |
( Ord k, FromCBOR k, FromCBOR v) => FromSharedCBOR ( Map k v) Source # | |
type Item ( Map k v) | |
Defined in Data.Map.Internal |
|
type Share ( Map k v) Source # | |