Pretty printer state, used within a state monad computation.
- data PPState = PPState {}
- render :: PPState -> State PPState () -> Builder
- renderBytes :: PPState -> State PPState () -> ByteString
- nlCol :: Word -> PPState
- data PPOp
- op :: PPState -> PPOp -> PPState
- opM :: [PPOp] -> State PPState ()
- nl :: State PPState ()
- hang :: ByteString -> State PPState ()
- word :: ByteString -> State PPState ()
- wordcat :: [ByteString] -> State PPState ()
- outdent :: State PPState ()
- inword :: ByteString -> State PPState ()
- outword :: ByteString -> State PPState ()
- curlyOpen :: State PPState ()
- curlyClose :: State PPState ()
- roundOpen :: State PPState ()
- roundClose :: State PPState ()
- indentPadToNextWord :: State PPState ()
Documentation
State of pretty printing -- string being built, indent levels, present column, brace nesting.
render :: PPState -> State PPState () -> BuilderSource
Produce a builder from a pretty printer state computation.
renderBytes :: PPState -> State PPState () -> ByteStringSource
nlCol :: Word -> PPStateSource
Pretty printer state starting on a new line indented to the given column.
Operations we can perform while pretty printing.