ghc-8.0.1: The GHC API

Safe HaskellNone
LanguageHaskell2010

TrieMap

Synopsis

Documentation

data CoreMap a Source #

CoreMap a is a map from CoreExpr to a. If you are a client, this is the type you want.

Instances

TrieMap CoreMap # 

Associated Types

type Key (CoreMap :: * -> *) :: * Source #

Methods

emptyTM :: CoreMap a Source #

lookupTM :: Key CoreMap -> CoreMap b -> Maybe b Source #

alterTM :: Key CoreMap -> XT b -> CoreMap b -> CoreMap b Source #

mapTM :: (a -> b) -> CoreMap a -> CoreMap b Source #

foldTM :: (a -> b -> b) -> CoreMap a -> b -> b Source #

Outputable a => Outputable (CoreMap a) # 
type Key CoreMap # 

foldCoreMap :: (a -> b -> b) -> b -> CoreMap a -> b Source #

data TypeMap a Source #

TypeMap a is a map from Type to a. If you are a client, this is the type you want. The keys in this map may have different kinds.

Instances

TrieMap TypeMap # 

Associated Types

type Key (TypeMap :: * -> *) :: * Source #

Methods

emptyTM :: TypeMap a Source #

lookupTM :: Key TypeMap -> TypeMap b -> Maybe b Source #

alterTM :: Key TypeMap -> XT b -> TypeMap b -> TypeMap b Source #

mapTM :: (a -> b) -> TypeMap a -> TypeMap b Source #

foldTM :: (a -> b -> b) -> TypeMap a -> b -> b Source #

type Key TypeMap # 

foldTypeMap :: (a -> b -> b) -> b -> TypeMap a -> b Source #

data LooseTypeMap a Source #

A LooseTypeMap doesn't do a kind-check. Thus, when lookup up (t |> g), you'll find entries inserted under (t), even if (g) is non-reflexive.

Instances

TrieMap LooseTypeMap # 

Associated Types

type Key (LooseTypeMap :: * -> *) :: * Source #

type Key LooseTypeMap # 

data MaybeMap m a Source #

Instances

TrieMap m => TrieMap (MaybeMap m) # 

Associated Types

type Key (MaybeMap m :: * -> *) :: * Source #

Methods

emptyTM :: MaybeMap m a Source #

lookupTM :: Key (MaybeMap m) -> MaybeMap m b -> Maybe b Source #

alterTM :: Key (MaybeMap m) -> XT b -> MaybeMap m b -> MaybeMap m b Source #

mapTM :: (a -> b) -> MaybeMap m a -> MaybeMap m b Source #

foldTM :: (a -> b -> b) -> MaybeMap m a -> b -> b Source #

type Key (MaybeMap m) # 
type Key (MaybeMap m) = Maybe (Key m)

data ListMap m a Source #

Instances

TrieMap m => TrieMap (ListMap m) # 

Associated Types

type Key (ListMap m :: * -> *) :: * Source #

Methods

emptyTM :: ListMap m a Source #

lookupTM :: Key (ListMap m) -> ListMap m b -> Maybe b Source #

alterTM :: Key (ListMap m) -> XT b -> ListMap m b -> ListMap m b Source #

mapTM :: (a -> b) -> ListMap m a -> ListMap m b Source #

foldTM :: (a -> b -> b) -> ListMap m a -> b -> b Source #

type Key (ListMap m) # 
type Key (ListMap m) = [Key m]

class TrieMap m where Source #

Minimal complete definition

emptyTM, lookupTM, alterTM, mapTM, foldTM

Associated Types

type Key m :: * Source #

Methods

emptyTM :: m a Source #

lookupTM :: forall b. Key m -> m b -> Maybe b Source #

alterTM :: forall b. Key m -> XT b -> m b -> m b Source #

mapTM :: (a -> b) -> m a -> m b Source #

foldTM :: (a -> b -> b) -> m a -> b -> b Source #

Instances

TrieMap IntMap # 

Associated Types

type Key (IntMap :: * -> *) :: * Source #

Methods

emptyTM :: IntMap a Source #

lookupTM :: Key IntMap -> IntMap b -> Maybe b Source #

alterTM :: Key IntMap -> XT b -> IntMap b -> IntMap b Source #

mapTM :: (a -> b) -> IntMap a -> IntMap b Source #

foldTM :: (a -> b -> b) -> IntMap a -> b -> b Source #

TrieMap UniqFM # 

Associated Types

type Key (UniqFM :: * -> *) :: * Source #

Methods

emptyTM :: UniqFM a Source #

lookupTM :: Key UniqFM -> UniqFM b -> Maybe b Source #

alterTM :: Key UniqFM -> XT b -> UniqFM b -> UniqFM b Source #

mapTM :: (a -> b) -> UniqFM a -> UniqFM b Source #

foldTM :: (a -> b -> b) -> UniqFM a -> b -> b Source #

TrieMap LooseTypeMap # 

Associated Types

type Key (LooseTypeMap :: * -> *) :: * Source #

TrieMap TypeMap # 

Associated Types

type Key (TypeMap :: * -> *) :: * Source #

Methods

emptyTM :: TypeMap a Source #

lookupTM :: Key TypeMap -> TypeMap b -> Maybe b Source #

alterTM :: Key TypeMap -> XT b -> TypeMap b -> TypeMap b Source #

mapTM :: (a -> b) -> TypeMap a -> TypeMap b Source #

foldTM :: (a -> b -> b) -> TypeMap a -> b -> b Source #

TrieMap CoreMap # 

Associated Types

type Key (CoreMap :: * -> *) :: * Source #

Methods

emptyTM :: CoreMap a Source #

lookupTM :: Key CoreMap -> CoreMap b -> Maybe b Source #

alterTM :: Key CoreMap -> XT b -> CoreMap b -> CoreMap b Source #

mapTM :: (a -> b) -> CoreMap a -> CoreMap b Source #

foldTM :: (a -> b -> b) -> CoreMap a -> b -> b Source #

Ord k => TrieMap (Map k) # 

Associated Types

type Key (Map k :: * -> *) :: * Source #

Methods

emptyTM :: Map k a Source #

lookupTM :: Key (Map k) -> Map k b -> Maybe b Source #

alterTM :: Key (Map k) -> XT b -> Map k b -> Map k b Source #

mapTM :: (a -> b) -> Map k a -> Map k b Source #

foldTM :: (a -> b -> b) -> Map k a -> b -> b Source #

TrieMap m => TrieMap (ListMap m) # 

Associated Types

type Key (ListMap m :: * -> *) :: * Source #

Methods

emptyTM :: ListMap m a Source #

lookupTM :: Key (ListMap m) -> ListMap m b -> Maybe b Source #

alterTM :: Key (ListMap m) -> XT b -> ListMap m b -> ListMap m b Source #

mapTM :: (a -> b) -> ListMap m a -> ListMap m b Source #

foldTM :: (a -> b -> b) -> ListMap m a -> b -> b Source #

TrieMap m => TrieMap (MaybeMap m) # 

Associated Types

type Key (MaybeMap m :: * -> *) :: * Source #

Methods

emptyTM :: MaybeMap m a Source #

lookupTM :: Key (MaybeMap m) -> MaybeMap m b -> Maybe b Source #

alterTM :: Key (MaybeMap m) -> XT b -> MaybeMap m b -> MaybeMap m b Source #

mapTM :: (a -> b) -> MaybeMap m a -> MaybeMap m b Source #

foldTM :: (a -> b -> b) -> MaybeMap m a -> b -> b Source #

insertTM :: TrieMap m => Key m -> a -> m a -> m a Source #

deleteTM :: TrieMap m => Key m -> m a -> m a Source #