Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- mappingComplex :: [(YamlBuilder, YamlBuilder)] -> YamlBuilder
- namedMappingComplex :: Text -> [(YamlBuilder, YamlBuilder)] -> YamlBuilder
- maybeNamedMappingComplex :: Maybe Text -> [(YamlBuilder, 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 Bool Source # | |
Defined in Data.Yaml.Builder toYaml :: Bool -> YamlBuilder Source # | |
ToYaml Double Source # | |
Defined in Data.Yaml.Builder toYaml :: Double -> YamlBuilder Source # | |
ToYaml Int Source # | |
Defined in Data.Yaml.Builder toYaml :: Int -> YamlBuilder Source # | |
ToYaml Scientific Source # | |
Defined in Data.Yaml.Builder toYaml :: Scientific -> YamlBuilder Source # | |
ToYaml String Source # | |
Defined in Data.Yaml.Builder toYaml :: String -> 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 b) => ToYaml [(a, b)] Source # | |
Defined in Data.Yaml.Builder toYaml :: [(a, b)] -> YamlBuilder Source # | |
ToYaml a => ToYaml [a] Source # | |
Defined in Data.Yaml.Builder toYaml :: [a] -> YamlBuilder Source # | |
ToYaml a => ToYaml (Maybe a) Source # | |
Defined in Data.Yaml.Builder toYaml :: Maybe a -> YamlBuilder Source # |
mapping :: [(Text, YamlBuilder)] -> YamlBuilder Source #
Since: 0.8.7
namedMapping :: Text -> [(Text, YamlBuilder)] -> YamlBuilder Source #
Since: 0.10.3.0
maybeNamedMapping :: Maybe Text -> [(Text, YamlBuilder)] -> YamlBuilder Source #
Since: 0.10.3.0
mappingComplex :: [(YamlBuilder, YamlBuilder)] -> YamlBuilder Source #
Since: 0.11.2.0
namedMappingComplex :: Text -> [(YamlBuilder, YamlBuilder)] -> YamlBuilder Source #
Since: 0.11.2.0
maybeNamedMappingComplex :: Maybe Text -> [(YamlBuilder, YamlBuilder)] -> YamlBuilder Source #
Since: 0.11.2.0
array :: [YamlBuilder] -> YamlBuilder Source #
Since: 0.8.7
namedArray :: Text -> [YamlBuilder] -> YamlBuilder Source #
Since: 0.10.3.0
maybeNamedArray :: Maybe Text -> [YamlBuilder] -> YamlBuilder Source #
Since: 0.10.3.0
string :: Text -> YamlBuilder Source #
Since: 0.8.7
namedString :: Text -> Text -> YamlBuilder Source #
Since: 0.10.3.0
maybeNamedString :: Maybe Text -> Text -> YamlBuilder Source #
Since: 0.10.3.0
bool :: Bool -> YamlBuilder Source #
Since: 0.8.13
maybeNamedBool :: Maybe Text -> Bool -> YamlBuilder Source #
Since: 0.10.3.0
null :: YamlBuilder Source #
Since: 0.8.13
namedNull :: Text -> YamlBuilder Source #
Since: 0.10.3.0
maybeNamedNull :: Maybe Text -> YamlBuilder Source #
Since: 0.10.3.0
scientific :: Scientific -> YamlBuilder Source #
Since: 0.8.13
namedScientific :: Text -> Scientific -> YamlBuilder Source #
Since: 0.10.3.0
maybeNamedScientific :: Maybe Text -> Scientific -> YamlBuilder Source #
Since: 0.10.3.0
alias :: Text -> YamlBuilder Source #
Since: 0.10.3.0
number :: Scientific -> YamlBuilder Source #
Deprecated: Use scientific
Since: 0.8.13
toByteString :: ToYaml a => a -> ByteString Source #
Since: 0.8.7
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