Safe Haskell | None |
---|---|
Language | Haskell98 |
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
newtype YamlParser a Source
Constructors
YamlParser | |
Fields
|
lookupAnchor :: AnchorName -> YamlParser (Maybe YamlValue) Source
withAnchor :: AnchorName -> Text -> (YamlValue -> YamlParser a) -> YamlParser a Source
withMapping :: Text -> ([(Text, YamlValue)] -> YamlParser a) -> YamlValue -> YamlParser a Source
withSequence :: Text -> ([YamlValue] -> YamlParser a) -> YamlValue -> YamlParser a Source
withText :: Text -> (Text -> YamlParser a) -> YamlValue -> YamlParser a Source
typeMismatch :: Text -> YamlValue -> YamlParser a Source
Methods
fromYaml :: YamlValue -> YamlParser a Source
type AnchorMap = Map AnchorName YamlValue Source
parseRawDoc :: (FromYaml a, MonadThrow m) => RawDoc -> m a Source
(.:) :: FromYaml a => [(Text, YamlValue)] -> Text -> YamlParser a Source
data YamlParseException Source
Constructors
UnexpectedEndOfEvents | |
UnexpectedEvent Event | |
FromYamlException Text |
sinkRawDoc :: MonadThrow m => Consumer Event m RawDoc Source
readYamlFile :: FromYaml a => FilePath -> IO a Source