ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.Unique.Map

Synopsis

- newtype UniqMap k a = UniqMap {
  - getUniqMap :: UniqFM k (k, a)
  }
- emptyUniqMap :: UniqMap k a
- isNullUniqMap :: UniqMap k a -> Bool
- unitUniqMap :: Uniquable k => k -> a -> UniqMap k a
- listToUniqMap :: Uniquable k => [(k, a)] -> UniqMap k a
- listToUniqMap_C :: Uniquable k => (a -> a -> a) -> [(k, a)] -> UniqMap k a
- addToUniqMap :: Uniquable k => UniqMap k a -> k -> a -> UniqMap k a
- addListToUniqMap :: Uniquable k => UniqMap k a -> [(k, a)] -> UniqMap k a
- addToUniqMap_C :: Uniquable k => (a -> a -> a) -> UniqMap k a -> k -> a -> UniqMap k a
- addToUniqMap_Acc :: Uniquable k => (b -> a -> a) -> (b -> a) -> UniqMap k a -> k -> b -> UniqMap k a
- addToUniqMap_L :: Uniquable k => (k -> a -> a -> a) -> k -> a -> UniqMap k a -> (Maybe a, UniqMap k a)
- alterUniqMap :: Uniquable k => (Maybe a -> Maybe a) -> UniqMap k a -> k -> UniqMap k a
- addListToUniqMap_C :: Uniquable k => (a -> a -> a) -> UniqMap k a -> [(k, a)] -> UniqMap k a
- adjustUniqMap :: Uniquable k => (a -> a) -> UniqMap k a -> k -> UniqMap k a
- delFromUniqMap :: Uniquable k => UniqMap k a -> k -> UniqMap k a
- delListFromUniqMap :: Uniquable k => UniqMap k a -> [k] -> UniqMap k a
- plusUniqMap :: UniqMap k a -> UniqMap k a -> UniqMap k a
- plusUniqMap_C :: (a -> a -> a) -> UniqMap k a -> UniqMap k a -> UniqMap k a
- plusMaybeUniqMap_C :: (a -> a -> Maybe a) -> UniqMap k a -> UniqMap k a -> UniqMap k a
- plusUniqMapList :: [UniqMap k a] -> UniqMap k a
- plusUniqMapListWith :: (a -> a -> a) -> [UniqMap k a] -> UniqMap k a
- minusUniqMap :: UniqMap k a -> UniqMap k b -> UniqMap k a
- intersectUniqMap :: UniqMap k a -> UniqMap k b -> UniqMap k a
- intersectUniqMap_C :: (a -> b -> c) -> UniqMap k a -> UniqMap k b -> UniqMap k c
- disjointUniqMap :: UniqMap k a -> UniqMap k b -> Bool
- mapUniqMap :: (a -> b) -> UniqMap k a -> UniqMap k b
- filterUniqMap :: (a -> Bool) -> UniqMap k a -> UniqMap k a
- filterWithKeyUniqMap :: (k -> a -> Bool) -> UniqMap k a -> UniqMap k a
- partitionUniqMap :: (a -> Bool) -> UniqMap k a -> (UniqMap k a, UniqMap k a)
- sizeUniqMap :: UniqMap k a -> Int
- elemUniqMap :: Uniquable k => k -> UniqMap k a -> Bool
- nonDetKeysUniqMap :: UniqMap k a -> [k]
- nonDetEltsUniqMap :: UniqMap k a -> [a]
- lookupUniqMap :: Uniquable k => UniqMap k a -> k -> Maybe a
- lookupWithDefaultUniqMap :: Uniquable k => UniqMap k a -> a -> k -> a
- anyUniqMap :: (a -> Bool) -> UniqMap k a -> Bool
- allUniqMap :: (a -> Bool) -> UniqMap k a -> Bool
- nonDetUniqMapToList :: UniqMap k a -> [(k, a)]
- nonDetUniqMapToKeySet :: Ord k => UniqMap k a -> Set k
- nonDetFoldUniqMap :: ((k, a) -> b -> b) -> b -> UniqMap k a -> b

# Documentation

newtype UniqMap k a #

Maps indexed by `Uniquable` keys

Constructors

UniqMap |
Fields getUniqMap :: UniqFM k (k, a)

#### Instances

Instances details

Functor (UniqMap k) # |
Instance details Defined in GHC.Types.Unique.Map Methods fmap :: (a -> b) -> UniqMap k a -> UniqMap k b # (<$) :: a -> UniqMap k b -> UniqMap k a #
(NFData k, NFData a) => NFData (UniqMap k a) # |
Instance details Defined in GHC.Types.Unique.Map Methods rnf :: UniqMap k a -> () #
Monoid (UniqMap k a) # |
Instance details Defined in GHC.Types.Unique.Map Methods mempty :: UniqMap k a # mappend :: UniqMap k a -> UniqMap k a -> UniqMap k a # mconcat :: [UniqMap k a] -> UniqMap k a #
Semigroup (UniqMap k a) # |
Instance details Defined in GHC.Types.Unique.Map Methods (<>) :: UniqMap k a -> UniqMap k a -> UniqMap k a # sconcat :: NonEmpty (UniqMap k a) -> UniqMap k a # stimes :: Integral b => b -> UniqMap k a -> UniqMap k a #
(Data k, Data a) => Data (UniqMap k a) # |
Instance details Defined in GHC.Types.Unique.Map Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqMap k a -> c (UniqMap k a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqMap k a) # toConstr :: UniqMap k a -> Constr # dataTypeOf :: UniqMap k a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UniqMap k a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UniqMap k a)) # gmapT :: (forall b. Data b => b -> b) -> UniqMap k a -> UniqMap k a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqMap k a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqMap k a -> r # gmapQ :: (forall d. Data d => d -> u) -> UniqMap k a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqMap k a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqMap k a -> m (UniqMap k a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqMap k a -> m (UniqMap k a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqMap k a -> m (UniqMap k a) #
ToJExpr a => ToJExpr (UniqMap FastString a) # |
Instance details Defined in GHC.JS.Make Methods toJExpr :: UniqMap FastString a -> JStgExpr # toJExprFromList :: [UniqMap FastString a] -> JStgExpr #
(Outputable k, Outputable a) => Outputable (UniqMap k a) # |
Instance details Defined in GHC.Types.Unique.Map Methods ppr :: UniqMap k a -> SDoc #
(Eq k, Eq a) => Eq (UniqMap k a) # |
Instance details Defined in GHC.Types.Unique.Map Methods (==) :: UniqMap k a -> UniqMap k a -> Bool # (/=) :: UniqMap k a -> UniqMap k a -> Bool #

emptyUniqMap :: UniqMap k a #

isNullUniqMap :: UniqMap k a -> Bool #

unitUniqMap :: Uniquable k => k -> a -> UniqMap k a #

listToUniqMap :: Uniquable k => [(k, a)] -> UniqMap k a #

listToUniqMap_C :: Uniquable k => (a -> a -> a) -> [(k, a)] -> UniqMap k a #

addToUniqMap :: Uniquable k => UniqMap k a -> k -> a -> UniqMap k a #

addListToUniqMap :: Uniquable k => UniqMap k a -> [(k, a)] -> UniqMap k a #

addToUniqMap_C :: Uniquable k => (a -> a -> a) -> UniqMap k a -> k -> a -> UniqMap k a #

addToUniqMap_Acc :: Uniquable k => (b -> a -> a) -> (b -> a) -> UniqMap k a -> k -> b -> UniqMap k a #

addToUniqMap_L :: Uniquable k => (k -> a -> a -> a) -> k -> a -> UniqMap k a -> (Maybe a, UniqMap k a) #

Add an element, returns previous lookup result and new map. If old element doesn't exist, add the passed element directly, otherwise compute the element to add using the passed function.

alterUniqMap :: Uniquable k => (Maybe a -> Maybe a) -> UniqMap k a -> k -> UniqMap k a #

addListToUniqMap_C :: Uniquable k => (a -> a -> a) -> UniqMap k a -> [(k, a)] -> UniqMap k a #

adjustUniqMap :: Uniquable k => (a -> a) -> UniqMap k a -> k -> UniqMap k a #

delFromUniqMap :: Uniquable k => UniqMap k a -> k -> UniqMap k a #

delListFromUniqMap :: Uniquable k => UniqMap k a -> [k] -> UniqMap k a #

plusUniqMap :: UniqMap k a -> UniqMap k a -> UniqMap k a #

plusUniqMap_C :: (a -> a -> a) -> UniqMap k a -> UniqMap k a -> UniqMap k a #

plusMaybeUniqMap_C :: (a -> a -> Maybe a) -> UniqMap k a -> UniqMap k a -> UniqMap k a #

plusUniqMapList :: [UniqMap k a] -> UniqMap k a #

plusUniqMapListWith :: (a -> a -> a) -> [UniqMap k a] -> UniqMap k a #

minusUniqMap :: UniqMap k a -> UniqMap k b -> UniqMap k a #

intersectUniqMap :: UniqMap k a -> UniqMap k b -> UniqMap k a #

intersectUniqMap_C :: (a -> b -> c) -> UniqMap k a -> UniqMap k b -> UniqMap k c #

Intersection with a combining function.

disjointUniqMap :: UniqMap k a -> UniqMap k b -> Bool #

mapUniqMap :: (a -> b) -> UniqMap k a -> UniqMap k b #

filterUniqMap :: (a -> Bool) -> UniqMap k a -> UniqMap k a #

filterWithKeyUniqMap :: (k -> a -> Bool) -> UniqMap k a -> UniqMap k a #

partitionUniqMap :: (a -> Bool) -> UniqMap k a -> (UniqMap k a, UniqMap k a) #

sizeUniqMap :: UniqMap k a -> Int #

elemUniqMap :: Uniquable k => k -> UniqMap k a -> Bool #

nonDetKeysUniqMap :: UniqMap k a -> [k] #

nonDetEltsUniqMap :: UniqMap k a -> [a] #

lookupUniqMap :: Uniquable k => UniqMap k a -> k -> Maybe a #

lookupWithDefaultUniqMap :: Uniquable k => UniqMap k a -> a -> k -> a #

anyUniqMap :: (a -> Bool) -> UniqMap k a -> Bool #

allUniqMap :: (a -> Bool) -> UniqMap k a -> Bool #

nonDetUniqMapToList :: UniqMap k a -> [(k, a)] #

nonDetUniqMapToKeySet :: Ord k => UniqMap k a -> Set k #

nonDetFoldUniqMap :: ((k, a) -> b -> b) -> b -> UniqMap k a -> b #