Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- compose :: forall f g a. (Functor f, FunctorB a) => (forall x. x -> g x) -> a f -> a (Compose f g)
- toDummyOpts :: forall m a. (FunctorB a, Monoid m) => a Opt -> a (Compose Opt (Const m))
- allToDummyOpts :: forall m ts xs. (Monoid m, MapAssocList xs) => AssocListF ts xs Opt -> AssocListF ts xs (Compose Opt (Const m))
- printErrAndExit :: forall a. String -> IO a
- readFileWith :: (FilePath -> IO a) -> FilePath -> IO a
- readFileLBS :: FilePath -> IO ByteString
- readFileBS :: FilePath -> IO ByteString
Documentation
compose :: forall f g a. (Functor f, FunctorB a) => (forall x. x -> g x) -> a f -> a (Compose f g) Source #
toDummyOpts :: forall m a. (FunctorB a, Monoid m) => a Opt -> a (Compose Opt (Const m)) Source #
Convert an option parser into a dummy parser. A dummy option parser always
succeeds because options always have a default value (a monoid is used
here). This is useful because we want to run the parser together with the
configuration parser once in order to gather JSON file paths etc., which
means that we still need --help
to work.
allToDummyOpts :: forall m ts xs. (Monoid m, MapAssocList xs) => AssocListF ts xs Opt -> AssocListF ts xs (Compose Opt (Const m)) Source #
Convert an association list of options in to dummy ones.
printErrAndExit :: forall a. String -> IO a Source #
readFileLBS :: FilePath -> IO ByteString Source #
readFileBS :: FilePath -> IO ByteString Source #