yaml-0.11.1.2: Support for parsing and rendering YAML documents.

Safe HaskellNone
LanguageHaskell2010

Data.Yaml.Builder

Description

NOTE: This module is a highly experimental preview release. It may change drastically, or be entirely removed, in a future release.

Synopsis

Documentation

newtype YamlBuilder Source #

Constructors

YamlBuilder 

Fields

Instances
ToYaml YamlBuilder Source # 
Instance details

Defined in Data.Yaml.Builder

class ToYaml a where Source #

Methods

toYaml :: a -> YamlBuilder Source #

Instances
ToYaml Int Source # 
Instance details

Defined in Data.Yaml.Builder

ToYaml Text Source # 
Instance details

Defined in Data.Yaml.Builder

ToYaml YamlBuilder Source # 
Instance details

Defined in Data.Yaml.Builder

ToYaml a => ToYaml [(Text, a)] Source # 
Instance details

Defined in Data.Yaml.Builder

Methods

toYaml :: [(Text, a)] -> YamlBuilder Source #

ToYaml a => ToYaml [a] Source # 
Instance details

Defined in Data.Yaml.Builder

Methods

toYaml :: [a] -> YamlBuilder Source #

namedMapping :: Text -> [(Text, YamlBuilder)] -> YamlBuilder Source #

Since: 0.11.0

namedArray :: Text -> [YamlBuilder] -> YamlBuilder Source #

Since: 0.11.0

namedString :: Text -> Text -> YamlBuilder Source #

Since: 0.11.0

namedBool :: Text -> Bool -> YamlBuilder Source #

Since: 0.11.0

namedNull :: Text -> YamlBuilder Source #

Since: 0.11.0

alias :: Text -> YamlBuilder Source #

Since: 0.11.0

number :: Scientific -> YamlBuilder Source #

Deprecated: Use scientific

toByteStringWith :: ToYaml a => FormatOptions -> a -> ByteString Source #

Since: 0.10.2.0

writeYamlFile :: ToYaml a => FilePath -> a -> IO () Source #

writeYamlFileWith :: ToYaml a => FormatOptions -> FilePath -> a -> IO () Source #

Since: 0.10.2.0

(.=) :: ToYaml a => Text -> a -> (Text, YamlBuilder) Source #

data FormatOptions #

Contains options relating to the formatting (indendation, width) of the YAML output.

Since: libyaml-0.10.2.0

setWidth :: Maybe Int -> FormatOptions -> FormatOptions #

Set the maximum number of columns in the YAML output, or Nothing for infinite. By default, the limit is 80 characters.

Since: libyaml-0.10.2.0