Safe Haskell | None |
---|---|
Language | Haskell98 |
All types.
- newtype Printer s a = Printer {
- runPrinter :: StateT (PrintState s) (MaybeT Identity) a
- data PrintState s = PrintState {
- psIndentLevel :: !Int64
- psOutput :: !Builder
- psNewline :: !Bool
- psColumn :: !Int64
- psLine :: !Int64
- psUserState :: !s
- psExtenders :: ![Extender s]
- psConfig :: !Config
- psEolComment :: !Bool
- psInsideCase :: !Bool
- psParseMode :: !ParseMode
- data Extender s where
- data Style = forall s . Style {
- styleName :: !Text
- styleAuthor :: !Text
- styleDescription :: !Text
- styleInitialState :: !s
- styleExtenders :: ![Extender s]
- styleDefConfig :: !Config
- data Config = Config {}
- defaultConfig :: Config
- data NodeInfo = NodeInfo {
- nodeInfoSpan :: !SrcSpanInfo
- nodeInfoComments :: ![ComInfo]
- data ComInfo = ComInfo {}
- data ComInfoLocation
Documentation
A pretty printing monad.
Printer | |
|
Alternative (Printer s) | |
Monad (Printer s) | |
Functor (Printer s) | |
MonadPlus (Printer s) | |
Applicative (Printer s) | |
MonadState (PrintState s) (Printer s) |
data PrintState s Source
The state of the pretty printer.
PrintState | |
|
Eq (PrintState s) | |
MonadState (PrintState s) (Printer s) |
A printer extender. Takes as argument the user state that the
printer was run with, and the current node to print. Use
prettyNoExt
to fallback to the built-in printer.
A printer style.
forall s . Style | |
|
Configurations shared among the different styles. Styles may pay attention to or completely disregard this configuration.
Config | |
|
defaultConfig :: Config Source
Default style configuration.
Information for each node in the AST.
NodeInfo | |
|
Comment with some more info.
ComInfo | |
|
data ComInfoLocation Source
Comment relative locations.