-- 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. @package apply-refact @version 0.2.0.0 module Refact.Utils type Module = Located (HsModule RdrName) type Stmt = ExprLStmt RdrName type Expr = Located (HsExpr RdrName) type Decl = Located (HsDecl RdrName) type Name = Located RdrName type Pat = LPat RdrName type Type = Located (HsType RdrName) type Import = LImportDecl 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 modifyAnnKey replaceAnnKey :: Anns -> AnnKey -> AnnKey -> AnnKey -> AnnKey -> Anns -- | Convert a Refact.Types.SrcSpan to a SrcLoc.SrcSpan toGhcSrcSpan :: FilePath -> SrcSpan -> SrcSpan -- | A parent in this case is an element which has the same SrcSpan findParent :: Data a => SrcSpan -> 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 Refactoring. 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