Safe Haskell | None |
---|
All types.
- newtype Printer a = Printer {
- runPrinter :: State PrintState a
- data PrintState = forall s . PrintState {
- psIndentLevel :: !Int64
- psOutput :: !Builder
- psNewline :: !Bool
- psColumn :: !Int64
- psLine :: !Int64
- psUserState :: !s
- psExtenders :: ![Extender s]
- psConfig :: !Config
- data Extender s = forall a . Typeable a => Extender (s -> a -> Printer ())
- data Style = forall s . Style {
- styleName :: !Text
- styleAuthor :: !Text
- styleDescription :: !Text
- styleInitialState :: !s
- styleExtenders :: ![Extender s]
- styleDefConfig :: !Config
- data Config = Config {}
- class Typeable a => Pretty a where
- pretty :: a -> Printer ()
- prettyInternal :: a -> Printer ()
Documentation
A pretty printing monad.
Printer | |
|
data PrintState Source
The state of the pretty printer.
forall s . PrintState | |
|
A printer extender. Takes as argument the user state that the
printer was run with, and the current node to print. Use
prettyInternal
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.
class Typeable a => Pretty a whereSource
Pretty printing class.