Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype YamlText = YamlText Text
- decodeThrowT :: Text -> ErrIO Value
- unYAML :: YamlText -> Text
- extYAML :: Extension
- yamlFileType :: TypedFile5 Text YamlText
- readYaml2value :: Path Abs File -> ErrIO Value
- yaml2value :: YamlText -> Value
- readYaml2rec :: (FromJSON a, Show a) => Path Abs File -> ErrIO a
- type ErrIO = ExceptT Text IO
- data ParseException
- decodeFileThrow :: (MonadIO m, FromJSON a) => FilePath -> m a
- encode :: ToJSON a => a -> ByteString
- decode :: FromJSON a => ByteString -> Maybe a
- decodeEither :: FromJSON a => ByteString -> Either String a
- data Options
Documentation
yaml2value :: YamlText -> Value Source #
readYaml2rec :: (FromJSON a, Show a) => Path Abs File -> ErrIO a Source #
read a yaml file into a record Value error when syntax fault
data ParseException #
Instances
Exception ParseException | |
Defined in Data.Yaml.Internal | |
Show ParseException | |
Defined in Data.Yaml.Internal showsPrec :: Int -> ParseException -> ShowS # show :: ParseException -> String # showList :: [ParseException] -> ShowS # |
decodeFileThrow :: (MonadIO m, FromJSON a) => FilePath -> m a #
A version of decodeFileEither
lifted to MonadIO
Since: yaml-0.8.31
encode :: ToJSON a => a -> ByteString #
Encode a value into its YAML representation.
decode :: FromJSON a => ByteString -> Maybe a #
decodeEither :: FromJSON a => ByteString -> Either String a #
Options that specify how to encode/decode your datatype to/from JSON.
Options can be set using record syntax on defaultOptions
with the fields
below.