Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RewriteSpec
- type QualifiedName = String
- parseRewriteSpecs :: (FilePath -> IO (CPP AnnotatedModule)) -> FixityEnv -> [RewriteSpec] -> IO [Rewrite Universe]
- parseQualified :: String -> Either String (FilePath, FastString)
- parseAdhocs :: FixityEnv -> [String] -> IO [Rewrite Universe]
Documentation
data RewriteSpec Source #
Possible ways to specify rewrites to parseRewrites
.
Adhoc String | Equation in RULES-format. (e.g. |
AdhocPattern String | Equation in pattern-synonym format, _without_ the keyword |
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"
)
parseRewriteSpecs :: (FilePath -> IO (CPP AnnotatedModule)) -> FixityEnv -> [RewriteSpec] -> IO [Rewrite Universe] Source #
parseQualified :: String -> Either String (FilePath, FastString) Source #