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