Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- run :: Applicative m => ([Field [Comment a]], [Comment a]) -> m ByteString
- toByteString :: [Field [Comment a]] -> [Comment a] -> ByteString
- fields :: Int -> [Field [Comment a]] -> Block
- field :: Int -> Field [Comment a] -> Block
- name :: Name a -> Chunk
- fieldLines :: Int -> [FieldLine [Comment a]] -> Block
- fieldLineC :: Int -> FieldLine [Comment a] -> Block
- fieldLine :: Int -> FieldLine a -> Line
- sectionArgs :: [SectionArg a] -> Chunk
- sectionArg :: SectionArg a -> Chunk
- comments :: Int -> [Comment a] -> Block
- comment :: Int -> Comment a -> Line
Documentation
run :: Applicative m => ([Field [Comment a]], [Comment a]) -> m ByteString Source #
A wrapper around toByteString
to allow this to be composed with other
actions.
toByteString :: [Field [Comment a]] -> [Comment a] -> ByteString Source #
Renders the given fields and comments to a byte string.
fields :: Int -> [Field [Comment a]] -> Block Source #
Renders the given fields to a block at the given indentation level.
field :: Int -> Field [Comment a] -> Block Source #
Renders the given field to a block at the given indentation level.
If a field only has one line and no comments, then it can be rendered all on one line.
fieldLines :: Int -> [FieldLine [Comment a]] -> Block Source #
Renders the given field lines to a block at the given indentation level.
fieldLineC :: Int -> FieldLine [Comment a] -> Block Source #
Renders the given field line and its comments to a block at the given indentation level.
fieldLine :: Int -> FieldLine a -> Line Source #
Renders the given field line to a line at the given indentation level.
sectionArgs :: [SectionArg a] -> Chunk Source #
Renders the given section arguments to a chunk. Note that comments are ignored. In practice this isn't a problem because section arguments can't have comments attached anyway.
sectionArg :: SectionArg a -> Chunk Source #
Renders the given section argument to a chunk.