{-# LANGUAGE RecordWildCards #-}
module Retrie
(
runScript
, runScriptWithModifiedOptions
, parseImports
, parseQueries
, QuerySpec(..)
, parseRewrites
, RewriteSpec(..)
, QualifiedName
, Retrie
, apply
, applyWithStrategy
, applyWithUpdate
, applyWithUpdateAndStrategy
, addImports
, ifChanged
, iterateR
, focus
, query
, queryWithUpdate
, bottomUp
, topDown
, topDownPrune
, MatchResultTransformer
, defaultTransformer
, MatchResult(..)
, Annotated
, astA
, AnnotatedHsDecl
, AnnotatedHsExpr
, AnnotatedHsType
, AnnotatedImports
, AnnotatedModule
, AnnotatedPat
, AnnotatedStmt
, LibDir
, parseDecl
, parseExpr
, parsePattern
, parseStmt
, parseType
, transformA
, graftA
, pruneA
, trimA
, printA
, module Retrie.Expr
, Context(..)
, ContextUpdater
, updateContext
, Options
, Options_(..)
, Verbosity(..)
, module Retrie.Quantifiers
, Query(..)
, Rewrite
, Template(..)
, mkRewrite
, ppRewrite
, addRewriteImports
, setRewriteTransformer
, subst
, module Retrie.Substitution
, Universe
, Matchable(..)
, toURewrite
, fromURewrite
, module Retrie.GHC
) where
import Retrie.Context
import Retrie.ExactPrint.Annotated hiding (unsafeMkA)
import Retrie.ExactPrint
import Retrie.Expr
import Retrie.Fixity
import Retrie.GHC
import Retrie.Monad
import Retrie.Options
import Retrie.Quantifiers
import Retrie.Query
( QuerySpec(..)
, parseQuerySpecs
)
import Retrie.Rewrites
import Retrie.Run
import Retrie.Subst
import Retrie.Substitution
import Retrie.SYB
import Retrie.Types
import Retrie.Universe
import Retrie.Util
parseRewrites :: LibDir -> Options -> [RewriteSpec] -> IO [Rewrite Universe]
parseRewrites :: LibDir -> Options -> [RewriteSpec] -> IO [Rewrite Universe]
parseRewrites = forall a b.
LibDir -> Options_ a b -> [RewriteSpec] -> IO [Rewrite Universe]
parseRewritesInternal
parseQueries
:: LibDir -> Options -> [(Quantifiers, QuerySpec, v)] -> IO [Query Universe v]
parseQueries :: forall v.
LibDir
-> Options
-> [(Quantifiers, QuerySpec, v)]
-> IO [Query Universe v]
parseQueries LibDir
libdir Options{Bool
Int
LibDir
[LibDir]
[Rewrite Universe]
[RoundTrip]
FixityEnv
AnnotatedImports
Verbosity
ExecutionMode
ColoriseFun
verbosity :: forall rewrites imports. Options_ rewrites imports -> Verbosity
targetFiles :: forall rewrites imports. Options_ rewrites imports -> [LibDir]
targetDir :: forall rewrites imports. Options_ rewrites imports -> LibDir
singleThreaded :: forall rewrites imports. Options_ rewrites imports -> Bool
roundtrips :: forall rewrites imports. Options_ rewrites imports -> [RoundTrip]
rewrites :: forall rewrites imports. Options_ rewrites imports -> rewrites
randomOrder :: forall rewrites imports. Options_ rewrites imports -> Bool
noDefaultElaborations :: forall rewrites imports. Options_ rewrites imports -> Bool
iterateN :: forall rewrites imports. Options_ rewrites imports -> Int
fixityEnv :: forall rewrites imports. Options_ rewrites imports -> FixityEnv
extraIgnores :: forall rewrites imports. Options_ rewrites imports -> [LibDir]
executionMode :: forall rewrites imports. Options_ rewrites imports -> ExecutionMode
elaborations :: forall rewrites imports. Options_ rewrites imports -> rewrites
colorise :: forall rewrites imports. Options_ rewrites imports -> ColoriseFun
additionalImports :: forall rewrites imports. Options_ rewrites imports -> imports
verbosity :: Verbosity
targetFiles :: [LibDir]
targetDir :: LibDir
singleThreaded :: Bool
roundtrips :: [RoundTrip]
rewrites :: [Rewrite Universe]
randomOrder :: Bool
noDefaultElaborations :: Bool
iterateN :: Int
fixityEnv :: FixityEnv
extraIgnores :: [LibDir]
executionMode :: ExecutionMode
elaborations :: [Rewrite Universe]
colorise :: ColoriseFun
additionalImports :: AnnotatedImports
..} = forall v.
LibDir
-> FixityEnv
-> [(Quantifiers, QuerySpec, v)]
-> IO [Query Universe v]
parseQuerySpecs LibDir
libdir FixityEnv
fixityEnv