cabal-fmt-0.1.4: Format .cabal files

LicenseGPL-3.0-or-later
Safe HaskellNone
LanguageHaskell2010

CabalFmt.Refactoring.Type

Description

Copyright: Oleg Grenrus

Synopsis

Documentation

type Refactoring = forall r m. MonadCabalFmt r m => Refactoring' r m Source #

traverseFields :: Applicative f => RefactoringOfField' r f -> [Field CommentsPragmas] -> f [Field CommentsPragmas] Source #

Allows modification of single field

E.g. sorting extensions *could* be done as refactoring, though it's currently implemented in special pretty-printer.

rewriteFields :: Monad m => (Field CommentsPragmas -> m (Maybe (Field CommentsPragmas))) -> [Field CommentsPragmas] -> m [Field CommentsPragmas] Source #

A top-to-bottom rewrite of sections and fields