bond-0.4.1.0: Bond schema compiler and code generator

Language.Bond.Codegen.Util

Contents

Description

Helper functions for creating common text structures useful in code generation. These functions operate on Text objects.

Synopsis

# Documentation

commonHeader :: ToText a => a -> a -> Text Source #

Returns common header for generated files using specified single-line comment lead character(s) and a file name.

newlineSep :: Int64 -> (a -> Text) -> [a] -> Text Source #

Separates elements of a list with new lines. Starts new lines at the specified indentation level.

commaLineSep :: Int64 -> (a -> Text) -> [a] -> Text Source #

Separates elements of a list with comma followed by a new line. Starts new lines at the specified indentation level.

newlineSepEnd :: Int64 -> (a -> Text) -> [a] -> Text Source #

Separates elements of a list with new lines, ending with a new line. Starts new lines at the specified indentation level.

newlineBeginSep :: Int64 -> (a -> Text) -> [a] -> Text Source #

Separates elements of a list with new lines, beginning with a new line. Starts new lines at the specified indentation level.

doubleLineSep :: Int64 -> (a -> Text) -> [a] -> Text Source #

Separates elements of a list with two new lines. Starts new lines at the specified indentation level.

doubleLineSepEnd :: Int64 -> (a -> Text) -> [a] -> Text Source #

Separates elements of a list with two new lines, ending with two new lines. Starts new lines at the specified indentation level.

# Orphan instances

 Source # Methods Source # Methods Source # Methods