Safe Haskell | None |
---|---|
Language | Haskell98 |
- data State = State {}
- userGets :: (State -> a) -> Printer State a
- userModify :: (State -> State) -> Printer State ()
- gibiansky :: Style
- commentContent :: Comment -> String
- commentSrcSpan :: Comment -> SrcSpan
- commentPreprocessor :: MonadState (PrintState s) m => [Comment] -> m [Comment]
- breakCommentLines :: Int -> String -> [String]
- dropTrailingNewlines :: String -> String
- indentSpaces :: Integral a => a
- indentOnce :: Printer s ()
- maxSingleLineExports :: Integral a => a
- attemptSingleLine :: Printer State a -> Printer State a -> Printer State a
- type Extend f = f NodeInfo -> Printer State ()
- modl :: Extend Module
- skipFollowingNewline :: Decl l -> Bool
- pragmas :: Extend ModulePragma
- pat :: Extend Pat
- imp :: Extend ImportDecl
- prettyColLength :: (Integral a, Pretty ast) => ast NodeInfo -> Printer State a
- context :: Extend Context
- derivings :: Extend Deriving
- typ :: Extend Type
- writeTuple :: Pretty ast => Boxed -> [ast NodeInfo] -> Printer State ()
- sameLine :: (Annotated ast, Annotated ast') => ast NodeInfo -> ast' NodeInfo -> Bool
- collectTypes :: Type l -> [Type l]
- exprs :: Extend Exp
- multiIfExpr :: Exp NodeInfo -> Printer State ()
- letExpr :: Exp NodeInfo -> Printer State ()
- keepingColumn :: Printer State () -> Printer State ()
- appExpr :: Exp NodeInfo -> Printer State ()
- doExpr :: Exp NodeInfo -> Printer State ()
- listExpr :: Exp NodeInfo -> Printer State ()
- singleLineList :: Pretty a => [a NodeInfo] -> Printer State ()
- multiLineList :: [Exp NodeInfo] -> Printer State ()
- dollarExpr :: Exp NodeInfo -> Printer State ()
- applicativeExpr :: Exp NodeInfo -> Printer State ()
- opExpr :: Exp NodeInfo -> Printer State ()
- lambdaExpr :: Exp NodeInfo -> Printer State ()
- caseExpr :: Exp NodeInfo -> Printer State ()
- lambdaCaseExpr :: Exp NodeInfo -> Printer State ()
- ifExpr :: Exp NodeInfo -> Printer State ()
- writeCaseAlts :: [Alt NodeInfo] -> Printer State ()
- prettyCommentCallbacks :: (Pretty ast, MonadState (PrintState s) m) => ast NodeInfo -> (ComInfoLocation -> m ()) -> m ()
- recUpdateExpr :: Foldable f => [f NodeInfo] -> Printer State () -> [(ComInfoLocation -> Printer State ()) -> Printer State ()] -> Printer State ()
- commaAfterComment :: ComInfoLocation -> Printer State ()
- rhss :: Extend Rhs
- lineBreakAfterRhs :: NodeInfo -> Exp NodeInfo -> Bool
- guardedRhs :: Extend GuardedRhs
- rhsRest :: Pretty ast => ast NodeInfo -> Printer State ()
- stmts :: Extend Stmt
- decls :: Extend Decl
- qualConDecl :: Extend QualConDecl
- funBody :: [Pat NodeInfo] -> Rhs NodeInfo -> Maybe (Binds NodeInfo) -> Printer State ()
- writeWhereBinds :: Binds NodeInfo -> Printer State ()
- onSeparateLines :: (Pretty ast, Annotated ast) => [ast NodeInfo] -> Printer State ()
- onSeparateLines' :: Annotated ast => (ast NodeInfo -> Printer State ()) -> [ast NodeInfo] -> Printer State ()
- fixSpans :: NodeInfo -> NodeInfo
- astStartLine :: Annotated ast => ast NodeInfo -> Int
- isDoBlock :: Rhs l -> Bool
- condecls :: Extend ConDecl
- hasComments :: Foldable ast => ast NodeInfo -> Bool
- alt :: Extend Alt
- moduleHead :: Extend ModuleHead
- exportList :: Extend ExportSpecList
- lineDelta :: (Annotated ast1, Annotated ast2) => ast1 NodeInfo -> ast2 NodeInfo -> Int
- fieldUpdate :: Extend FieldUpdate
Documentation
commentContent :: Comment -> String Source
commentSrcSpan :: Comment -> SrcSpan Source
commentPreprocessor :: MonadState (PrintState s) m => [Comment] -> m [Comment] Source
breakCommentLines :: Int -> String -> [String] Source
Break a comment string into lines of a maximum character length. Each line starts with a space, mirroring the traditional way of writing comments:
- - Hello
- - Note the space after the
-
indentSpaces :: Integral a => a Source
Number of spaces to indent by.
indentOnce :: Printer s () Source
Printer to indent one level.
maxSingleLineExports :: Integral a => a Source
How many exports to format in a single line. If an export list has more than this, it will be formatted as multiple lines.
skipFollowingNewline :: Decl l -> Bool Source
pragmas :: Extend ModulePragma Source
Format pragmas differently (language pragmas).
imp :: Extend ImportDecl Source
Format import statements.
prettyColLength :: (Integral a, Pretty ast) => ast NodeInfo -> Printer State a Source
Return the number of columns between the start and end of a printer. Note that if it breaks lines, the line break is not counted; only column is used. So you probably only want to use this for single-line printers.
derivings :: Extend Deriving Source
Format deriving clauses with spaces and commas between class constraints.
collectTypes :: Type l -> [Type l] Source
prettyCommentCallbacks :: (Pretty ast, MonadState (PrintState s) m) => ast NodeInfo -> (ComInfoLocation -> m ()) -> m () Source
recUpdateExpr :: Foldable f => [f NodeInfo] -> Printer State () -> [(ComInfoLocation -> Printer State ()) -> Printer State ()] -> Printer State () Source
commaAfterComment :: ComInfoLocation -> Printer State () Source
onSeparateLines' :: Annotated ast => (ast NodeInfo -> Printer State ()) -> [ast NodeInfo] -> Printer State () Source
astStartLine :: Annotated ast => ast NodeInfo -> Int Source
hasComments :: Foldable ast => ast NodeInfo -> Bool Source