pugs-HsSyck-0.41: Fast, lightweight YAML loader and dumperSource codeContentsIndex
Data.Yaml.Syck
Synopsis
parseYaml :: String -> IO YamlNode
emitYaml :: YamlNode -> IO String
parseYamlFile :: String -> IO YamlNode
emitYamlFile :: FilePath -> YamlNode -> IO ()
parseYamlBytes :: Buf -> IO YamlNode
emitYamlBytes :: YamlNode -> IO Buf
data YamlNode = MkNode {
n_id :: !SYMID
n_elem :: !YamlElem
n_tag :: !YamlTag
n_anchor :: !YamlAnchor
}
data YamlElem
= EMap [(YamlNode, YamlNode)]
| ESeq [YamlNode]
| EStr !Buf
| ENil
data YamlAnchor
= AAnchor !Int
| AReference !Int
| ASingleton
tagNode :: YamlTag -> YamlNode -> YamlNode
nilNode :: YamlNode
mkNode :: YamlElem -> YamlNode
mkTagNode :: String -> YamlElem -> YamlNode
mkTagStrNode :: String -> String -> YamlNode
type SYMID = CULong
packBuf :: String -> Buf
unpackBuf :: Buf -> String
Documentation
parseYaml :: String -> IO YamlNodeSource
Parse a regular Haskell string
emitYaml :: YamlNode -> IO StringSource
Dump a YAML node into a regular Haskell string
parseYamlFile :: String -> IO YamlNodeSource
Given a file name, parse contents of file
emitYamlFile :: FilePath -> YamlNode -> IO ()Source
Given a file name, dump a YAML node into that file
parseYamlBytes :: Buf -> IO YamlNodeSource
Parse a ByteString buffer (this is faster)
emitYamlBytes :: YamlNode -> IO BufSource
data YamlNode Source
Constructors
MkNode
n_id :: !SYMID
n_elem :: !YamlElem
n_tag :: !YamlTag
n_anchor :: !YamlAnchor
show/hide Instances
data YamlElem Source
Constructors
EMap [(YamlNode, YamlNode)]
ESeq [YamlNode]
EStr !Buf
ENil
show/hide Instances
data YamlAnchor Source
Constructors
AAnchor !Int
AReference !Int
ASingleton
show/hide Instances
tagNode :: YamlTag -> YamlNode -> YamlNodeSource
nilNode :: YamlNodeSource
mkNode :: YamlElem -> YamlNodeSource
mkTagNode :: String -> YamlElem -> YamlNodeSource
mkTagStrNode :: String -> String -> YamlNodeSource
type SYMID = CULongSource
packBuf :: String -> BufSource
Convert a regular Haskell string into a ByteString buffer
unpackBuf :: Buf -> StringSource
Convert a ByteString buffer into a regular Haskell string
Produced by Haddock version 2.4.2