appendmap-0.1.5: Map with a Semigroup and Monoid instances delegating to Semigroup of the elements

Safe HaskellSafe
LanguageHaskell2010

Data.Map.Append.Lazy

Description

A wrapper for Map with a Semigroup and Monoid instances that delegate to the individual keys.

Synopsis

Documentation

newtype AppendMap k v Source #

Map wrapper with Semigroup and Monoid instances that delegate to the keys. It satisfies the following property:

lookup k (m1 <> m2) === lookup k m1 <> lookup k m2
  where
    lookup key = Map.lookup key . unAppendMap

Constructors

AppendMap 

Fields

Instances
(Eq k, Eq v) => Eq (AppendMap k v) Source # 
Instance details

Defined in Data.Map.Append.Lazy

Methods

(==) :: AppendMap k v -> AppendMap k v -> Bool #

(/=) :: AppendMap k v -> AppendMap k v -> Bool #

(Ord k, Ord v) => Ord (AppendMap k v) Source # 
Instance details

Defined in Data.Map.Append.Lazy

Methods

compare :: AppendMap k v -> AppendMap k v -> Ordering #

(<) :: AppendMap k v -> AppendMap k v -> Bool #

(<=) :: AppendMap k v -> AppendMap k v -> Bool #

(>) :: AppendMap k v -> AppendMap k v -> Bool #

(>=) :: AppendMap k v -> AppendMap k v -> Bool #

max :: AppendMap k v -> AppendMap k v -> AppendMap k v #

min :: AppendMap k v -> AppendMap k v -> AppendMap k v #

(Show k, Show v) => Show (AppendMap k v) Source # 
Instance details

Defined in Data.Map.Append.Lazy

Methods

showsPrec :: Int -> AppendMap k v -> ShowS #

show :: AppendMap k v -> String #

showList :: [AppendMap k v] -> ShowS #

(Ord k, Semigroup v) => Semigroup (AppendMap k v) Source # 
Instance details

Defined in Data.Map.Append.Lazy

Methods

(<>) :: AppendMap k v -> AppendMap k v -> AppendMap k v #

sconcat :: NonEmpty (AppendMap k v) -> AppendMap k v #

stimes :: Integral b => b -> AppendMap k v -> AppendMap k v #

(Ord k, Semigroup v) => Monoid (AppendMap k v) Source # 
Instance details

Defined in Data.Map.Append.Lazy

Methods

mempty :: AppendMap k v #

mappend :: AppendMap k v -> AppendMap k v -> AppendMap k v #

mconcat :: [AppendMap k v] -> AppendMap k v #