generated from tpl/purs
942 B
942 B
Module Data.YAML.Foreign.Encode
YValue
data YValue
Instances
Show YValue
Eq YValue
ToYAML
class ToYAML a where
toYAML :: a -> YValue
Instances
(ToYAML a) => ToYAML (StrMap a)
(ToYAML a) => ToYAML (Map String a)
ToYAML Boolean
ToYAML Int
ToYAML Number
ToYAML String
(ToYAML a) => ToYAML (Array a)
(ToYAML a) => ToYAML (Maybe a)
entry
entry :: forall a. ToYAML a => String -> a -> Pair
Helper function to create a key-value tuple for a YAML object.
name = "Name" := "This is the name"
(:=)
infixl 4 entry as :=
object
object :: Array Pair -> YValue
Helper function to create a YAML object.
obj = object [ "Name" := "This is the name", "Size" := 1.5 ]
printYAML
printYAML :: forall a. ToYAML a => a -> String