License | GPL-3.0-or-later |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Copyright: Oleg Grenrus
Synopsis
- type Refactoring = forall r m. MonadCabalFmt r m => Refactoring' r m
- type Refactoring' r m = [Field CommentsPragmas] -> m [Field CommentsPragmas]
- type RefactoringOfField = forall r m. MonadCabalFmt r m => RefactoringOfField' r m
- type RefactoringOfField' r m = Name CommentsPragmas -> [FieldLine CommentsPragmas] -> m (Name CommentsPragmas, [FieldLine CommentsPragmas])
- type CommentsPragmas = (Comments, [Pragma])
- traverseFields :: Applicative f => RefactoringOfField' r f -> [Field CommentsPragmas] -> f [Field CommentsPragmas]
Documentation
type Refactoring = forall r m. MonadCabalFmt r m => Refactoring' r m Source #
type Refactoring' r m = [Field CommentsPragmas] -> m [Field CommentsPragmas] Source #
type RefactoringOfField = forall r m. MonadCabalFmt r m => RefactoringOfField' r m Source #
type RefactoringOfField' r m = Name CommentsPragmas -> [FieldLine CommentsPragmas] -> m (Name CommentsPragmas, [FieldLine CommentsPragmas]) Source #
type CommentsPragmas = (Comments, [Pragma]) 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.