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

Safe HaskellNone
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).

data Change Source #

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

Instances
Semigroup Change Source # 
Instance details

Defined in Retrie.Replace

Monoid Change Source # 
Instance details

Defined in Retrie.Replace