Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
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
.
Instances
(FromJSON (a Maybe), FunctorB a) => RunSource JSONSourceVal a Source # | |
Defined in Options.Harg.Sources.JSON 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 #