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

Retrie.Rewrites

Synopsis

Documentation

data RewriteSpec Source #

Possible ways to specify rewrites to parseRewrites.

Constructors

Adhoc String

Equation in RULES-format. (e.g. "forall x. succ (pred x) = x") Will be applied left-to-right.

AdhocPattern String

Equation in pattern-synonym format, _without_ the keyword pattern.

AdhocType String

Equation in type-synonym format, _without_ the keyword 'type'.

Fold QualifiedName

Fold a function definition. The inverse of unfolding/inlining. Replaces instances of the function body with calls to the function.

RuleBackward QualifiedName

Apply a GHC RULE right-to-left.

RuleForward QualifiedName

Apply a GHC RULE left-to-right.

TypeBackward QualifiedName

Apply a type synonym right-to-left.

TypeForward QualifiedName

Apply a type synonym left-to-right.

Unfold QualifiedName

Unfold, or inline, a function definition.

PatternForward QualifiedName

Unfold a pattern synonym

PatternBackward QualifiedName

Fold a pattern synonym, replacing instances of the rhs with the synonym

type QualifiedName = String Source #

A qualified name. (e.g. "Module.Name.functionName")