LangToGroup-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Containers.PrismMap

Description

Module PrismMap include type PrismMap and useful functions for working with it.

PrismMap is kind of Map with faster access to keys by value. So, it is almost IsoMap, but without isomorphism restriction.

Documentation

data PrismMap k a Source #

Instances

Instances details
(Eq k, Eq a) => Eq (PrismMap k a) Source # 
Instance details

Defined in Containers.PrismMap

Methods

(==) :: PrismMap k a -> PrismMap k a -> Bool #

(/=) :: PrismMap k a -> PrismMap k a -> Bool #

(Show k, Show a) => Show (PrismMap k a) Source # 
Instance details

Defined in Containers.PrismMap

Methods

showsPrec :: Int -> PrismMap k a -> ShowS #

show :: PrismMap k a -> String #

showList :: [PrismMap k a] -> ShowS #

(Ord k, Ord a) => Operable (PrismMap k a) Source # 
Instance details

Defined in Containers

Methods

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 #

Nullable (PrismMap k a) Source # 
Instance details

Defined in Containers

Methods

nullC :: PrismMap k a -> Bool Source #

emptyC :: PrismMap k a Source #

Sizable (PrismMap k a) Source # 
Instance details

Defined in Containers

Methods

size :: PrismMap k a -> Int Source #

(Ord k, Ord a) => Deletable (PrismMap k a) a Source # 
Instance details

Defined in Containers

Methods

delete :: MonadFail m => a -> PrismMap k a -> m (PrismMap k a) Source #

unsafeDelete :: a -> PrismMap k a -> PrismMap k a Source #

(\>) :: a -> PrismMap k a -> PrismMap k a Source #

(<\) :: PrismMap k a -> a -> PrismMap k a Source #

(<\~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> a -> s -> t Source #

(<\=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> a -> m () Source #

(Ord k, Ord a) => Deletable (PrismMap k a) k Source # 
Instance details

Defined in Containers

Methods

delete :: MonadFail m => k -> PrismMap k a -> m (PrismMap k a) Source #

unsafeDelete :: k -> PrismMap k a -> PrismMap k a Source #

(\>) :: k -> PrismMap k a -> PrismMap k a Source #

(<\) :: PrismMap k a -> k -> PrismMap k a Source #

(<\~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> k -> s -> t Source #

(<\=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> k -> m () Source #

Filterable (PrismMap k a) a Source # 
Instance details

Defined in Containers

Methods

filterC :: (a -> Bool) -> PrismMap k a -> PrismMap k a Source #

(<?>) :: (a -> Bool) -> PrismMap k a -> PrismMap k a Source #

(<?>~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> (a -> Bool) -> s -> t Source #

(<?>=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> (a -> Bool) -> m () Source #

Filterable (PrismMap k a) k Source # 
Instance details

Defined in Containers

Methods

filterC :: (k -> Bool) -> PrismMap k a -> PrismMap k a Source #

(<?>) :: (k -> Bool) -> PrismMap k a -> PrismMap k a Source #

(<?>~) :: ASetter s t (PrismMap k a) (PrismMap k a) -> (k -> Bool) -> s -> t Source #

(<?>=) :: MonadState s m => ASetter s s (PrismMap k a) (PrismMap k a) -> (k -> Bool) -> m () Source #

Ord a => Containable (PrismMap k a) a Source # 
Instance details

Defined in Containers

Methods

member :: a -> PrismMap k a -> Bool Source #

notMember :: a -> PrismMap k a -> Bool Source #

Ord k => Containable (PrismMap k a) k Source # 
Instance details

Defined in Containers

Methods

member :: k -> PrismMap k a -> Bool Source #

notMember :: k -> PrismMap k a -> Bool Source #

Keyable (PrismMap k a) k Source # 
Instance details

Defined in Containers

Methods

keys :: PrismMap k a -> [k] Source #

keysSet :: PrismMap k a -> Set k Source #

Valuable (PrismMap k a) a Source # 
Instance details

Defined in Containers

Methods

values :: PrismMap k a -> [a] Source #

valuesSet :: PrismMap k a -> Set a Source #

Ord a => Indexable (PrismMap k a) a k Source # 
Instance details

Defined in Containers

Methods

(!?) :: MonadFail m => PrismMap k a -> a -> m k Source #

(!<>) :: PrismMap k a -> a -> Set k Source #

(.@) :: MonadFail m => Getting x y (PrismMap k a) -> a -> Getting x y (m k) Source #

(.<@>) :: Getting x y (PrismMap k a) -> a -> Getting x y (Set k) Source #

Ord k => Indexable (PrismMap k a) k a Source # 
Instance details

Defined in Containers

Methods

(!?) :: MonadFail m => PrismMap k a -> k -> m a Source #

(!<>) :: PrismMap k a -> k -> Set a Source #

(.@) :: MonadFail m => Getting x y (PrismMap k a) -> k -> Getting x y (m a) Source #

(.<@>) :: Getting x y (PrismMap k a) -> k -> Getting x y (Set a) Source #

(Ord k, Ord a) => Insertable (PrismMap k a) (k, a) Source # 
Instance details

Defined in Containers

Methods

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 #

(Ord k, Ord a) => Containable (PrismMap k a) (k, a) Source # 
Instance details

Defined in Containers

Methods

member :: (k, a) -> PrismMap k a -> Bool Source #

notMember :: (k, a) -> PrismMap k a -> Bool Source #

(Ord k, Ord a) => UnsafeListable (PrismMap k a) (k, a) Source # 
Instance details

Defined in Containers

Methods

fromList :: [(k, a)] -> PrismMap k a Source #

(Ord k, Ord a) => Listable (PrismMap k a) (k, a) Source # 
Instance details

Defined in Containers

Methods

toList :: PrismMap k a -> [(k, a)] Source #

fromList_ :: MonadFail m => [(k, a)] -> m (PrismMap k a) Source #

Singletonable (PrismMap k a) (k, a) Source # 
Instance details

Defined in Containers

Methods

singleton :: (k, a) -> PrismMap k a Source #

Ord b => Gunctor (PrismMap k a) (PrismMap k b) a b Source # 
Instance details

Defined in Containers

Methods

gmap :: (a -> b) -> PrismMap k a -> PrismMap k b Source #

(<@>) :: (a -> b) -> PrismMap k a -> PrismMap k b Source #

Ord l => Gunctor (PrismMap k a) (PrismMap l a) k l Source # 
Instance details

Defined in Containers

Methods

gmap :: (k -> l) -> PrismMap k a -> PrismMap l a Source #

(<@>) :: (k -> l) -> PrismMap k a -> PrismMap l a Source #

singleton :: k -> a -> PrismMap k a Source #

fromList :: (Ord k, Ord a) => [(k, a)] -> PrismMap k a Source #

toList :: PrismMap k a -> [(k, a)] Source #

toMap :: PrismMap k a -> Map k a Source #

lookup :: (Ord k, MonadFail m) => k -> PrismMap k a -> m a Source #

lookupKeys :: Ord a => a -> PrismMap k a -> Set k Source #

values :: PrismMap k a -> [a] Source #

keys :: PrismMap k a -> [k] Source #

value :: Ord a => a -> PrismMap k a -> Bool Source #

key :: Ord k => k -> PrismMap k a -> Bool Source #

map :: Ord b => (a -> b) -> PrismMap k a -> PrismMap k b Source #

mapKeys :: Ord l => (k -> l) -> PrismMap k a -> PrismMap l a Source #

filter :: (a -> Bool) -> PrismMap k a -> PrismMap k a Source #

filterKeys :: (k -> Bool) -> PrismMap k a -> PrismMap k a Source #

insert :: (Ord k, Ord a) => k -> a -> PrismMap k a -> PrismMap k a Source #

deleteKey :: (Ord k, Ord a, MonadFail m) => k -> PrismMap k a -> m (PrismMap k a) Source #

deleteValue :: (Ord k, Ord a, MonadFail m) => a -> PrismMap k a -> m (PrismMap k a) Source #

union :: (Ord k, Ord a) => PrismMap k a -> PrismMap k a -> PrismMap k a Source #

intersection :: (Ord k, Ord a) => PrismMap k a -> PrismMap k a -> PrismMap k a Source #

difference :: (Ord k, Ord a) => PrismMap k a -> PrismMap k a -> PrismMap k a Source #