-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Perform refactorings specified by the refact library.
--   
--   Perform refactorings specified by the refact library. It is primarily
--   used with HLint's --refactor flag.
@package apply-refact
@version 0.6.0.0

module Refact.Utils
type Module = (Located (HsModule GhcPs))
type Stmt = ExprLStmt GhcPs
type Expr = Located (HsExpr GhcPs)
type Decl = Located (HsDecl GhcPs)
type Name = Located RdrName
type Pat = LPat GhcPs
type Type = Located (HsType GhcPs)
type Import = LImportDecl GhcPs
type FunBind = HsMatchContext RdrName
type M a = State Anns a

-- | Left bias pair union
mergeAnns :: Anns -> Anns -> Anns

-- | Perform the necessary adjustments to annotations when replacing one
--   Located thing with another Located thing.
--   
--   For example, this function will ensure the correct relative position
--   and make sure that any trailing semi colons or commas are transferred.
modifyAnnKey :: (Data old, Data new, Data mod) => mod -> Located old -> Located new -> M (Located new)

-- | Lower level version of <tt>modifyAnnKey</tt>
replaceAnnKey :: Anns -> AnnKey -> AnnKey -> AnnKey -> AnnKey -> Anns

-- | Convert a <tt>Refact.Types.SrcSpan</tt> to a <tt>SrcLoc.SrcSpan</tt>
toGhcSrcSpan :: FilePath -> SrcSpan -> SrcSpan

-- | A parent in this case is an element which has the same SrcSpan
findParent :: Data a => SrcSpan -> Anns -> a -> Maybe AnnKey

module Refact.Fixity

-- | Rearrange infix expressions to account for fixity. The set of fixities
--   is wired in and includes all fixities in base.
applyFixities :: Anns -> Module -> (Anns, Module)

module Refact.Apply

-- | Peform a <tt>Refactoring</tt>.
runRefactoring :: Data a => Anns -> a -> Refactoring SrcSpan -> State Int (Anns, a)

-- | Apply a set of refactorings as supplied by hlint
applyRefactorings :: Maybe (Int, Int) -> [(String, [Refactoring SrcSpan])] -> FilePath -> IO String
data Verbosity
Silent :: Verbosity
Normal :: Verbosity
Loud :: Verbosity
rigidLayout :: DeltaOptions
removeOverlap :: Verbosity -> [(String, [Refactoring SrcSpan])] -> [(String, [Refactoring SrcSpan])]
refactOptions :: PrintOptions Identity String
instance GHC.Classes.Ord Refact.Apply.Verbosity
instance GHC.Show.Show Refact.Apply.Verbosity
instance GHC.Classes.Eq Refact.Apply.Verbosity
