Safe Haskell | None |
---|---|
Language | Haskell98 |
Utilities for dealing with YAML config files which contain relative file paths.
Synopsis
- decodeFileRelative :: ParseYamlFile a => FilePath -> IO (Either ParseException a)
- lookupBase :: ParseYamlFile a => BaseDir -> Object -> Text -> Parser a
- lookupBaseMaybe :: ParseYamlFile a => BaseDir -> Object -> Text -> Parser (Maybe a)
- data BaseDir
- class ParseYamlFile a where
- parseYamlFile :: BaseDir -> Value -> Parser a
- data NonEmptyVector a = NonEmptyVector !a !(Vector a)
Documentation
decodeFileRelative :: ParseYamlFile a => FilePath -> IO (Either ParseException a) Source #
Parse a config file, using the ParseYamlFile
typeclass.
lookupBase :: ParseYamlFile a => BaseDir -> Object -> Text -> Parser a Source #
A replacement for the .:
operator which will both parse a file path and
apply the relative file logic.
lookupBaseMaybe :: ParseYamlFile a => BaseDir -> Object -> Text -> Parser (Maybe a) Source #
A replacement for the .:?
operator which will both parse a file path and
apply the relative file logic.
class ParseYamlFile a where Source #
A replacement for the standard FromJSON
typeclass which can handle relative filepaths.
Instances
data NonEmptyVector a Source #
NonEmptyVector !a !(Vector a) |
Instances
ParseYamlFile a => ParseYamlFile (NonEmptyVector a) Source # | |
Defined in Keter.Yaml.FilePath parseYamlFile :: BaseDir -> Value -> Parser (NonEmptyVector a) Source # |