{-# 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
, 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 :: Options -> [RewriteSpec] -> IO [Rewrite Universe]
parseRewrites :: Options -> [RewriteSpec] -> IO [Rewrite Universe]
parseRewrites = Options -> [RewriteSpec] -> IO [Rewrite Universe]
forall a b. Options_ a b -> [RewriteSpec] -> IO [Rewrite Universe]
parseRewritesInternal
parseQueries
:: Options -> [(Quantifiers, QuerySpec, v)] -> IO [Query Universe v]
parseQueries :: Options -> [(Quantifiers, QuerySpec, v)] -> IO [Query Universe v]
parseQueries Options{Bool
Int
FilePath
[FilePath]
[Rewrite Universe]
[RoundTrip]
FixityEnv
AnnotatedImports
Verbosity
ExecutionMode
ColoriseFun
verbosity :: forall rewrites imports. Options_ rewrites imports -> Verbosity
targetFiles :: forall rewrites imports. Options_ rewrites imports -> [FilePath]
targetDir :: forall rewrites imports. Options_ rewrites imports -> FilePath
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 -> [FilePath]
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 :: [FilePath]
targetDir :: FilePath
singleThreaded :: Bool
roundtrips :: [RoundTrip]
rewrites :: [Rewrite Universe]
randomOrder :: Bool
noDefaultElaborations :: Bool
iterateN :: Int
fixityEnv :: FixityEnv
extraIgnores :: [FilePath]
executionMode :: ExecutionMode
elaborations :: [Rewrite Universe]
colorise :: ColoriseFun
additionalImports :: AnnotatedImports
..} = FixityEnv -> [(Quantifiers, QuerySpec, v)] -> IO [Query Universe v]
forall v.
FixityEnv -> [(Quantifiers, QuerySpec, v)] -> IO [Query Universe v]
parseQuerySpecs FixityEnv
fixityEnv