monoidmap-0.0.1.3: Monoidal map type
Copyright© 2022–2024 Jonathan Knowles
LicenseApache-2.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Examples.MultiMap.Instances.MultiMap4

Description

A lawful implementation of MultiMap, implemented in terms of MonoidMap and Set.

Documentation

newtype MultiMap4 k v Source #

Constructors

MultiMap (MonoidMap k (Set v)) 

Instances

Instances details
(Ord k, Ord v) => MultiMap MultiMap4 k v Source # 
Instance details

Defined in Examples.MultiMap.Instances.MultiMap4

Methods

fromList :: [(k, Set v)] -> MultiMap4 k v Source #

toList :: MultiMap4 k v -> [(k, Set v)] Source #

empty :: MultiMap4 k v Source #

lookup :: k -> MultiMap4 k v -> Set v Source #

null :: MultiMap4 k v -> Bool Source #

nonNull :: MultiMap4 k v -> Bool Source #

nonNullKey :: k -> MultiMap4 k v -> Bool Source #

nonNullKeys :: MultiMap4 k v -> Set k Source #

nonNullCount :: MultiMap4 k v -> Int Source #

isSubmapOf :: MultiMap4 k v -> MultiMap4 k v -> Bool Source #

update :: k -> Set v -> MultiMap4 k v -> MultiMap4 k v Source #

insert :: k -> Set v -> MultiMap4 k v -> MultiMap4 k v Source #

remove :: k -> Set v -> MultiMap4 k v -> MultiMap4 k v Source #

union :: MultiMap4 k v -> MultiMap4 k v -> MultiMap4 k v Source #

intersection :: MultiMap4 k v -> MultiMap4 k v -> MultiMap4 k v Source #

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

Defined in Examples.MultiMap.Instances.MultiMap4

Methods

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

show :: MultiMap4 k v -> String #

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

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

Defined in Examples.MultiMap.Instances.MultiMap4

Methods

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

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