Safe Haskell | None |
---|---|
Language | Haskell98 |
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.
- newtype YamlBuilder = YamlBuilder {
- unYamlBuilder :: [Event] -> [Event]
- class ToYaml a where
- toYaml :: a -> YamlBuilder
- 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
- writeYamlFile :: ToYaml a => FilePath -> a -> IO ()
- (.=) :: ToYaml a => Text -> a -> (Text, YamlBuilder)
Documentation
class ToYaml a where
Methods
toYaml :: a -> YamlBuilder
mapping :: [(Text, YamlBuilder)] -> YamlBuilder
array :: [YamlBuilder] -> YamlBuilder
string :: Text -> YamlBuilder
bool :: Bool -> YamlBuilder
null :: YamlBuilder
scientific :: Scientific -> YamlBuilder
number :: Scientific -> YamlBuilder
Deprecated: Use scientific
toByteString :: ToYaml a => a -> ByteString
writeYamlFile :: ToYaml a => FilePath -> a -> IO ()
(.=) :: ToYaml a => Text -> a -> (Text, YamlBuilder)