{-# LANGUAGE CPP #-}
module Arguments (
Arguments(..)
, get
) where
#if !MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>))
#endif
import Data.Version (showVersion)
import Control.Applicative ((<|>), (<**>), optional)
import Options.Applicative (
Parser, ReadM, argument, auto, eitherReader, execParser, flag', fullDesc
, header, help, helper, info, long, metavar, short, str, switch, value
)
import qualified Options.Applicative as Optparse (option)
import qualified Paths_hablo as Hablo (version)
import System.FilePath (dropTrailingPathSeparator, isValid)
data Arguments = BlogConfig {
Arguments -> FilePath
sourceDir :: FilePath
, Arguments -> Maybe FilePath
articlesPath :: Maybe FilePath
, Arguments -> Maybe FilePath
bannerPath :: Maybe FilePath
, Arguments -> Maybe FilePath
cardImage :: Maybe FilePath
, :: Maybe String
, Arguments -> Maybe FilePath
favicon :: Maybe FilePath
, Arguments -> Maybe FilePath
headPath :: Maybe FilePath
, Arguments -> Maybe FilePath
name :: Maybe String
, Arguments -> Bool
openGraphCards :: Bool
, Arguments -> Maybe FilePath
pagesPath :: Maybe FilePath
, Arguments -> Int
previewArticlesCount :: Int
, Arguments -> Int
previewLinesCount :: Int
, :: Maybe FilePath
, :: Bool
, Arguments -> Maybe FilePath
siteURL :: Maybe String
, Arguments -> Maybe FilePath
wording :: Maybe FilePath
}
| Version
option :: ReadM a -> Char -> String -> String -> String -> Parser (Maybe a)
option :: ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM a
readM Char
aShort FilePath
aLong FilePath
aMetavar FilePath
aHelpMessage =
ReadM (Maybe a) -> Mod OptionFields (Maybe a) -> Parser (Maybe a)
forall a. ReadM a -> Mod OptionFields a -> Parser a
Optparse.option (ReadM a -> ReadM (Maybe a)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional ReadM a
readM) (
FilePath -> Mod OptionFields (Maybe a)
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
aMetavar
Mod OptionFields (Maybe a)
-> Mod OptionFields (Maybe a) -> Mod OptionFields (Maybe a)
forall a. Semigroup a => a -> a -> a
<> Maybe a -> Mod OptionFields (Maybe a)
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value Maybe a
forall a. Maybe a
Nothing
Mod OptionFields (Maybe a)
-> Mod OptionFields (Maybe a) -> Mod OptionFields (Maybe a)
forall a. Semigroup a => a -> a -> a
<> Char -> Mod OptionFields (Maybe a)
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
aShort
Mod OptionFields (Maybe a)
-> Mod OptionFields (Maybe a) -> Mod OptionFields (Maybe a)
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields (Maybe a)
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
aLong
Mod OptionFields (Maybe a)
-> Mod OptionFields (Maybe a) -> Mod OptionFields (Maybe a)
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields (Maybe a)
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
aHelpMessage
)
blogConfig :: Parser Arguments
blogConfig :: Parser Arguments
blogConfig = FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments
BlogConfig
(FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser FilePath
-> Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadM FilePath -> Mod ArgumentFields FilePath -> Parser FilePath
forall a. ReadM a -> Mod ArgumentFields a -> Parser a
argument ReadM FilePath
filePath (FilePath -> Mod ArgumentFields FilePath
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value FilePath
"." Mod ArgumentFields FilePath
-> Mod ArgumentFields FilePath -> Mod ArgumentFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod ArgumentFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"INPUT_DIR")
Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'a' FilePath
"articles" FilePath
"DIRECTORY"
FilePath
"relative path to the directory containing the articles within INPUT_DIR"
Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'b' FilePath
"banner" FilePath
"FILE" FilePath
"path to the file to use for the blog's banner"
Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'c' FilePath
"card-image" FilePath
"FILE" FilePath
"relative path to the image to use for the blog's card"
Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'C' FilePath
"comments-url" FilePath
"URL" FilePath
"URL of the instance where comments are stored"
Parser
(Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'f' FilePath
"favicon" FilePath
"FILE" FilePath
"path to the image to use for the blog's favicon"
Parser
(Maybe FilePath
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'H' FilePath
"head" FilePath
"FILE" FilePath
"path to the file to add in the blog's head"
Parser
(Maybe FilePath
-> Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
forall s. IsString s => ReadM s
str Char
'n' FilePath
"name" FilePath
"BLOG_NAME" FilePath
"name of the blog"
Parser
(Bool
-> Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser Bool
-> Parser
(Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Mod FlagFields Bool -> Parser Bool
switch (Char -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
'O' Mod FlagFields Bool -> Mod FlagFields Bool -> Mod FlagFields Bool
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"open-graph-cards" Mod FlagFields Bool -> Mod FlagFields Bool -> Mod FlagFields Bool
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"enable Open Graph cards")
Parser
(Maybe FilePath
-> Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser (Maybe FilePath)
-> Parser
(Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'p' FilePath
"pages" FilePath
"DIRECTORY"
FilePath
"relative path to the directory containing the pages within INPUT_DIR"
Parser
(Int
-> Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser Int
-> Parser
(Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
Optparse.option ReadM Int
forall a. Read a => ReadM a
auto (
FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"INTEGER"
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Int -> Mod OptionFields Int
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value Int
3
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Char -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
'A'
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"preview-articles"
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"number of articles listed on the page of each category"
)
Parser
(Int
-> Maybe FilePath
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> Arguments)
-> Parser Int
-> Parser
(Maybe FilePath
-> Bool -> Maybe FilePath -> Maybe FilePath -> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
Optparse.option ReadM Int
forall a. Read a => ReadM a
auto (
FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"INTEGER"
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Int -> Mod OptionFields Int
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value Int
10
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Char -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
'L'
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"preview-lines"
Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"number of lines to display in articles preview"
)
Parser
(Maybe FilePath
-> Bool -> Maybe FilePath -> Maybe FilePath -> Arguments)
-> Parser (Maybe FilePath)
-> Parser (Bool -> Maybe FilePath -> Maybe FilePath -> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'r' FilePath
"remarkable-config" FilePath
"FILE"
FilePath
"path to a file containing a custom RemarkableJS configuration"
Parser (Bool -> Maybe FilePath -> Maybe FilePath -> Arguments)
-> Parser Bool
-> Parser (Maybe FilePath -> Maybe FilePath -> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Mod FlagFields Bool -> Parser Bool
switch (Char -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
'R' Mod FlagFields Bool -> Mod FlagFields Bool -> Mod FlagFields Bool
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"rss" Mod FlagFields Bool -> Mod FlagFields Bool -> Mod FlagFields Bool
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"enable RSS feeds generation")
Parser (Maybe FilePath -> Maybe FilePath -> Arguments)
-> Parser (Maybe FilePath) -> Parser (Maybe FilePath -> Arguments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'u' FilePath
"site-url" FilePath
"URL" FilePath
"URL where the blog is published"
Parser (Maybe FilePath -> Arguments)
-> Parser (Maybe FilePath) -> Parser Arguments
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM FilePath
-> Char
-> FilePath
-> FilePath
-> FilePath
-> Parser (Maybe FilePath)
forall a.
ReadM a
-> Char -> FilePath -> FilePath -> FilePath -> Parser (Maybe a)
option ReadM FilePath
filePath Char
'w' FilePath
"wording" FilePath
"FILE" FilePath
"path to the file containing the wording to use"
version :: Parser Arguments
version :: Parser Arguments
version = Arguments -> Mod FlagFields Arguments -> Parser Arguments
forall a. a -> Mod FlagFields a -> Parser a
flag' Arguments
Version (
FilePath -> Mod FlagFields Arguments
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"version"
Mod FlagFields Arguments
-> Mod FlagFields Arguments -> Mod FlagFields Arguments
forall a. Semigroup a => a -> a -> a
<> Char -> Mod FlagFields Arguments
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
'v'
Mod FlagFields Arguments
-> Mod FlagFields Arguments -> Mod FlagFields Arguments
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields Arguments
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"print the version number"
)
arguments :: Parser Arguments
arguments :: Parser Arguments
arguments = Parser Arguments
blogConfig Parser Arguments -> Parser Arguments -> Parser Arguments
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Parser Arguments
version
filePath :: ReadM FilePath
filePath :: ReadM FilePath
filePath = (FilePath -> Either FilePath FilePath) -> ReadM FilePath
forall a. (FilePath -> Either FilePath a) -> ReadM a
eitherReader ((FilePath -> Either FilePath FilePath) -> ReadM FilePath)
-> (FilePath -> Either FilePath FilePath) -> ReadM FilePath
forall a b. (a -> b) -> a -> b
$ \FilePath
path ->
if FilePath -> Bool
isValid FilePath
path
then FilePath -> Either FilePath FilePath
forall a b. b -> Either a b
Right (FilePath -> Either FilePath FilePath)
-> FilePath -> Either FilePath FilePath
forall a b. (a -> b) -> a -> b
$ FilePath -> FilePath
dropTrailingPathSeparator FilePath
path
else FilePath -> Either FilePath FilePath
forall a b. a -> Either a b
Left FilePath
"This string doesn't represent a valid path"
get :: IO Arguments
get :: IO Arguments
get = do
ParserInfo Arguments -> IO Arguments
forall a. ParserInfo a -> IO a
execParser (ParserInfo Arguments -> IO Arguments)
-> ParserInfo Arguments -> IO Arguments
forall a b. (a -> b) -> a -> b
$
Parser Arguments -> InfoMod Arguments -> ParserInfo Arguments
forall a. Parser a -> InfoMod a -> ParserInfo a
info
(Parser Arguments
arguments Parser Arguments
-> Parser (Arguments -> Arguments) -> Parser Arguments
forall (f :: * -> *) a b. Applicative f => f a -> f (a -> b) -> f b
<**> Parser (Arguments -> Arguments)
forall a. Parser (a -> a)
helper)
(InfoMod Arguments
forall a. InfoMod a
fullDesc InfoMod Arguments -> InfoMod Arguments -> InfoMod Arguments
forall a. Semigroup a => a -> a -> a
<> FilePath -> InfoMod Arguments
forall a. FilePath -> InfoMod a
header (FilePath
"Hablo v" FilePath -> FilePath -> FilePath
forall a. [a] -> [a] -> [a]
++ Version -> FilePath
showVersion Version
Hablo.version))