Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
HIndent.Types
Description
All types.
Synopsis
- newtype Printer a = Printer {
- runPrinter :: StateT PrintState (MaybeT Identity) a
- data PrintState = PrintState {
- psIndentLevel :: !Int64
- psOutput :: !Builder
- psNewline :: !Bool
- psColumn :: !Int64
- psLine :: !Int64
- psConfig :: !Config
- psInsideCase :: !Bool
- psFitOnOneLine :: !Bool
- psEolComment :: !Bool
- data Config = Config {}
- readExtension :: (Monad m, MonadFail m) => String -> m Extension
- defaultConfig :: Config
- data NodeInfo = NodeInfo {}
- data NodeComment
- data SomeComment
Documentation
A pretty printing monad.
Constructors
Printer | |
Fields
|
Instances
Alternative Printer Source # | |
Applicative Printer Source # | |
Functor Printer Source # | |
Monad Printer Source # | |
MonadPlus Printer Source # | |
MonadState PrintState Printer Source # | |
Defined in HIndent.Types Methods get :: Printer PrintState Source # put :: PrintState -> Printer () Source # state :: (PrintState -> (a, PrintState)) -> Printer a Source # |
data PrintState Source #
The state of the pretty printer.
Constructors
PrintState | |
Fields
|
Instances
MonadState PrintState Printer Source # | |
Defined in HIndent.Types Methods get :: Printer PrintState Source # put :: PrintState -> Printer () Source # state :: (PrintState -> (a, PrintState)) -> Printer a Source # |
Configurations shared among the different styles. Styles may pay attention to or completely disregard this configuration.
Constructors
Config | |
Fields
|
defaultConfig :: Config Source #
Default style configuration.
Information for each node in the AST.
Constructors
NodeInfo | |
Fields
|
data NodeComment Source #
Comment associated with a node.
SrcSpan
is the original source span of the comment.
Constructors
CommentSameLine SrcSpan SomeComment | |
CommentAfterLine SrcSpan SomeComment | |
CommentBeforeLine SrcSpan SomeComment |
Instances
Show NodeComment Source # | |
Defined in HIndent.Types | |
Eq NodeComment Source # | |
Defined in HIndent.Types Methods (==) :: NodeComment -> NodeComment -> Bool Source # (/=) :: NodeComment -> NodeComment -> Bool Source # | |
Ord NodeComment Source # | |
Defined in HIndent.Types Methods compare :: NodeComment -> NodeComment -> Ordering Source # (<) :: NodeComment -> NodeComment -> Bool Source # (<=) :: NodeComment -> NodeComment -> Bool Source # (>) :: NodeComment -> NodeComment -> Bool Source # (>=) :: NodeComment -> NodeComment -> Bool Source # max :: NodeComment -> NodeComment -> NodeComment Source # min :: NodeComment -> NodeComment -> NodeComment Source # |
data SomeComment Source #
Some comment to print.
Instances
Show SomeComment Source # | |
Defined in HIndent.Types | |
Eq SomeComment Source # | |
Defined in HIndent.Types Methods (==) :: SomeComment -> SomeComment -> Bool Source # (/=) :: SomeComment -> SomeComment -> Bool Source # | |
Ord SomeComment Source # | |
Defined in HIndent.Types Methods compare :: SomeComment -> SomeComment -> Ordering Source # (<) :: SomeComment -> SomeComment -> Bool Source # (<=) :: SomeComment -> SomeComment -> Bool Source # (>) :: SomeComment -> SomeComment -> Bool Source # (>=) :: SomeComment -> SomeComment -> Bool Source # max :: SomeComment -> SomeComment -> SomeComment Source # min :: SomeComment -> SomeComment -> SomeComment Source # |