retrie-1.2.3: A powerful, easy-to-use codemodding tool for Haskell.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Retrie.PatternMap.Class

Documentation

data MatchEnv Source #

Constructors

ME 

Fields

type A a = Maybe a -> Maybe a Source #

toA :: PatternMap m => (m a -> m a) -> A (m a) Source #

toAList :: A a -> A [a] Source #

unionOn :: PatternMap m => (a -> m b) -> a -> a -> m b Source #

class PatternMap m where Source #

Associated Types

type Key m :: Type Source #

Methods

mEmpty :: m a Source #

mUnion :: m a -> m a -> m a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key m -> A a -> m a -> m a Source #

mMatch :: MatchEnv -> Key m -> (Substitution, m a) -> [(Substitution, a)] Source #

Instances

Instances details
PatternMap BoolMap Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key BoolMap Source #

PatternMap FSEnv Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key FSEnv Source #

PatternMap IntMap Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key IntMap Source #

PatternMap UniqFM Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key UniqFM Source #

PatternMap MaybeMap Source # 
Instance details

Defined in Retrie.PatternMap.Class

Associated Types

type Key MaybeMap Source #

PatternMap BMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key BMap Source #

Methods

mEmpty :: BMap a Source #

mUnion :: BMap a -> BMap a -> BMap a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key BMap -> A a -> BMap a -> BMap a Source #

mMatch :: MatchEnv -> Key BMap -> (Substitution, BMap a) -> [(Substitution, a)] Source #

PatternMap BoxityMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key BoxityMap Source #

PatternMap CDMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key CDMap Source #

PatternMap EMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key EMap Source #

Methods

mEmpty :: EMap a Source #

mUnion :: EMap a -> EMap a -> EMap a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key EMap -> A a -> EMap a -> EMap a Source #

mMatch :: MatchEnv -> Key EMap -> (Substitution, EMap a) -> [(Substitution, a)] Source #

PatternMap ForAllTyMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key ForAllTyMap Source #

PatternMap ForallVisMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key ForallVisMap Source #

PatternMap GRHSMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key GRHSMap Source #

PatternMap GRHSSMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key GRHSSMap Source #

PatternMap LBMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key LBMap Source #

PatternMap LMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key LMap Source #

Methods

mEmpty :: LMap a Source #

mUnion :: LMap a -> LMap a -> LMap a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key LMap -> A a -> LMap a -> LMap a Source #

mMatch :: MatchEnv -> Key LMap -> (Substitution, LMap a) -> [(Substitution, a)] Source #

PatternMap MGMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key MGMap Source #

PatternMap MMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key MMap Source #

Methods

mEmpty :: MMap a Source #

mUnion :: MMap a -> MMap a -> MMap a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key MMap -> A a -> MMap a -> MMap a Source #

mMatch :: MatchEnv -> Key MMap -> (Substitution, MMap a) -> [(Substitution, a)] Source #

PatternMap OLMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key OLMap Source #

PatternMap PatMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key PatMap Source #

PatternMap RFMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key RFMap Source #

PatternMap SCMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key SCMap Source #

PatternMap SLMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key SLMap Source #

PatternMap SMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key SMap Source #

Methods

mEmpty :: SMap a Source #

mUnion :: SMap a -> SMap a -> SMap a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key SMap -> A a -> SMap a -> SMap a Source #

mMatch :: MatchEnv -> Key SMap -> (Substitution, SMap a) -> [(Substitution, a)] Source #

PatternMap TupArgMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key TupArgMap Source #

PatternMap TupleSortMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key TupleSortMap Source #

PatternMap TyMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key TyMap Source #

PatternMap VMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key VMap Source #

Methods

mEmpty :: VMap a Source #

mUnion :: VMap a -> VMap a -> VMap a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key VMap -> A a -> VMap a -> VMap a Source #

mMatch :: MatchEnv -> Key VMap -> (Substitution, VMap a) -> [(Substitution, a)] Source #

PatternMap UMap Source # 
Instance details

Defined in Retrie.Universe

Associated Types

type Key UMap Source #

Methods

mEmpty :: UMap a Source #

mUnion :: UMap a -> UMap a -> UMap a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key UMap -> A a -> UMap a -> UMap a Source #

mMatch :: MatchEnv -> Key UMap -> (Substitution, UMap a) -> [(Substitution, a)] Source #

Ord k => PatternMap (Map k) Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key (Map k) Source #

Methods

mEmpty :: Map k a Source #

mUnion :: Map k a -> Map k a -> Map k a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key (Map k) -> A a -> Map k a -> Map k a Source #

mMatch :: MatchEnv -> Key (Map k) -> (Substitution, Map k a) -> [(Substitution, a)] Source #

PatternMap m => PatternMap (ListMap m) Source # 
Instance details

Defined in Retrie.PatternMap.Class

Associated Types

type Key (ListMap m) Source #

Methods

mEmpty :: ListMap m a Source #

mUnion :: ListMap m a -> ListMap m a -> ListMap m a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key (ListMap m) -> A a -> ListMap m a -> ListMap m a Source #

mMatch :: MatchEnv -> Key (ListMap m) -> (Substitution, ListMap m a) -> [(Substitution, a)] Source #

mapFor :: (b -> c) -> (a, b) -> [(a, c)] Source #

maybeMap :: (b -> Maybe c) -> (a, b) -> [(a, c)] Source #

maybeListMap :: (b -> Maybe [c]) -> (a, b) -> [(a, c)] Source #

newtype MaybeMap a Source #

Constructors

MaybeMap [a] 

Instances

Instances details
Functor MaybeMap Source # 
Instance details

Defined in Retrie.PatternMap.Class

Methods

fmap :: (a -> b) -> MaybeMap a -> MaybeMap b #

(<$) :: a -> MaybeMap b -> MaybeMap a #

PatternMap MaybeMap Source # 
Instance details

Defined in Retrie.PatternMap.Class

Associated Types

type Key MaybeMap Source #

type Key MaybeMap Source # 
Instance details

Defined in Retrie.PatternMap.Class

type Key MaybeMap = ()

data ListMap m a Source #

Constructors

ListMap 

Fields

Instances

Instances details
Functor m => Functor (ListMap m) Source # 
Instance details

Defined in Retrie.PatternMap.Class

Methods

fmap :: (a -> b) -> ListMap m a -> ListMap m b #

(<$) :: a -> ListMap m b -> ListMap m a #

PatternMap m => PatternMap (ListMap m) Source # 
Instance details

Defined in Retrie.PatternMap.Class

Associated Types

type Key (ListMap m) Source #

Methods

mEmpty :: ListMap m a Source #

mUnion :: ListMap m a -> ListMap m a -> ListMap m a Source #

mAlter :: AlphaEnv -> Quantifiers -> Key (ListMap m) -> A a -> ListMap m a -> ListMap m a Source #

mMatch :: MatchEnv -> Key (ListMap m) -> (Substitution, ListMap m a) -> [(Substitution, a)] Source #

type Key (ListMap m) Source # 
Instance details

Defined in Retrie.PatternMap.Class

type Key (ListMap m) = [Key m]

findMatch :: PatternMap m => MatchEnv -> Key m -> m a -> [(Substitution, a)] Source #

insertMatch :: PatternMap m => AlphaEnv -> Quantifiers -> Key m -> a -> m a -> m a Source #