-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A flexible Haskell source code pretty printer
--
-- A flexible Haskell source code pretty printer.
--
-- See the Github page for usage/explanation:
-- https://github.com/ennocramer/floskell
@package floskell
@version 0.9.0
-- | An outout buffer for ByteStrings that keeps track of line and column
-- numbers.
module Floskell.Buffer
data Buffer
-- | An empty output buffer.
empty :: Buffer
-- | Append a newline to the output buffer.
newline :: Buffer -> Buffer
-- | Append a ByteString to the output buffer. It is an error for the
-- string to contain newlines.
write :: ByteString -> Buffer -> Buffer
-- | Return the current line number, counting from 0.
line :: Buffer -> Int64
-- | Return the column number, counting from 0.
column :: Buffer -> Int64
-- | Return the contents of the output buffer as a lazy ByteString.
toLazyByteString :: Buffer -> ByteString
module Floskell.Config
data Indent
Align :: Indent
IndentBy :: !Int -> Indent
AlignOrIndentBy :: !Int -> Indent
data LayoutContext
Declaration :: LayoutContext
Type :: LayoutContext
Pattern :: LayoutContext
Expression :: LayoutContext
Other :: LayoutContext
data Location
Before :: Location
After :: Location
data WsLoc
WsNone :: WsLoc
WsBefore :: WsLoc
WsAfter :: WsLoc
WsBoth :: WsLoc
data Whitespace
Whitespace :: !WsLoc -> !WsLoc -> !Bool -> Whitespace
[wsSpaces] :: Whitespace -> !WsLoc
[wsLinebreaks] :: Whitespace -> !WsLoc
[wsForceLinebreak] :: Whitespace -> !Bool
data Layout
Flex :: Layout
Vertical :: Layout
TryOneline :: Layout
data ConfigMapKey
ConfigMapKey :: !Maybe ByteString -> !Maybe LayoutContext -> ConfigMapKey
data ConfigMap a
ConfigMap :: !a -> !Map ConfigMapKey a -> ConfigMap a
[cfgMapDefault] :: ConfigMap a -> !a
[cfgMapOverrides] :: ConfigMap a -> !Map ConfigMapKey a
data PenaltyConfig
PenaltyConfig :: !Int -> !Int -> !Int -> !Int -> !Int -> PenaltyConfig
[penaltyMaxLineLength] :: PenaltyConfig -> !Int
[penaltyLinebreak] :: PenaltyConfig -> !Int
[penaltyIndent] :: PenaltyConfig -> !Int
[penaltyOverfull] :: PenaltyConfig -> !Int
[penaltyOverfullOnce] :: PenaltyConfig -> !Int
data AlignConfig
AlignConfig :: !(Int, Int) -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> AlignConfig
[cfgAlignLimits] :: AlignConfig -> !(Int, Int)
[cfgAlignCase] :: AlignConfig -> !Bool
[cfgAlignClass] :: AlignConfig -> !Bool
[cfgAlignImportModule] :: AlignConfig -> !Bool
[cfgAlignImportSpec] :: AlignConfig -> !Bool
[cfgAlignLetBinds] :: AlignConfig -> !Bool
[cfgAlignRecordFields] :: AlignConfig -> !Bool
[cfgAlignWhere] :: AlignConfig -> !Bool
data IndentConfig
IndentConfig :: !Int -> !Int -> !Int -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> !Indent -> IndentConfig
[cfgIndentOnside] :: IndentConfig -> !Int
[cfgIndentDeriving] :: IndentConfig -> !Int
[cfgIndentWhere] :: IndentConfig -> !Int
[cfgIndentApp] :: IndentConfig -> !Indent
[cfgIndentCase] :: IndentConfig -> !Indent
[cfgIndentClass] :: IndentConfig -> !Indent
[cfgIndentDo] :: IndentConfig -> !Indent
[cfgIndentExportSpecList] :: IndentConfig -> !Indent
[cfgIndentIf] :: IndentConfig -> !Indent
[cfgIndentImportSpecList] :: IndentConfig -> !Indent
[cfgIndentLet] :: IndentConfig -> !Indent
[cfgIndentLetBinds] :: IndentConfig -> !Indent
[cfgIndentLetIn] :: IndentConfig -> !Indent
[cfgIndentMultiIf] :: IndentConfig -> !Indent
[cfgIndentWhereBinds] :: IndentConfig -> !Indent
data LayoutConfig
LayoutConfig :: !Layout -> !Layout -> !Layout -> !Layout -> !Layout -> !Layout -> !Layout -> !Layout -> !Layout -> !Layout -> !Layout -> LayoutConfig
[cfgLayoutApp] :: LayoutConfig -> !Layout
[cfgLayoutConDecls] :: LayoutConfig -> !Layout
[cfgLayoutDeclaration] :: LayoutConfig -> !Layout
[cfgLayoutExportSpecList] :: LayoutConfig -> !Layout
[cfgLayoutIf] :: LayoutConfig -> !Layout
[cfgLayoutImportSpecList] :: LayoutConfig -> !Layout
[cfgLayoutInfixApp] :: LayoutConfig -> !Layout
[cfgLayoutLet] :: LayoutConfig -> !Layout
[cfgLayoutListComp] :: LayoutConfig -> !Layout
[cfgLayoutRecord] :: LayoutConfig -> !Layout
[cfgLayoutTypesig] :: LayoutConfig -> !Layout
newtype OpConfig
OpConfig :: ConfigMap Whitespace -> OpConfig
[unOpConfig] :: OpConfig -> ConfigMap Whitespace
newtype GroupConfig
GroupConfig :: ConfigMap Whitespace -> GroupConfig
[unGroupConfig] :: GroupConfig -> ConfigMap Whitespace
data OptionConfig
OptionConfig :: !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> OptionConfig
[cfgOptionSortPragmas] :: OptionConfig -> !Bool
[cfgOptionSplitLanguagePragmas] :: OptionConfig -> !Bool
[cfgOptionSortImports] :: OptionConfig -> !Bool
[cfgOptionSortImportLists] :: OptionConfig -> !Bool
[cfgOptionPreserveVerticalSpace] :: OptionConfig -> !Bool
data FlexConfig
FlexConfig :: !PenaltyConfig -> !AlignConfig -> !IndentConfig -> !LayoutConfig -> !OpConfig -> !GroupConfig -> !OptionConfig -> FlexConfig
[cfgPenalty] :: FlexConfig -> !PenaltyConfig
[cfgAlign] :: FlexConfig -> !AlignConfig
[cfgIndent] :: FlexConfig -> !IndentConfig
[cfgLayout] :: FlexConfig -> !LayoutConfig
[cfgOp] :: FlexConfig -> !OpConfig
[cfgGroup] :: FlexConfig -> !GroupConfig
[cfgOptions] :: FlexConfig -> !OptionConfig
defaultFlexConfig :: FlexConfig
safeFlexConfig :: FlexConfig -> FlexConfig
cfgMapFind :: LayoutContext -> ByteString -> ConfigMap a -> a
cfgOpWs :: LayoutContext -> ByteString -> OpConfig -> Whitespace
cfgGroupWs :: LayoutContext -> ByteString -> GroupConfig -> Whitespace
inWs :: Location -> WsLoc -> Bool
wsSpace :: Location -> Whitespace -> Bool
wsLinebreak :: Location -> Whitespace -> Bool
instance GHC.Generics.Generic Floskell.Config.FlexConfig
instance GHC.Generics.Generic Floskell.Config.OptionConfig
instance GHC.Generics.Generic Floskell.Config.GroupConfig
instance GHC.Generics.Generic Floskell.Config.OpConfig
instance GHC.Generics.Generic Floskell.Config.LayoutConfig
instance GHC.Generics.Generic Floskell.Config.IndentConfig
instance GHC.Generics.Generic Floskell.Config.AlignConfig
instance GHC.Generics.Generic Floskell.Config.PenaltyConfig
instance GHC.Generics.Generic (Floskell.Config.ConfigMap a)
instance GHC.Show.Show Floskell.Config.ConfigMapKey
instance GHC.Classes.Ord Floskell.Config.ConfigMapKey
instance GHC.Classes.Eq Floskell.Config.ConfigMapKey
instance GHC.Generics.Generic Floskell.Config.Layout
instance GHC.Show.Show Floskell.Config.Layout
instance GHC.Enum.Enum Floskell.Config.Layout
instance GHC.Enum.Bounded Floskell.Config.Layout
instance GHC.Classes.Ord Floskell.Config.Layout
instance GHC.Classes.Eq Floskell.Config.Layout
instance GHC.Generics.Generic Floskell.Config.Whitespace
instance GHC.Show.Show Floskell.Config.Whitespace
instance GHC.Generics.Generic Floskell.Config.WsLoc
instance GHC.Show.Show Floskell.Config.WsLoc
instance GHC.Enum.Enum Floskell.Config.WsLoc
instance GHC.Enum.Bounded Floskell.Config.WsLoc
instance GHC.Classes.Ord Floskell.Config.WsLoc
instance GHC.Classes.Eq Floskell.Config.WsLoc
instance GHC.Generics.Generic Floskell.Config.Location
instance GHC.Show.Show Floskell.Config.Location
instance GHC.Enum.Enum Floskell.Config.Location
instance GHC.Enum.Bounded Floskell.Config.Location
instance GHC.Classes.Ord Floskell.Config.Location
instance GHC.Classes.Eq Floskell.Config.Location
instance GHC.Generics.Generic Floskell.Config.LayoutContext
instance GHC.Show.Show Floskell.Config.LayoutContext
instance GHC.Enum.Enum Floskell.Config.LayoutContext
instance GHC.Enum.Bounded Floskell.Config.LayoutContext
instance GHC.Classes.Ord Floskell.Config.LayoutContext
instance GHC.Classes.Eq Floskell.Config.LayoutContext
instance GHC.Generics.Generic Floskell.Config.Indent
instance GHC.Show.Show Floskell.Config.Indent
instance GHC.Classes.Ord Floskell.Config.Indent
instance GHC.Classes.Eq Floskell.Config.Indent
instance Data.Default.Class.Default Floskell.Config.FlexConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.FlexConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.FlexConfig
instance Data.Default.Class.Default Floskell.Config.OptionConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.OptionConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.OptionConfig
instance Data.Default.Class.Default Floskell.Config.GroupConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.GroupConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.GroupConfig
instance Data.Default.Class.Default Floskell.Config.OpConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.OpConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.OpConfig
instance Data.Default.Class.Default Floskell.Config.LayoutConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.LayoutConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.LayoutConfig
instance Data.Default.Class.Default Floskell.Config.IndentConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.IndentConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.IndentConfig
instance Data.Default.Class.Default Floskell.Config.AlignConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.AlignConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.AlignConfig
instance Data.Default.Class.Default Floskell.Config.PenaltyConfig
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.PenaltyConfig
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.PenaltyConfig
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Floskell.Config.ConfigMap a)
instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Floskell.Config.ConfigMap a)
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.Layout
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.Layout
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.Whitespace
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.Whitespace
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.WsLoc
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.WsLoc
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.LayoutContext
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.LayoutContext
instance Data.Aeson.Types.ToJSON.ToJSON Floskell.Config.Indent
instance Data.Aeson.Types.FromJSON.FromJSON Floskell.Config.Indent
-- | All types.
module Floskell.Types
data OutputRestriction
Anything :: OutputRestriction
NoOverflow :: OutputRestriction
NoOverflowOrLinebreak :: OutputRestriction
newtype Penalty
Penalty :: Int -> Penalty
newtype TabStop
TabStop :: String -> TabStop
-- | A pretty printing monad.
newtype Printer a
Printer :: StateT PrintState (Search Penalty) a -> Printer a
[unPrinter] :: Printer a -> StateT PrintState (Search Penalty) a
execPrinter :: Printer a -> PrintState -> Maybe (Penalty, PrintState)
runPrinter :: Printer a -> PrintState -> Maybe (Penalty, (a, PrintState))
-- | The state of the pretty printer.
data PrintState
PrintState :: !Buffer -> !Int64 -> !Int64 -> !Map TabStop Int64 -> !FlexConfig -> !Bool -> OutputRestriction -> PrintState
-- | Output buffer
[psBuffer] :: PrintState -> !Buffer
-- | Current indentation level.
[psIndentLevel] :: PrintState -> !Int64
-- | Extra indentation is necessary with next line break.
[psOnside] :: PrintState -> !Int64
-- | Tab stops for alignment.
[psTabStops] :: PrintState -> !Map TabStop Int64
-- | User state.
[psUserState] :: PrintState -> !FlexConfig
-- | An end of line comment has just been outputted.
[psEolComment] :: PrintState -> !Bool
[psOutputRestriction] :: PrintState -> OutputRestriction
psLine :: PrintState -> Int64
psColumn :: PrintState -> Int64
psNewline :: PrintState -> Bool
-- | A printer style.
data Style
Style :: !Text -> !Text -> !Text -> !FlexConfig -> Style
-- | Name of the style, used in the commandline interface.
[styleName] :: Style -> !Text
-- | Author of the printer (as opposed to the author of the style).
[styleAuthor] :: Style -> !Text
-- | Description of the style.
[styleDescription] :: Style -> !Text
-- | User state, if needed.
[styleInitialState] :: Style -> !FlexConfig
data FlexConfig
FlexConfig :: !PenaltyConfig -> !AlignConfig -> !IndentConfig -> !LayoutConfig -> !OpConfig -> !GroupConfig -> !OptionConfig -> FlexConfig
[cfgPenalty] :: FlexConfig -> !PenaltyConfig
[cfgAlign] :: FlexConfig -> !AlignConfig
[cfgIndent] :: FlexConfig -> !IndentConfig
[cfgLayout] :: FlexConfig -> !LayoutConfig
[cfgOp] :: FlexConfig -> !OpConfig
[cfgGroup] :: FlexConfig -> !GroupConfig
[cfgOptions] :: FlexConfig -> !OptionConfig
-- | Information for each node in the AST.
data NodeInfo
NodeInfo :: !SrcSpanInfo -> ![ComInfo] -> NodeInfo
-- | Location info from the parser.
[nodeInfoSpan] :: NodeInfo -> !SrcSpanInfo
-- | Comments which are attached to this node.
[nodeInfoComments] :: NodeInfo -> ![ComInfo]
-- | Comment with some more info.
data ComInfo
ComInfo :: !Comment -> !Maybe Location -> ComInfo
-- | The normal comment type.
[comInfoComment] :: ComInfo -> !Comment
-- | Where the comment lies relative to the node.
[comInfoLocation] :: ComInfo -> !Maybe Location
data Location
Before :: Location
After :: Location
instance GHC.Show.Show Floskell.Types.NodeInfo
instance GHC.Show.Show Floskell.Types.ComInfo
instance GHC.Base.Alternative Floskell.Types.Printer
instance GHC.Base.MonadPlus Floskell.Types.Printer
instance Control.Monad.Search.MonadSearch Floskell.Types.Penalty Floskell.Types.Printer
instance Control.Monad.State.Class.MonadState Floskell.Types.PrintState Floskell.Types.Printer
instance GHC.Base.Functor Floskell.Types.Printer
instance GHC.Base.Monad Floskell.Types.Printer
instance GHC.Base.Applicative Floskell.Types.Printer
instance GHC.Show.Show Floskell.Types.TabStop
instance GHC.Classes.Ord Floskell.Types.TabStop
instance GHC.Classes.Eq Floskell.Types.TabStop
instance GHC.Show.Show Floskell.Types.Penalty
instance GHC.Num.Num Floskell.Types.Penalty
instance GHC.Classes.Ord Floskell.Types.Penalty
instance GHC.Classes.Eq Floskell.Types.Penalty
instance GHC.Show.Show Floskell.Types.OutputRestriction
instance GHC.Classes.Ord Floskell.Types.OutputRestriction
instance GHC.Classes.Eq Floskell.Types.OutputRestriction
instance GHC.Base.Semigroup Floskell.Types.Penalty
instance GHC.Base.Monoid Floskell.Types.Penalty
module Floskell.Styles
-- | Styles list, useful for programmatically choosing.
styles :: [Style]
module Floskell.Printers
-- | Query part of the pretty printer config
getConfig :: (FlexConfig -> b) -> Printer b
-- | Query pretty printer options
getOption :: (OptionConfig -> Bool) -> Printer Bool
-- | Try only the first (i.e. locally best) solution to the given pretty
-- printer. Use this function to improve performance whenever the
-- formatting of an AST node has no effect on the penalty of any
-- following AST node, such as top-level declarations or case branches.
cut :: Printer a -> Printer a
oneline :: Printer a -> Printer a
-- | Write out a string, updating the current position information.
write :: ByteString -> Printer ()
-- | Write a string.
string :: String -> Printer ()
-- | Write an integral.
int :: Integer -> Printer ()
-- | Write a space.
space :: Printer ()
-- | Output a newline.
newline :: Printer ()
linebreak :: Printer ()
blankline :: Printer ()
spaceOrNewline :: Printer ()
withTabStops :: [(TabStop, Maybe Int)] -> Printer a -> Printer a
atTabStop :: TabStop -> Printer ()
mayM_ :: Maybe a -> (a -> Printer ()) -> Printer ()
withPrefix :: Applicative f => f a -> (x -> f b) -> x -> f b
withPostfix :: Applicative f => f a -> (x -> f b) -> x -> f b
withIndent :: (IndentConfig -> Indent) -> Printer a -> Printer a
withIndentFlat :: (IndentConfig -> Indent) -> ByteString -> Printer a -> Printer a
withIndentBy :: (IndentConfig -> Int) -> Printer a -> Printer a
withLayout :: (LayoutConfig -> Layout) -> Printer a -> Printer a -> Printer a
inter :: Printer () -> [Printer ()] -> Printer ()
-- | Get the column for the next printed character.
getNextColumn :: Printer Int64
-- | Set the (newline-) indent level to the given column for the given
-- printer.
column :: Int64 -> Printer a -> Printer a
aligned :: Printer a -> Printer a
indented :: Printer a -> Printer a
-- | Increase indentation level b n spaces for the given printer, but
-- ignore increase when computing further indentations.
onside :: Printer a -> Printer a
depend :: ByteString -> Printer a -> Printer a
depend' :: Printer () -> Printer a -> Printer a
-- | Wrap in parens.
parens :: Printer () -> Printer ()
-- | Wrap in brackets.
brackets :: Printer () -> Printer ()
group :: LayoutContext -> ByteString -> ByteString -> Printer () -> Printer ()
groupH :: LayoutContext -> ByteString -> ByteString -> Printer () -> Printer ()
groupV :: LayoutContext -> ByteString -> ByteString -> Printer () -> Printer ()
operator :: LayoutContext -> ByteString -> Printer ()
operatorH :: LayoutContext -> ByteString -> Printer ()
operatorV :: LayoutContext -> ByteString -> Printer ()
alignOnOperator :: LayoutContext -> ByteString -> Printer a -> Printer a
alignOnOperatorH :: LayoutContext -> ByteString -> Printer a -> Printer a
alignOnOperatorV :: LayoutContext -> ByteString -> Printer a -> Printer a
withOperatorFormatting :: LayoutContext -> ByteString -> Printer () -> (Printer () -> Printer a) -> Printer a
withOperatorFormattingH :: LayoutContext -> ByteString -> Printer () -> (Printer () -> Printer a) -> Printer a
withOperatorFormattingV :: LayoutContext -> ByteString -> Printer () -> (Printer () -> Printer a) -> Printer a
operatorSectionL :: LayoutContext -> ByteString -> Printer () -> Printer ()
operatorSectionR :: LayoutContext -> ByteString -> Printer () -> Printer ()
comma :: Printer ()
module Floskell.Pretty
-- | Like span, but comparing adjacent items.
run :: (a -> a -> Bool) -> [a] -> ([a], [a])
-- | Like groupBy, but comparing adjacent items.
runs :: (a -> a -> Bool) -> [a] -> [[a]]
stopImportModule :: TabStop
stopImportSpec :: TabStop
stopRecordField :: TabStop
stopRhs :: TabStop
flattenApp :: Annotated ast => (ast NodeInfo -> Maybe (ast NodeInfo, ast NodeInfo)) -> ast NodeInfo -> [ast NodeInfo]
flattenInfix :: (Annotated ast1, Annotated ast2) => (ast1 NodeInfo -> Maybe (ast1 NodeInfo, ast2 NodeInfo, ast1 NodeInfo)) -> ast1 NodeInfo -> (ast1 NodeInfo, [(ast2 NodeInfo, ast1 NodeInfo)])
-- | Syntax shortcut for Pretty Printers.
type PrettyPrinter f = f NodeInfo -> Printer ()
-- | Pretty printing prettyHSE using haskell-src-exts pretty printer
prettyHSE :: Pretty (ast NodeInfo) => PrettyPrinter ast
-- | Type class for pretty-printable types.
class Pretty ast
prettyPrint :: Pretty ast => PrettyPrinter ast
prettyPrint :: (Pretty ast, Pretty (ast NodeInfo)) => PrettyPrinter ast
-- | Pretty print a syntax tree with annotated comments
pretty :: (Annotated ast, Pretty ast) => PrettyPrinter ast
prettyOnside :: (Annotated ast, Pretty ast) => PrettyPrinter ast
-- | Empty NodeInfo
noNodeInfo :: NodeInfo
-- | Compare two AST nodes ignoring the annotation
compareAST :: (Functor ast, Ord (ast ())) => ast NodeInfo -> ast NodeInfo -> Ordering
-- | Return comments with matching location.
filterComments :: Annotated a => (Maybe Location -> Bool) -> a NodeInfo -> [ComInfo]
-- | Copy comments from one AST node to another.
copyComments :: (Annotated ast1, Annotated ast2) => Location -> ast1 NodeInfo -> ast2 NodeInfo -> ast2 NodeInfo
-- | Pretty print a comment.
printComment :: Maybe SrcSpan -> Comment -> Printer ()
-- | Print comments of a node.
printComments :: Annotated ast => Location -> ast NodeInfo -> Printer ()
-- | Return the configuration name of an operator
opName :: QOp a -> ByteString
-- | Return the configuration name of an operator
opName' :: QName a -> ByteString
lineDelta :: Annotated ast => ast NodeInfo -> ast NodeInfo -> Int
linedFn :: Annotated ast => (ast NodeInfo -> Printer ()) -> [ast NodeInfo] -> Printer ()
lined :: (Annotated ast, Pretty ast) => [ast NodeInfo] -> Printer ()
linedOnside :: (Annotated ast, Pretty ast) => [ast NodeInfo] -> Printer ()
listVinternal :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> [ast NodeInfo] -> Printer ()
listH :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> ByteString -> ByteString -> [ast NodeInfo] -> Printer ()
listV :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> ByteString -> ByteString -> [ast NodeInfo] -> Printer ()
list :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> ByteString -> ByteString -> [ast NodeInfo] -> Printer ()
listH' :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> [ast NodeInfo] -> Printer ()
listV' :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> [ast NodeInfo] -> Printer ()
list' :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> [ast NodeInfo] -> Printer ()
listAutoWrap :: (Annotated ast, Pretty ast) => LayoutContext -> ByteString -> ByteString -> ByteString -> [ast NodeInfo] -> Printer ()
measure :: Printer a -> Printer (Maybe Int)
measureDecl :: Decl NodeInfo -> Printer (Maybe [Int])
measureClassDecl :: ClassDecl NodeInfo -> Printer (Maybe [Int])
measureInstDecl :: InstDecl NodeInfo -> Printer (Maybe [Int])
measureAlt :: Alt NodeInfo -> Printer (Maybe [Int])
withComputedTabStop :: TabStop -> (AlignConfig -> Bool) -> (a -> Printer (Maybe [Int])) -> [a] -> Printer b -> Printer b
-- | Extract the name as a String from a ModuleName
moduleName :: ModuleName a -> String
nameLength :: Name a -> Int
qnameLength :: QName a -> Int
prettyPragmas :: [ModulePragma NodeInfo] -> Printer ()
prettyImports :: [ImportDecl NodeInfo] -> Printer ()
skipBlank :: Annotated ast => (ast NodeInfo -> ast NodeInfo -> Bool) -> ast NodeInfo -> ast NodeInfo -> Bool
skipBlankAfterDecl :: Decl a -> Bool
skipBlankDecl :: Decl NodeInfo -> Decl NodeInfo -> Bool
skipBlankClassDecl :: ClassDecl NodeInfo -> ClassDecl NodeInfo -> Bool
skipBlankInstDecl :: InstDecl NodeInfo -> InstDecl NodeInfo -> Bool
prettyDecls :: (Annotated ast, Pretty ast) => (ast NodeInfo -> ast NodeInfo -> Bool) -> [ast NodeInfo] -> Printer ()
prettySimpleDecl :: (Annotated ast1, Pretty ast1, Annotated ast2, Pretty ast2) => ast1 NodeInfo -> ByteString -> ast2 NodeInfo -> Printer ()
prettyConDecls :: (Annotated ast, Pretty ast) => [ast NodeInfo] -> Printer ()
prettyForall :: (Annotated ast, Pretty ast) => [ast NodeInfo] -> Printer ()
prettyTypesig :: (Annotated ast, Pretty ast) => LayoutContext -> [ast NodeInfo] -> Type NodeInfo -> Printer ()
prettyApp :: (Annotated ast1, Annotated ast2, Pretty ast1, Pretty ast2) => ast1 NodeInfo -> [ast2 NodeInfo] -> Printer ()
prettyInfixApp :: (Annotated ast, Pretty ast, Pretty (op NodeInfo)) => (op NodeInfo -> ByteString) -> LayoutContext -> (ast NodeInfo, [(op NodeInfo, ast NodeInfo)]) -> Printer ()
prettyRecord :: (Annotated ast1, Pretty ast1, Annotated ast2, Pretty ast2) => (ast2 NodeInfo -> Printer (Maybe Int)) -> LayoutContext -> ast1 NodeInfo -> [ast2 NodeInfo] -> Printer ()
prettyRecordFields :: (Annotated ast, Pretty ast) => (ast NodeInfo -> Printer (Maybe Int)) -> LayoutContext -> [ast NodeInfo] -> Printer ()
prettyPragma :: ByteString -> Printer () -> Printer ()
prettyPragma' :: ByteString -> Maybe (Printer ()) -> Printer ()
newtype GuardedAlt l
GuardedAlt :: GuardedRhs l -> GuardedAlt l
newtype GuardedAlts l
GuardedAlts :: Rhs l -> GuardedAlts l
newtype CompactBinds l
CompactBinds :: Binds l -> CompactBinds l
newtype MayAst a l
MayAst :: Maybe (a l) -> MayAst a l
instance Language.Haskell.Exts.Syntax.Annotated Floskell.Pretty.CompactBinds
instance GHC.Base.Functor Floskell.Pretty.CompactBinds
instance Language.Haskell.Exts.Syntax.Annotated Floskell.Pretty.GuardedAlts
instance GHC.Base.Functor Floskell.Pretty.GuardedAlts
instance Language.Haskell.Exts.Syntax.Annotated Floskell.Pretty.GuardedAlt
instance GHC.Base.Functor Floskell.Pretty.GuardedAlt
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Exp
instance GHC.Base.Functor a => GHC.Base.Functor (Floskell.Pretty.MayAst a)
instance Language.Haskell.Exts.Syntax.Annotated a => Language.Haskell.Exts.Syntax.Annotated (Floskell.Pretty.MayAst a)
instance (Language.Haskell.Exts.Syntax.Annotated a, Floskell.Pretty.Pretty a) => Floskell.Pretty.Pretty (Floskell.Pretty.MayAst a)
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Stmt
instance Floskell.Pretty.Pretty Floskell.Pretty.CompactBinds
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Alt
instance Floskell.Pretty.Pretty Floskell.Pretty.GuardedAlts
instance Floskell.Pretty.Pretty Floskell.Pretty.GuardedAlt
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Module
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ModuleHead
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.WarningText
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ExportSpecList
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ExportSpec
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ImportDecl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ImportSpecList
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ImportSpec
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Assoc
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Decl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.DeclHead
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.InstRule
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.InstHead
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Binds
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.IPBind
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.InjectivityInfo
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ResultSig
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ClassDecl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.InstDecl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Deriving
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ConDecl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.FieldDecl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.QualConDecl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.GadtDecl
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Match
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Rhs
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.GuardedRhs
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Context
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.FunDep
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Asst
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Type
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Kind
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.TyVarBind
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.TypeEqn
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.XAttr
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Pat
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.PatField
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.PXAttr
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Literal
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.QualStmt
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.FieldUpdate
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.QOp
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Op
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Bracket
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Splice
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ModulePragma
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Rule
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.RuleVar
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Activation
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Annotation
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.BooleanFormula
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.DerivStrategy
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.DataOrNew
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.BangType
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Unpackedness
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.RPat
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.ModuleName
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.QName
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Name
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.IPName
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.XName
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Safety
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.CallConv
instance Floskell.Pretty.Pretty Language.Haskell.Exts.Syntax.Overlap
-- | Comment handling.
module Floskell.Comments
newtype OrderByStart
OrderByStart :: SrcSpan -> OrderByStart
newtype OrderByEnd
OrderByEnd :: SrcSpan -> OrderByEnd
-- | Annotate the AST with comments.
annotateComments :: Traversable ast => ast SrcSpanInfo -> [Comment] -> ([ComInfo], ast NodeInfo)
instance GHC.Classes.Eq Floskell.Comments.OrderByEnd
instance GHC.Classes.Eq Floskell.Comments.OrderByStart
instance GHC.Classes.Ord Floskell.Comments.OrderByEnd
instance GHC.Classes.Ord Floskell.Comments.OrderByStart
-- | Haskell indenter.
module Floskell
-- | Format the given source.
reformat :: Style -> Language -> [Extension] -> Maybe FilePath -> ByteString -> Either String ByteString
-- | Print the module.
prettyPrint :: Style -> Module SrcSpanInfo -> [Comment] -> Either a ByteString
-- | A printer style.
data Style
Style :: !Text -> !Text -> !Text -> !FlexConfig -> Style
-- | Name of the style, used in the commandline interface.
[styleName] :: Style -> !Text
-- | Author of the printer (as opposed to the author of the style).
[styleAuthor] :: Style -> !Text
-- | Description of the style.
[styleDescription] :: Style -> !Text
-- | User state, if needed.
[styleInitialState] :: Style -> !FlexConfig
-- | Styles list, useful for programmatically choosing.
styles :: [Style]
-- | Default extensions.
defaultExtensions :: [Extension]
instance GHC.Classes.Eq Floskell.CodeBlock
instance GHC.Show.Show Floskell.CodeBlock