FastStringEnv

ghc-8.4.4: The GHC API

Safe Haskell | None
Language | Haskell2010

FastStringEnv

Contents

- FastString environments (maps)
  - Manipulating these environments
- Deterministic FastString environments (maps)
  - Manipulating these environments

Synopsis

- type FastStringEnv a = UniqFM a
- mkFsEnv :: [(FastString, a)] -> FastStringEnv a
- emptyFsEnv :: FastStringEnv a
- unitFsEnv :: FastString -> a -> FastStringEnv a
- extendFsEnv_C :: (a -> a -> a) -> FastStringEnv a -> FastString -> a -> FastStringEnv a
- extendFsEnv_Acc :: (a -> b -> b) -> (a -> b) -> FastStringEnv b -> FastString -> a -> FastStringEnv b
- extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a
- extendFsEnvList :: FastStringEnv a -> [(FastString, a)] -> FastStringEnv a
- extendFsEnvList_C :: (a -> a -> a) -> FastStringEnv a -> [(FastString, a)] -> FastStringEnv a
- filterFsEnv :: (elt -> Bool) -> FastStringEnv elt -> FastStringEnv elt
- plusFsEnv :: FastStringEnv a -> FastStringEnv a -> FastStringEnv a
- plusFsEnv_C :: (a -> a -> a) -> FastStringEnv a -> FastStringEnv a -> FastStringEnv a
- alterFsEnv :: (Maybe a -> Maybe a) -> FastStringEnv a -> FastString -> FastStringEnv a
- lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a
- lookupFsEnv_NF :: FastStringEnv a -> FastString -> a
- delFromFsEnv :: FastStringEnv a -> FastString -> FastStringEnv a
- delListFromFsEnv :: FastStringEnv a -> [FastString] -> FastStringEnv a
- elemFsEnv :: FastString -> FastStringEnv a -> Bool
- mapFsEnv :: (elt1 -> elt2) -> FastStringEnv elt1 -> FastStringEnv elt2
- type DFastStringEnv a = UniqDFM a
- mkDFsEnv :: [(FastString, a)] -> DFastStringEnv a
- emptyDFsEnv :: DFastStringEnv a
- dFsEnvElts :: DFastStringEnv a -> [a]
- lookupDFsEnv :: DFastStringEnv a -> FastString -> Maybe a

# FastString environments (maps)

type FastStringEnv a = UniqFM a #

A non-deterministic set of FastStrings. See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not deterministic and why it matters. Use DFastStringEnv if the set eventually gets converted into a list or folded over in a way where the order changes the generated code.

## Manipulating these environments

mkFsEnv :: [(FastString, a)] -> FastStringEnv a #

emptyFsEnv :: FastStringEnv a #

unitFsEnv :: FastString -> a -> FastStringEnv a #

extendFsEnv_C :: (a -> a -> a) -> FastStringEnv a -> FastString -> a -> FastStringEnv a #

extendFsEnv_Acc :: (a -> b -> b) -> (a -> b) -> FastStringEnv b -> FastString -> a -> FastStringEnv b #

extendFsEnv :: FastStringEnv a -> FastString -> a -> FastStringEnv a #

extendFsEnvList :: FastStringEnv a -> [(FastString, a)] -> FastStringEnv a #

extendFsEnvList_C :: (a -> a -> a) -> FastStringEnv a -> [(FastString, a)] -> FastStringEnv a #

filterFsEnv :: (elt -> Bool) -> FastStringEnv elt -> FastStringEnv elt #

plusFsEnv :: FastStringEnv a -> FastStringEnv a -> FastStringEnv a #

plusFsEnv_C :: (a -> a -> a) -> FastStringEnv a -> FastStringEnv a -> FastStringEnv a #

alterFsEnv :: (Maybe a -> Maybe a) -> FastStringEnv a -> FastString -> FastStringEnv a #

lookupFsEnv :: FastStringEnv a -> FastString -> Maybe a #

lookupFsEnv_NF :: FastStringEnv a -> FastString -> a #

delFromFsEnv :: FastStringEnv a -> FastString -> FastStringEnv a #

delListFromFsEnv :: FastStringEnv a -> [FastString] -> FastStringEnv a #

elemFsEnv :: FastString -> FastStringEnv a -> Bool #

mapFsEnv :: (elt1 -> elt2) -> FastStringEnv elt1 -> FastStringEnv elt2 #

# Deterministic FastString environments (maps)

type DFastStringEnv a = UniqDFM a #

## Manipulating these environments

mkDFsEnv :: [(FastString, a)] -> DFastStringEnv a #

emptyDFsEnv :: DFastStringEnv a #

dFsEnvElts :: DFastStringEnv a -> [a] #

lookupDFsEnv :: DFastStringEnv a -> FastString -> Maybe a #