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
- toYaml :: a -> YamlBuilder
- mapping :: [(Text, YamlBuilder)] -> YamlBuilder
- namedMapping :: Text -> [(Text, YamlBuilder)] -> YamlBuilder
- maybeNamedMapping :: Maybe Text -> [(Text, YamlBuilder)] -> YamlBuilder
- array :: [YamlBuilder] -> YamlBuilder
- namedArray :: Text -> [YamlBuilder] -> YamlBuilder
- maybeNamedArray :: Maybe Text -> [YamlBuilder] -> YamlBuilder
- string :: Text -> YamlBuilder
- namedString :: Text -> Text -> YamlBuilder
- maybeNamedString :: Maybe Text -> Text -> YamlBuilder
- bool :: Bool -> YamlBuilder
- namedBool :: Text -> Bool -> YamlBuilder
- maybeNamedBool :: Maybe Text -> Bool -> YamlBuilder
- null :: YamlBuilder
- namedNull :: Text -> YamlBuilder
- maybeNamedNull :: Maybe Text -> YamlBuilder
- scientific :: Scientific -> YamlBuilder
- namedScientific :: Text -> Scientific -> YamlBuilder
- maybeNamedScientific :: Maybe Text -> Scientific -> YamlBuilder
- alias :: Text -> 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 #
namedMapping :: Text -> [(Text, YamlBuilder)] -> YamlBuilder Source #
Since: 0.11.0
maybeNamedMapping :: Maybe Text -> [(Text, YamlBuilder)] -> YamlBuilder Source #
Since: 0.11.0
array :: [YamlBuilder] -> YamlBuilder Source #
namedArray :: Text -> [YamlBuilder] -> YamlBuilder Source #
Since: 0.11.0
maybeNamedArray :: Maybe Text -> [YamlBuilder] -> YamlBuilder Source #
Since: 0.11.0
string :: Text -> YamlBuilder Source #
namedString :: Text -> Text -> YamlBuilder Source #
Since: 0.11.0
maybeNamedString :: Maybe Text -> Text -> YamlBuilder Source #
Since: 0.11.0
bool :: Bool -> YamlBuilder Source #
maybeNamedBool :: Maybe Text -> Bool -> YamlBuilder Source #
Since: 0.11.0
null :: YamlBuilder Source #
namedNull :: Text -> YamlBuilder Source #
Since: 0.11.0
maybeNamedNull :: Maybe Text -> YamlBuilder Source #
Since: 0.11.0
scientific :: Scientific -> YamlBuilder Source #
namedScientific :: Text -> Scientific -> YamlBuilder Source #
Since: 0.11.0
maybeNamedScientific :: Maybe Text -> Scientific -> YamlBuilder Source #
Since: 0.11.0
alias :: Text -> YamlBuilder Source #
Since: 0.11.0
number :: Scientific -> YamlBuilder Source #
Deprecated: Use scientific
toByteString :: ToYaml a => a -> ByteString Source #
toByteStringWith :: ToYaml a => FormatOptions -> a -> ByteString Source #
Since: 0.10.2.0
writeYamlFileWith :: ToYaml a => FormatOptions -> FilePath -> a -> IO () Source #
Since: 0.10.2.0
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