Safe Haskell | None |
---|---|
Language | Haskell2010 |
NOTE: This module is a highly experimental preview release. It may change drastically, or be entirely removed, in a future release.
Synopsis
- newtype YamlBuilder = YamlBuilder {
- unYamlBuilder :: [Event] -> [Event]
- class ToYaml a where
- mapping :: [(Text, YamlBuilder)] -> YamlBuilder
- array :: [YamlBuilder] -> YamlBuilder
- string :: Text -> YamlBuilder
- bool :: Bool -> YamlBuilder
- null :: YamlBuilder
- scientific :: Scientific -> YamlBuilder
- number :: Scientific -> YamlBuilder
- toByteString :: ToYaml a => a -> ByteString
- toByteStringWith :: ToYaml a => FormatOptions -> a -> ByteString
- writeYamlFile :: ToYaml a => FilePath -> a -> IO ()
- writeYamlFileWith :: ToYaml a => FormatOptions -> FilePath -> a -> IO ()
- (.=) :: ToYaml a => Text -> a -> (Text, YamlBuilder)
- data FormatOptions
- setWidth :: Maybe Int -> FormatOptions -> FormatOptions
Documentation
newtype YamlBuilder Source #
YamlBuilder | |
|
Instances
ToYaml YamlBuilder Source # | |
Defined in Data.Yaml.Builder toYaml :: YamlBuilder -> YamlBuilder Source # |
toYaml :: a -> YamlBuilder Source #
Instances
ToYaml Int Source # | |
Defined in Data.Yaml.Builder toYaml :: Int -> YamlBuilder Source # | |
ToYaml Text Source # | |
Defined in Data.Yaml.Builder toYaml :: Text -> YamlBuilder Source # | |
ToYaml YamlBuilder Source # | |
Defined in Data.Yaml.Builder toYaml :: YamlBuilder -> YamlBuilder Source # | |
ToYaml a => ToYaml [(Text, a)] Source # | |
Defined in Data.Yaml.Builder toYaml :: [(Text, a)] -> YamlBuilder Source # | |
ToYaml a => ToYaml [a] Source # | |
Defined in Data.Yaml.Builder toYaml :: [a] -> YamlBuilder Source # |
mapping :: [(Text, YamlBuilder)] -> YamlBuilder Source #
array :: [YamlBuilder] -> YamlBuilder Source #
string :: Text -> YamlBuilder Source #
bool :: Bool -> YamlBuilder Source #
null :: YamlBuilder Source #
scientific :: Scientific -> YamlBuilder Source #
number :: Scientific -> YamlBuilder Source #
Deprecated: Use scientific
toByteString :: ToYaml a => a -> ByteString Source #
toByteStringWith :: ToYaml a => FormatOptions -> a -> ByteString Source #
Since: yaml-0.10.2.0
writeYamlFileWith :: ToYaml a => FormatOptions -> FilePath -> a -> IO () Source #
Since: yaml-0.10.2.0
data FormatOptions Source #
Contains options relating to the formatting (indendation, width) of the YAML output.
Since: yaml-0.10.2.0
setWidth :: Maybe Int -> FormatOptions -> FormatOptions Source #
Set the maximum number of columns in the YAML output, or Nothing
for infinite. By default, the limit is 80 characters.
Since: yaml-0.10.2.0