| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Data.Yaml.FilePath
Description
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 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.
Methods
parseYamlFile :: BaseDir -> Value -> Parser a Source
Instances
data NonEmptyVector a Source
Constructors
| NonEmptyVector !a !(Vector a) |
Instances
| ParseYamlFile a => ParseYamlFile (NonEmptyVector a) |