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

Retrie.Universe

Synopsis

Documentation

data Universe Source #

A sum type to collect all possible top-level rewritable types.

Instances

Instances details
Data Universe Source # 
Instance details

Defined in Retrie.Universe

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Universe -> c Universe #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Universe #

toConstr :: Universe -> Constr #

dataTypeOf :: Universe -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Universe) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Universe) #

gmapT :: (forall b. Data b => b -> b) -> Universe -> Universe #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Universe -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Universe -> r #

gmapQ :: (forall d. Data d => d -> u) -> Universe -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Universe -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Universe -> m Universe #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Universe -> m Universe #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Universe -> m Universe #

Matchable Universe Source # 
Instance details

Defined in Retrie.Universe

printU :: Annotated Universe -> String Source #

Exactprint an annotated Universe.

class Matchable ast where Source #

Class of types which can be injected into the Universe type.

Methods

inject :: ast -> Universe Source #

Inject an AST into Universe

project :: Universe -> ast Source #

Project an AST from a Universe. Can fail if universe contains the wrong type.

getOrigin :: ast -> SrcSpan Source #

Get the original location of the AST.

data UMap a Source #

The pattern map for Universe.

Constructors

UMap 

Fields

Instances

Instances details
Functor UMap Source # 
Instance details

Defined in Retrie.Universe

Methods

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

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

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 #

type Key UMap Source # 
Instance details

Defined in Retrie.Universe