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

Retrie.Replace

Synopsis

Documentation

replace :: (Data a, MonadIO m) => Context -> a -> TransformT (WriterT Change m) a Source #

Specializes replaceImpl to each of the AST types that retrie supports.

data Replacement Source #

Records a replacement made. In cases where we cannot use ghc-exactprint to print the resulting AST (e.g. CPP modules), we fall back on splicing strings. Can also be used by external tools (search, linters, etc).

Instances

Instances details
Show Replacement Source # 
Instance details

Defined in Retrie.Replace

data Change Source #

Used as the writer type during matching to indicate whether any change to the module should be made.

Instances

Instances details
Monoid Change Source # 
Instance details

Defined in Retrie.Replace

Semigroup Change Source # 
Instance details

Defined in Retrie.Replace