| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Options.Harg.Sources.JSON
Synopsis
- newtype JSONSource f = JSONSource (f ConfigFile)
- data JSONSourceVal
- runJSONSource :: forall a f. (FunctorB a, FromJSON (a Maybe), Applicative f) => ByteString -> a (Compose Opt f) -> Either SourceRunError (a (Compose SourceRunResult f))
Documentation
newtype JSONSource f Source #
Source that enables a parser to read options from a JSON file.
Constructors
| JSONSource (f ConfigFile) |
Instances
data JSONSourceVal Source #
The result of reading a JSON file. JSONSourceNotRequired is used when
the user has specified defaultVal NoConfigFile. It holds the contents of
the JSON file as a Value.
Constructors
| JSONSourceVal ByteString | |
| JSONSourceNotRequired |
Instances
| (FromJSON (a Maybe), FunctorB a) => RunSource JSONSourceVal a Source # | |
Defined in Options.Harg.Sources.JSON Methods runSource :: Applicative f => JSONSourceVal -> a (Compose Opt f) -> [Either SourceRunError (a (Compose SourceRunResult f))] Source # | |
runJSONSource :: forall a f. (FunctorB a, FromJSON (a Maybe), Applicative f) => ByteString -> a (Compose Opt f) -> Either SourceRunError (a (Compose SourceRunResult f)) Source #