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