retrie-0.1.0.0: A powerful, easy-to-use codemodding tool for Haskell.

Safe HaskellNone
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 #

class PatternMap m where Source #

Associated Types

type Key m :: * 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
PatternMap MaybeMap Source # 
Instance details

Defined in Retrie.PatternMap.Class

Associated Types

type Key MaybeMap :: Type Source #

PatternMap UniqFM Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key UniqFM :: Type Source #

PatternMap FSEnv Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key FSEnv :: Type Source #

PatternMap IntMap Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key IntMap :: Type Source #

PatternMap BoolMap Source # 
Instance details

Defined in Retrie.PatternMap.Bag

Associated Types

type Key BoolMap :: Type Source #

PatternMap RFMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key RFMap :: Type Source #

PatternMap TyMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key TyMap :: Type Source #

PatternMap SMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key SMap :: Type 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 BMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key BMap :: Type 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 LBMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key LBMap :: Type Source #

PatternMap SLMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key SLMap :: Type Source #

PatternMap GRHSMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key GRHSMap :: Type Source #

PatternMap GRHSSMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key GRHSSMap :: Type Source #

PatternMap PatMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key PatMap :: Type Source #

PatternMap CDMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key CDMap :: Type Source #

PatternMap MMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key MMap :: Type 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 MGMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key MGMap :: Type Source #

PatternMap SCMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key SCMap :: Type Source #

PatternMap EMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key EMap :: Type 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 OLMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key OLMap :: Type Source #

PatternMap LMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key LMap :: Type 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 VMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key VMap :: Type 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 BoxityMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key BoxityMap :: Type Source #

PatternMap TupArgMap Source # 
Instance details

Defined in Retrie.PatternMap.Instances

Associated Types

type Key TupArgMap :: Type Source #

PatternMap UMap Source # 
Instance details

Defined in Retrie.Universe

Associated Types

type Key UMap :: Type 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 #

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

Defined in Retrie.PatternMap.Class

Associated Types

type Key (ListMap m) :: Type 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 #

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

Defined in Retrie.PatternMap.Bag

Associated Types

type Key (Map k) :: Type 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 #

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
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 :: Type Source #

type Key MaybeMap Source # 
Instance details

Defined in Retrie.PatternMap.Class

type Key MaybeMap = ()

data ListMap m a Source #

Constructors

ListMap 

Fields

Instances
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) :: Type 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 #