cabal-gild-1.1.4.0: Formats package descriptions.
Safe HaskellSafe-Inferred
LanguageHaskell2010

CabalGild.Action.Render

Synopsis

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.

name :: Name a -> Chunk Source #

Renders the given name to a chunk.

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.

comments :: Int -> [Comment a] -> Block Source #

Renders the given comments to a block at the given indentation level.

comment :: Int -> Comment a -> Line Source #

Renders the given comment to a line at the given indentation level.