Safe Haskell | None |
---|
Utilities for dealing with YAML config files which contain relative file paths.
- 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 aSource
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 whereSource
A replacement for the standard FromJSON
typeclass which can handle relative filepaths.
parseYamlFile :: BaseDir -> Value -> Parser aSource
data NonEmptyVector a Source
NonEmptyVector !a !(Vector a) |
ParseYamlFile a => ParseYamlFile (NonEmptyVector a) |