decode package:yaml
Deprecated: Please use decodeEither or decodeThrow, which provide
information on how the decode failed
Deprecated: Please use decodeEither' or decodeThrow, which provide
more useful failures
Deprecated: Please use decodeFileEither, which does not confused
type-directed and runtime exceptions.
A version of
decodeFile which should not throw runtime
exceptions.
A version of
decodeFileEither that returns warnings along with
the parse result.
Like
decodeFile but with support for relative and absolute
includes.
The syntax for includes follows the form:
somekey: !include ./somefile.yaml
Like
decodeFileEither but with support for relative and
absolute includes.
The syntax for includes follows the form:
somekey: !include ./somefile.yaml
Decode a YAML file at compile time. Only available on GHC version
7.8.1 or higher.
Examples
{-# LANGUAGE TemplateHaskell #-}
config :: Config
config = $$(decodeFile "config.yaml")