Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- run :: Applicative m => ([Field (Position, [Comment p])], [Comment p]) -> m ByteString
- toByteString :: [Field (Position, [Comment p])] -> [Comment p] -> ByteString
- fields :: Int -> [Field (Position, [Comment p])] -> Block
- field :: Int -> Field (Position, [Comment p]) -> Block
- sameRow :: (Position, cs) -> (Position, cs) -> Bool
- name :: Name a -> Chunk
- fieldLines :: Int -> [FieldLine (p, [Comment q])] -> Block
- fieldLineC :: Int -> FieldLine (p, [Comment q]) -> 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 (Position, [Comment p])], [Comment p]) -> m ByteString Source #
A wrapper around toByteString
to allow this to be composed with other
actions.
toByteString :: [Field (Position, [Comment p])] -> [Comment p] -> ByteString Source #
Renders the given fields and comments to a byte string.
fields :: Int -> [Field (Position, [Comment p])] -> Block Source #
Renders the given fields to a block at the given indentation level.
field :: Int -> Field (Position, [Comment p]) -> 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.
sameRow :: (Position, cs) -> (Position, cs) -> Bool Source #
Returns true if the two positions are on the same row.
fieldLines :: Int -> [FieldLine (p, [Comment q])] -> Block Source #
Renders the given field lines to a block at the given indentation level.
fieldLineC :: Int -> FieldLine (p, [Comment q]) -> 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.