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

Retrie.Replace

Synopsis

Documentation

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

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

data Replacement #

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 # 
Instance details

Defined in Retrie.Replace

data Change #

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

Instances

Instances details
Monoid Change # 
Instance details

Defined in Retrie.Replace

Semigroup Change # 
Instance details

Defined in Retrie.Replace