yaml-0.8.11: Support for parsing and rendering YAML documents.

Safe HaskellNone
LanguageHaskell98

Data.Yaml.Parser

Description

NOTE: This module is a highly experimental preview release. It may change drastically, or be entirely removed, in a future release.

Documentation

withMapping :: Text -> ([(Text, YamlValue)] -> YamlParser a) -> YamlValue -> YamlParser a Source

withText :: Text -> (Text -> YamlParser a) -> YamlValue -> YamlParser a Source

class FromYaml a where Source

data RawDoc Source

Constructors

RawDoc YamlValue AnchorMap 

Instances

parseRawDoc :: (FromYaml a, MonadThrow m) => RawDoc -> m a Source

(.:) :: FromYaml a => [(Text, YamlValue)] -> Text -> YamlParser a Source

sinkValue :: MonadThrow m => Consumer Event (WriterT AnchorMap m) YamlValue Source

sinkRawDoc :: MonadThrow m => Consumer Event m RawDoc Source