-- SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
-- SPDX-License-Identifier: MIT

module CLI.Parsers where

import CLI.Types
import Data.Char (toLower, toUpper)
import Data.List (intercalate)
import Data.Version (showVersion)
import Deps (Acyclic, certainty)
import LaTeX (defaultMeetLength, defaultMeetPopularity)
import Lining (LineFormat (..))
import Logger
import Margin (defaultMargin)
import Must
import Options.Applicative
import Parser (Form (..))
import Paths_phino (version)
import Sugar (SugarType (..))
import Text.Printf (printf)

validateIntOption :: (Int -> Bool) -> String -> Int -> ReadM Int
validateIntOption :: (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption Int -> Bool
cmp FilePath
msg Int
num
  | Int -> Bool
cmp Int
num = Int -> ReadM Int
forall a. a -> ReadM a
forall (m :: * -> *) a. Monad m => a -> m a
return Int
num
  | Bool
otherwise = FilePath -> ReadM Int
forall a. FilePath -> ReadM a
readerError FilePath
msg

boundedIntOption :: ReadM Int
boundedIntOption :: ReadM Int
boundedIntOption = do
  Integer
num <- ReadM Integer
forall a. Read a => ReadM a
auto :: ReadM Integer
  if Integer
num Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
< Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int
forall a. Bounded a => a
minBound :: Int) Bool -> Bool -> Bool
|| Integer
num Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
> Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int
forall a. Bounded a => a
maxBound :: Int)
    then FilePath -> ReadM Int
forall a. FilePath -> ReadM a
readerError (FilePath -> Int -> Int -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"value must be between %d and %d" (Int
forall a. Bounded a => a
minBound :: Int) (Int
forall a. Bounded a => a
maxBound :: Int))
    else Int -> ReadM Int
forall a. a -> ReadM a
forall (m :: * -> *) a. Monad m => a -> m a
return (Integer -> Int
forall a. Num a => Integer -> a
fromInteger Integer
num)

optLogLevel :: Parser LogLevel
optLogLevel :: Parser LogLevel
optLogLevel =
  ReadM LogLevel -> Mod OptionFields LogLevel -> Parser LogLevel
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    ReadM LogLevel
parseLogLevel
    ( FilePath -> Mod OptionFields LogLevel
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"log-level"
        Mod OptionFields LogLevel
-> Mod OptionFields LogLevel -> Mod OptionFields LogLevel
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields LogLevel
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"LEVEL"
        Mod OptionFields LogLevel
-> Mod OptionFields LogLevel -> Mod OptionFields LogLevel
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields LogLevel
forall (f :: * -> *) a. FilePath -> Mod f a
help (FilePath
"Log level (" FilePath -> FilePath -> FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> [FilePath] -> FilePath
forall a. [a] -> [[a]] -> [a]
intercalate FilePath
", " ((LogLevel -> FilePath) -> [LogLevel] -> [FilePath]
forall a b. (a -> b) -> [a] -> [b]
map LogLevel -> FilePath
forall a. Show a => a -> FilePath
show [LogLevel
DEBUG, LogLevel
INFO, LogLevel
ERROR, LogLevel
NONE]) FilePath -> FilePath -> FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath
")")
        Mod OptionFields LogLevel
-> Mod OptionFields LogLevel -> Mod OptionFields LogLevel
forall a. Semigroup a => a -> a -> a
<> LogLevel -> Mod OptionFields LogLevel
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value LogLevel
ERROR
        Mod OptionFields LogLevel
-> Mod OptionFields LogLevel -> Mod OptionFields LogLevel
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields LogLevel
forall a (f :: * -> *). Show a => Mod f a
showDefault
    )
  where
    parseLogLevel :: ReadM LogLevel
    parseLogLevel :: ReadM LogLevel
parseLogLevel = (FilePath -> Either FilePath LogLevel) -> ReadM LogLevel
forall a. (FilePath -> Either FilePath a) -> ReadM a
eitherReader ((FilePath -> Either FilePath LogLevel) -> ReadM LogLevel)
-> (FilePath -> Either FilePath LogLevel) -> ReadM LogLevel
forall a b. (a -> b) -> a -> b
$ \FilePath
lvl -> case (Char -> Char) -> FilePath -> FilePath
forall a b. (a -> b) -> [a] -> [b]
map Char -> Char
toUpper FilePath
lvl of
      FilePath
"DEBUG" -> LogLevel -> Either FilePath LogLevel
forall a b. b -> Either a b
Right LogLevel
DEBUG
      FilePath
"INFO" -> LogLevel -> Either FilePath LogLevel
forall a b. b -> Either a b
Right LogLevel
INFO
      FilePath
"ERROR" -> LogLevel -> Either FilePath LogLevel
forall a b. b -> Either a b
Right LogLevel
ERROR
      FilePath
"ERR" -> LogLevel -> Either FilePath LogLevel
forall a b. b -> Either a b
Right LogLevel
ERROR
      FilePath
"NONE" -> LogLevel -> Either FilePath LogLevel
forall a b. b -> Either a b
Right LogLevel
NONE
      FilePath
_ -> FilePath -> Either FilePath LogLevel
forall a b. a -> Either a b
Left (FilePath -> Either FilePath LogLevel)
-> FilePath -> Either FilePath LogLevel
forall a b. (a -> b) -> a -> b
$ FilePath
"unknown log-level: " FilePath -> FilePath -> FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath
lvl

optLogLines :: Parser Int
optLogLines :: Parser Int
optLogLines =
  ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= -Int
1) FilePath
"--log-lines must be >= -1")
    (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"log-lines" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"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
"Amount of lines printed to console per each log operation (0 - print nothing, -1 - no limits)" 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
25 Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall a (f :: * -> *). Show a => Mod f a
showDefault)

optRule :: Parser [FilePath]
optRule :: Parser [FilePath]
optRule = Parser FilePath -> Parser [FilePath]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"rule" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"[FILE]" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Path to custom rule"))

optInputFormat :: Parser IOFormat
optInputFormat :: Parser IOFormat
optInputFormat = ReadM IOFormat -> Mod OptionFields IOFormat -> Parser IOFormat
forall a. ReadM a -> Mod OptionFields a -> Parser a
option (FilePath -> ReadM IOFormat
parseIOFormat FilePath
"input") (FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"input" Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FORMAT" Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Expression input format (phi, xmir)" Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> IOFormat -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value IOFormat
PHI Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields IOFormat
forall a (f :: * -> *). Show a => Mod f a
showDefault)

parseIOFormat :: String -> ReadM IOFormat
parseIOFormat :: FilePath -> ReadM IOFormat
parseIOFormat FilePath
type' = (FilePath -> Either FilePath IOFormat) -> ReadM IOFormat
forall a. (FilePath -> Either FilePath a) -> ReadM a
eitherReader ((FilePath -> Either FilePath IOFormat) -> ReadM IOFormat)
-> (FilePath -> Either FilePath IOFormat) -> ReadM IOFormat
forall a b. (a -> b) -> a -> b
$ \FilePath
format -> case ((Char -> Char) -> FilePath -> FilePath
forall a b. (a -> b) -> [a] -> [b]
map Char -> Char
toLower FilePath
format, FilePath
type') of
  (FilePath
"xmir", FilePath
_) -> IOFormat -> Either FilePath IOFormat
forall a b. b -> Either a b
Right IOFormat
XMIR
  (FilePath
"phi", FilePath
_) -> IOFormat -> Either FilePath IOFormat
forall a b. b -> Either a b
Right IOFormat
PHI
  (FilePath
"latex", FilePath
"output") -> IOFormat -> Either FilePath IOFormat
forall a b. b -> Either a b
Right IOFormat
LATEX
  (FilePath, FilePath)
_ -> FilePath -> Either FilePath IOFormat
forall a b. a -> Either a b
Left (FilePath -> FilePath -> FilePath -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"The value '%s' can't be used for '--%s' option, use --help to check possible values" FilePath
format FilePath
type')

optMonoform :: Parser Form
optMonoform :: Parser Form
optMonoform = Form -> Form -> Mod FlagFields Form -> Parser Form
forall a. a -> a -> Mod FlagFields a -> Parser a
flag Form
POLYFORM Form
MONOFORM (FilePath -> Mod FlagFields Form
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"monoform" Mod FlagFields Form -> Mod FlagFields Form -> Mod FlagFields Form
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields Form
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Reject a 𝜑-expression that spells some symbols in ASCII and others in Unicode, such as -> inside ⟦ ⟧")

optOutputFormat :: Parser IOFormat
optOutputFormat :: Parser IOFormat
optOutputFormat =
  ReadM IOFormat -> Mod OptionFields IOFormat -> Parser IOFormat
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    (FilePath -> ReadM IOFormat
parseIOFormat FilePath
"output")
    (FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"output" Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FORMAT" Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. FilePath -> Mod f a
help (FilePath -> FilePath -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"Result and intermediate (see %s option(s)) expressions output format (phi, xmir, latex)" FilePath
_intermediateOptions) Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> IOFormat -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value IOFormat
PHI Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields IOFormat
forall a (f :: * -> *). Show a => Mod f a
showDefault)

argInputFile :: Parser (Maybe FilePath)
argInputFile :: Parser (Maybe FilePath)
argInputFile = Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (ReadM FilePath -> Mod ArgumentFields FilePath -> Parser FilePath
forall a. ReadM a -> Mod ArgumentFields a -> Parser a
argument ReadM FilePath
forall s. IsString s => ReadM s
str (FilePath -> Mod ArgumentFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE" Mod ArgumentFields FilePath
-> Mod ArgumentFields FilePath -> Mod ArgumentFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod ArgumentFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Path to input file"))

optMaxDepth :: Parser Int
optMaxDepth :: Parser Int
optMaxDepth =
  ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--max-depth must be positive")
    (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"max-depth" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"DEPTH" 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
"Maximum number of rewriting iterations per rule" 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
25 Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall a (f :: * -> *). Show a => Mod f a
showDefault)

optMaxCycles :: Parser Int
optMaxCycles :: Parser Int
optMaxCycles =
  ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--max-cycles must be positive")
    (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"max-cycles" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"CYCLES" 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
"Maximum number of rewriting cycles across all rules" 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
25 Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall a (f :: * -> *). Show a => Mod f a
showDefault)

optMaxSteps :: Parser Int
optMaxSteps :: Parser Int
optMaxSteps =
  ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--max-steps must be positive")
    (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"max-steps" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"STEPS" 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
"Maximum number of nested morphing and dataization steps" 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
1000 Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall a (f :: * -> *). Show a => Mod f a
showDefault)

optMaxFirings :: Parser (Maybe Int)
optMaxFirings :: Parser (Maybe Int)
optMaxFirings =
  Parser Int -> Parser (Maybe Int)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
        (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--max-firings must be positive")
        (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"max-firings" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FIRINGS" 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
"Maximum number of λ functions the whole run may fire, unlimited unless given")
    )

optMaxSeconds :: Parser (Maybe Int)
optMaxSeconds :: Parser (Maybe Int)
optMaxSeconds =
  Parser Int -> Parser (Maybe Int)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
        (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--max-seconds must be positive")
        (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"max-seconds" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"SECONDS" 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
"Maximum number of seconds the whole run may take, unlimited unless given")
    )

optMargin :: Parser Int
optMargin :: Parser Int
optMargin =
  ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--margin must be positive")
    (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"margin" 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
"The maximum right margin for the printed 𝜑-expressions" 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
defaultMargin Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall a (f :: * -> *). Show a => Mod f a
showDefault)

optMeetPopularity :: Parser (Maybe Int)
optMeetPopularity :: Parser (Maybe Int)
optMeetPopularity =
  Parser Int -> Parser (Maybe Int)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
        ( ReadM Int
boundedIntOption
            ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--meet-popularity must be positive"
            ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
<= Int
100) FilePath
"--meet-popularity must be <= 100"
        )
        ( FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"meet-popularity"
            Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"PERCENTAGE"
            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 -> Int -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"The minimum popularity of an expression in order to be suitable for \\phinoMeet{}, in percentage (default: %d)" Int
defaultMeetPopularity)
        )
    )

optMeetLength :: Parser (Maybe Int)
optMeetLength :: Parser (Maybe Int)
optMeetLength =
  Parser Int -> Parser (Maybe Int)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
        (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--meet-length must be positive")
        ( FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"meet-length"
            Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"NODES"
            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 -> Int -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"The minimum length of an expression that fits into \\phinoMeet{}, in AST nodes (default: %d)" Int
defaultMeetLength)
        )
    )

optDepthSensitive :: Parser Bool
optDepthSensitive :: Parser Bool
optDepthSensitive = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"depth-sensitive" 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
"Fail if rewriting is not finished after reaching max attempts (see --max-cycles or --max-depth)")

optNonumber :: Parser Bool
optNonumber :: Parser Bool
optNonumber = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"nonumber" 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
"Turn off equation auto numbering in LaTeX rendering (see --output option)")

optSequence :: Parser Bool
optSequence :: Parser Bool
optSequence = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"sequence" 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
"Result output contains all intermediate 𝜑-expressions concatenated with EOL")

optHeaders :: Parser Bool
optHeaders :: Parser Bool
optHeaders =
  Mod FlagFields Bool -> Parser Bool
switch
    ( FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"headers"
        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
"Prefix every intermediate step (see --sequence) with a header line: step number, the rule that produced it, and AST node count before and after that rule"
    )

optCanonize :: Parser Bool
optCanonize :: Parser Bool
optCanonize = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"canonize" 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
"Rename all functions attached to λ binding with Fn1, Fn2, etc.")

optExpression :: Parser (Maybe String)
optExpression :: Parser (Maybe FilePath)
optExpression = Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"expression" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"NAME" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Name for 'phiExpression' element when rendering to LaTeX (see --output option)"))

optLabel :: Parser (Maybe String)
optLabel :: Parser (Maybe FilePath)
optLabel = Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"label" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"NAME" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Name for 'label' element when rendering to LaTeX (see --output option)"))

optMeetPrefix :: Parser (Maybe String)
optMeetPrefix :: Parser (Maybe FilePath)
optMeetPrefix = Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"meet-prefix" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"PREFIX" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Prefix to be inserted before index in \\phinoMeet{} and \\phinoAgain{} LaTeX functions, e.g. \\phinoMeet{foo:1}"))

optBreakpoint :: Parser (Maybe FilePath)
optBreakpoint :: Parser (Maybe FilePath)
optBreakpoint = Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"breakpoint" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"The name of the first unmatched rule which leads to stopping entire rewriting process and returning original expression"))

optHide :: Parser [String]
optHide :: Parser [FilePath]
optHide =
  Parser FilePath -> Parser [FilePath]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many
    ( Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
        ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"hide"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FQN"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Location of object to exclude from result and intermediate expressions after rewriting. Must be a valid dispatch expression; e.g. Q.org.eolang"
        )
    )

optShow :: Parser [String]
optShow :: Parser [FilePath]
optShow =
  Parser FilePath -> Parser [FilePath]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many
    ( Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
        ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"show"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FQN"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help
              FilePath
"Location of object to include to result and intermediate expressions after rewriting. \
              \Must be a valid dispatch expression; e.g. Q.org.eolang. Unlike --hide, can be used only once"
        )
    )

optLocator :: Parser String
optLocator :: Parser FilePath
optLocator = Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"locator" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FQN" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Location of object to rewrite, dataize or morph. Must be a valid dispatch expression; e.g. Q.foo.bar" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value FilePath
"Q" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields FilePath
forall a (f :: * -> *). Show a => Mod f a
showDefault)

optFocus :: Parser String
optFocus :: Parser FilePath
optFocus =
  Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
    ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"focus"
        Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FQN"
        Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Location of only object to be printed in entire expression. Must be a valid dispatch expression; e.g. Q.foo.bar"
        Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value FilePath
"Q"
        Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields FilePath
forall a (f :: * -> *). Show a => Mod f a
showDefault
    )

optNormalize :: Parser Bool
optNormalize :: Parser Bool
optNormalize = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"normalize" 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
"Use built-in normalization rules")

optMorph :: Parser Bool
optMorph :: Parser Bool
optMorph = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"morph" 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
"Explain built-in morphing rules")

optDataize :: Parser Bool
optDataize :: Parser Bool
optDataize = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"dataize" 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
"Explain built-in dataization rules")

optContextualize :: Parser Bool
optContextualize :: Parser Bool
optContextualize = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"contextualize" 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
"Explain built-in contextualization rules")

optTarget :: Parser (Maybe FilePath)
optTarget :: Parser (Maybe FilePath)
optTarget = Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"target" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> Char -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
't' Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"File to save output to"))

optStepsDir :: Parser (Maybe FilePath)
optStepsDir :: Parser (Maybe FilePath)
optStepsDir = Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"steps-dir" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Directory to save intermediate steps during rewriting/dataizing"))

optPartial :: Parser Bool
optPartial :: Parser Bool
optPartial = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"partial" 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
"Partial evaluation: compute what the known inputs decide and, instead of failing on a λ function that cannot fire (no entry of the --symbolic file answers it), leave it in place and print the residual 𝜑-program")

optAcyclic :: Parser (Maybe Acyclic)
optAcyclic :: Parser (Maybe Acyclic)
optAcyclic = Parser Acyclic -> Parser (Maybe Acyclic)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (ReadM Acyclic -> Mod OptionFields Acyclic -> Parser Acyclic
forall a. ReadM a -> Mod OptionFields a -> Parser a
option ReadM Acyclic
parseAcyclic (FilePath -> Mod OptionFields Acyclic
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"acyclic" Mod OptionFields Acyclic
-> Mod OptionFields Acyclic -> Mod OptionFields Acyclic
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Acyclic
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"MODE" Mod OptionFields Acyclic
-> Mod OptionFields Acyclic -> Mod OptionFields Acyclic
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Acyclic
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Stop reducing as soon as the reduction enters a formation it is already inside (fires its λ function or dataizes its φ body again) instead of going round until --max-steps runs out, answering a copy of an object binding φ with a fresh symbol and leaving any other term in place the way --partial leaves a λ function that cannot fire; 'proven' takes it for the same one up to a renaming of symbols, 'plausible' also when it holds the earlier one under wrappers it gained, such as a growing accumulator"))
  where
    parseAcyclic :: ReadM Acyclic
    parseAcyclic :: ReadM Acyclic
parseAcyclic = (FilePath -> Either FilePath Acyclic) -> ReadM Acyclic
forall a. (FilePath -> Either FilePath a) -> ReadM a
eitherReader ((FilePath -> Either FilePath Acyclic) -> ReadM Acyclic)
-> (FilePath -> Either FilePath Acyclic) -> ReadM Acyclic
forall a b. (a -> b) -> a -> b
$ \FilePath
mode -> case (Acyclic -> Bool) -> [Acyclic] -> [Acyclic]
forall a. (a -> Bool) -> [a] -> [a]
filter ((FilePath -> FilePath -> Bool
forall a. Eq a => a -> a -> Bool
== (Char -> Char) -> FilePath -> FilePath
forall a b. (a -> b) -> [a] -> [b]
map Char -> Char
toLower FilePath
mode) (FilePath -> Bool) -> (Acyclic -> FilePath) -> Acyclic -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Acyclic -> FilePath
certainty) [Acyclic
forall a. Bounded a => a
minBound .. Acyclic
forall a. Bounded a => a
maxBound] of
      Acyclic
found : [Acyclic]
_ -> Acyclic -> Either FilePath Acyclic
forall a b. b -> Either a b
Right Acyclic
found
      [] -> FilePath -> Either FilePath Acyclic
forall a b. a -> Either a b
Left (FilePath -> FilePath -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"The value '%s' can't be used for '--acyclic' option, use --help to check possible values" FilePath
mode)

optMaxLoops :: Parser Int
optMaxLoops :: Parser Int
optMaxLoops =
  ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= Int
0) FilePath
"--max-loops must be >= 0")
    (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"max-loops" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"LOOPS" 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 times the reduction may enter again a formation like one it is already inside before --acyclic cuts it, so that a recursion stopping after that many rounds is not cut" 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
0 Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall a (f :: * -> *). Show a => Mod f a
showDefault)

optSymbolic :: Parser (Maybe FilePath)
optSymbolic :: Parser (Maybe FilePath)
optSymbolic =
  Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
        ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"symbolic"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help
              FilePath
"Path to the YAML file of λ functions this run may fire, each entry keyed by a regular expression \
              \over λ names under \"λ\", naming the operands it brings down to data under \"dataize\", the ones \
              \it reduces to a normal form under \"morph\", the ones it reduces to a normal form and takes the \
              \φ of while it is a formation binding φ alone under \"undress\", the terms it fires through 𝔼 \
              \under \"evaluate\", \
              \the copies one of whose arguments reads to a bare symbol it answers with a fresh symbol under \
              \\"defer\", the terms it keeps with every ρ applied to a dispatch dropped under \"stay\", the terms \
              \it rewrites with rules spelled as in a rule file under \"rewrite\", the terms it keeps with \
              \every datum they hold turned into a fresh symbol under \"symbolize\", the pair of terms whose \
              \bare symbol it casts into the shape of the other under \"cast\", the λ functions that only \
              \raise, whose objects pass every line as they are and join as ⊥, under \"terminators\", and \
              \answering with the term under \"𝑛\", or joining under \"join\" the two sides of a datum of \
              \\"dataize\" into one term, with a fresh symbol where they differ"
        )
    )

optInside :: Parser (Maybe String)
optInside :: Parser (Maybe FilePath)
optInside =
  Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
        ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"inside"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"EXPRESSION"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help
              FilePath
"The 𝜑-expression to dataize or morph inside the input expression, which is taken as the universe \
              \Φ: a synthetic binding holding it is prepended to the universe and the locator is aimed at that \
              \binding. Cannot be used together with --locator"
        )
    )

optProtocol :: Parser (Maybe FilePath)
optProtocol :: Parser (Maybe FilePath)
optProtocol =
  Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
        ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"protocol"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help
              FilePath
"File to record every λ function fired during the run: the run at the top, one block per firing \
              \under it, and inside each block the operands it bound and the term it answered with, with a \
              \firing nested in the reduction of an operand one level deeper again. The name of the file \
              \decides the format: '.xml' writes XML, every other name writes the same tree as indented text"
        )
    )

optAbridged :: Parser (Maybe Int)
optAbridged :: Parser (Maybe Int)
optAbridged =
  Parser Int -> Parser (Maybe Int)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional
    ( Int -> Mod FlagFields Int -> Parser Int
forall a. a -> Mod FlagFields a -> Parser a
flag'
        Int
64
        ( FilePath -> Mod FlagFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"abridged"
            Mod FlagFields Int -> Mod FlagFields Int -> Mod FlagFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields Int
forall (f :: * -> *) a. FilePath -> Mod f a
help
              FilePath
"Shorten every 𝜑-expression written to the --protocol file: a formation longer than the width \
              \keeps its φ, Δ and λ bindings and folds the rest into a count, as '+34', while every byte string \
              \it writes stays whole; the width is 64 characters unless given as --abridged=WIDTH"
        )
        Parser Int -> Parser Int -> Parser Int
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
          (ReadM Int
boundedIntOption ReadM Int -> (Int -> ReadM Int) -> ReadM Int
forall a b. ReadM a -> (a -> ReadM b) -> ReadM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Int -> Bool) -> FilePath -> Int -> ReadM Int
validateIntOption (Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
0) FilePath
"--abridged must be positive")
          (FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"abridged" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"WIDTH" Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall (f :: * -> *) a. Mod f a
internal)
    )

optAbridgedData :: Parser Bool
optAbridgedData :: Parser Bool
optAbridgedData =
  Mod FlagFields Bool -> Parser Bool
switch
    ( FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"abridged-data"
        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
"Cut every byte string longer than eight bytes that the --abridged protocol writes to its first \
          \two bytes and its last two with the count of the bytes between them, as '00-00-..(45b)..-FF-EE'"
    )

optShuffle :: Parser Bool
optShuffle :: Parser Bool
optShuffle = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"shuffle" 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
"Shuffle rules before applying")

optSeed :: Parser Int
optSeed :: Parser Int
optSeed =
  ReadM Int -> Mod OptionFields Int -> Parser Int
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    ReadM Int
boundedIntOption
    ( FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"seed"
        Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Int
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"SEED"
        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
"Seed for the random generator that mints fresh synthetic names, making output reproducible across runs"
        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
0
        Mod OptionFields Int
-> Mod OptionFields Int -> Mod OptionFields Int
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields Int
forall a (f :: * -> *). Show a => Mod f a
showDefault
    )

optSugar :: Parser SugarType
optSugar :: Parser SugarType
optSugar = SugarType
-> SugarType -> Mod FlagFields SugarType -> Parser SugarType
forall a. a -> a -> Mod FlagFields a -> Parser a
flag SugarType
SALTY SugarType
SWEET (FilePath -> Mod FlagFields SugarType
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"sweet" Mod FlagFields SugarType
-> Mod FlagFields SugarType -> Mod FlagFields SugarType
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields SugarType
forall (f :: * -> *) a. FilePath -> Mod f a
help (FilePath -> FilePath -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"Print result and intermediate (see %s option(s)) 𝜑-expressions using syntax sugar" FilePath
_intermediateOptions))

optHideRho :: Parser Bool
optHideRho :: Parser Bool
optHideRho = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"hide-rho" 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
"Remove every ρ binding from result and intermediate 𝜑-expressions for cleaner output")

optSugar' :: Parser SugarType
optSugar' :: Parser SugarType
optSugar' = SugarType
-> SugarType -> Mod FlagFields SugarType -> Parser SugarType
forall a. a -> a -> Mod FlagFields a -> Parser a
flag SugarType
SALTY SugarType
SWEET (FilePath -> Mod FlagFields SugarType
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"sweet" Mod FlagFields SugarType
-> Mod FlagFields SugarType -> Mod FlagFields SugarType
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields SugarType
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Print result 𝜑-expression using syntax sugar")

optLineFormat :: Parser LineFormat
optLineFormat :: Parser LineFormat
optLineFormat = LineFormat
-> LineFormat -> Mod FlagFields LineFormat -> Parser LineFormat
forall a. a -> a -> Mod FlagFields a -> Parser a
flag LineFormat
MULTILINE LineFormat
SINGLELINE (FilePath -> Mod FlagFields LineFormat
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"flat" Mod FlagFields LineFormat
-> Mod FlagFields LineFormat -> Mod FlagFields LineFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields LineFormat
forall (f :: * -> *) a. FilePath -> Mod f a
help (FilePath -> FilePath -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"Print result and intermediate (see %s option(s)) 𝜑-expressions in one line" FilePath
_intermediateOptions))

optLineFormat' :: Parser LineFormat
optLineFormat' :: Parser LineFormat
optLineFormat' = LineFormat
-> LineFormat -> Mod FlagFields LineFormat -> Parser LineFormat
forall a. a -> a -> Mod FlagFields a -> Parser a
flag LineFormat
MULTILINE LineFormat
SINGLELINE (FilePath -> Mod FlagFields LineFormat
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"flat" Mod FlagFields LineFormat
-> Mod FlagFields LineFormat -> Mod FlagFields LineFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod FlagFields LineFormat
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Print result 𝜑-expression in one line")

optMust :: Parser Must
optMust :: Parser Must
optMust =
  ReadM Must -> Mod OptionFields Must -> Parser Must
forall a. ReadM a -> Mod OptionFields a -> Parser a
option
    ReadM Must
forall a. Read a => ReadM a
auto
    ( FilePath -> Mod OptionFields Must
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"must"
        Mod OptionFields Must
-> Mod OptionFields Must -> Mod OptionFields Must
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Must
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"RANGE"
        Mod OptionFields Must
-> Mod OptionFields Must -> Mod OptionFields Must
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields Must
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Must-rewrite range (e.g., '3', '..5', '3..', '3..5'). Stops execution if number of rewriting cycles is not in range. Use 0 to disable."
        Mod OptionFields Must
-> Mod OptionFields Must -> Mod OptionFields Must
forall a. Semigroup a => a -> a -> a
<> Must -> Mod OptionFields Must
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value Must
MtDisabled
        Mod OptionFields Must
-> Mod OptionFields Must -> Mod OptionFields Must
forall a. Semigroup a => a -> a -> a
<> (Must -> FilePath) -> Mod OptionFields Must
forall a (f :: * -> *). (a -> FilePath) -> Mod f a
showDefaultWith Must -> FilePath
forall a. Show a => a -> FilePath
show
    )

optOmitListing :: Parser Bool
optOmitListing :: Parser Bool
optOmitListing = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"omit-listing" 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
"Omit full expression listing in XMIR output")

optOmitComments :: Parser Bool
optOmitComments :: Parser Bool
optOmitComments = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"omit-comments" 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
"Omit comments in XMIR output")

optCompress :: Parser Bool
optCompress :: Parser Bool
optCompress = Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"compress" 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
"Compress expressions in LaTeX output using \\phinoMeet{} and \\phinoAgain{} functions")

_intermediateOptions :: String
_intermediateOptions :: FilePath
_intermediateOptions = FilePath -> [FilePath] -> FilePath
forall a. [a] -> [[a]] -> [a]
intercalate FilePath
", " [FilePath
"--sequence", FilePath
"--steps-dir"]

explainParser :: Parser Command
explainParser :: Parser Command
explainParser =
  OptsExplain -> Command
CmdExplain
    (OptsExplain -> Command) -> Parser OptsExplain -> Parser Command
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( LogLevel
-> Int
-> [FilePath]
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Int
-> Maybe FilePath
-> OptsExplain
OptsExplain
            (LogLevel
 -> Int
 -> [FilePath]
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Int
 -> Maybe FilePath
 -> OptsExplain)
-> Parser LogLevel
-> Parser
     (Int
      -> [FilePath]
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> OptsExplain)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser LogLevel
optLogLevel
            Parser
  (Int
   -> [FilePath]
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> OptsExplain)
-> Parser Int
-> Parser
     ([FilePath]
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optLogLines
            Parser
  ([FilePath]
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> OptsExplain)
-> Parser [FilePath]
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optRule
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> OptsExplain)
-> Parser Bool
-> Parser
     (Bool
      -> Bool -> Bool -> Bool -> Int -> Maybe FilePath -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optNormalize
            Parser
  (Bool
   -> Bool -> Bool -> Bool -> Int -> Maybe FilePath -> OptsExplain)
-> Parser Bool
-> Parser
     (Bool -> Bool -> Bool -> Int -> Maybe FilePath -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optMorph
            Parser
  (Bool -> Bool -> Bool -> Int -> Maybe FilePath -> OptsExplain)
-> Parser Bool
-> Parser (Bool -> Bool -> Int -> Maybe FilePath -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optDataize
            Parser (Bool -> Bool -> Int -> Maybe FilePath -> OptsExplain)
-> Parser Bool
-> Parser (Bool -> Int -> Maybe FilePath -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optContextualize
            Parser (Bool -> Int -> Maybe FilePath -> OptsExplain)
-> Parser Bool -> Parser (Int -> Maybe FilePath -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optShuffle
            Parser (Int -> Maybe FilePath -> OptsExplain)
-> Parser Int -> Parser (Maybe FilePath -> OptsExplain)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optSeed
            Parser (Maybe FilePath -> OptsExplain)
-> Parser (Maybe FilePath) -> Parser OptsExplain
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optTarget
        )

dataizeParser :: Parser Command
dataizeParser :: Parser Command
dataizeParser =
  OptsDataize -> Command
CmdDataize
    (OptsDataize -> Command) -> Parser OptsDataize -> Parser Command
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( LogLevel
-> Int
-> IOFormat
-> Form
-> IOFormat
-> SugarType
-> Bool
-> LineFormat
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Int
-> Bool
-> Bool
-> Maybe Acyclic
-> Int
-> Bool
-> Int
-> Int
-> Int
-> Maybe Int
-> Maybe Int
-> Int
-> Maybe Int
-> Maybe Int
-> [FilePath]
-> [FilePath]
-> FilePath
-> FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe Int
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> OptsDataize
OptsDataize
            (LogLevel
 -> Int
 -> IOFormat
 -> Form
 -> IOFormat
 -> SugarType
 -> Bool
 -> LineFormat
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Int
 -> Bool
 -> Bool
 -> Maybe Acyclic
 -> Int
 -> Bool
 -> Int
 -> Int
 -> Int
 -> Maybe Int
 -> Maybe Int
 -> Int
 -> Maybe Int
 -> Maybe Int
 -> [FilePath]
 -> [FilePath]
 -> FilePath
 -> FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe Int
 -> Bool
 -> Maybe FilePath
 -> Maybe FilePath
 -> OptsDataize)
-> Parser LogLevel
-> Parser
     (Int
      -> IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser LogLevel
optLogLevel
            Parser
  (Int
   -> IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Int
-> Parser
     (IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optLogLines
            Parser
  (IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser IOFormat
-> Parser
     (Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser IOFormat
optInputFormat
            Parser
  (Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Form
-> Parser
     (IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Form
optMonoform
            Parser
  (IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser IOFormat
-> Parser
     (SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser IOFormat
optOutputFormat
            Parser
  (SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser SugarType
-> Parser
     (Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser SugarType
optSugar
            Parser
  (Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optHideRho
            Parser
  (LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser LineFormat
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser LineFormat
optLineFormat
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitListing
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitComments
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optNonumber
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optSequence
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optHeaders
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optCanonize
            Parser
  (Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optDepthSensitive
            Parser
  (Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optShuffle
            Parser
  (Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Int
-> Parser
     (Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optSeed
            Parser
  (Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"quiet" 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
"Don't print the result of dataization")
            Parser
  (Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optPartial
            Parser
  (Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe Acyclic)
-> Parser
     (Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Acyclic)
optAcyclic
            Parser
  (Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Int
-> Parser
     (Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxLoops
            Parser
  (Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Bool
-> Parser
     (Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optCompress
            Parser
  (Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxDepth
            Parser
  (Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Int
-> Parser
     (Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxCycles
            Parser
  (Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Int
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxSteps
            Parser
  (Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMaxFirings
            Parser
  (Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe Int)
-> Parser
     (Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMaxSeconds
            Parser
  (Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser Int
-> Parser
     (Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMargin
            Parser
  (Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMeetPopularity
            Parser
  (Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe Int)
-> Parser
     ([FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMeetLength
            Parser
  ([FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser [FilePath]
-> Parser
     ([FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optHide
            Parser
  ([FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser [FilePath]
-> Parser
     (FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optShow
            Parser
  (FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser FilePath
-> Parser
     (FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath
optLocator
            Parser
  (FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser FilePath
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath
optFocus
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optExpression
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optLabel
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optMeetPrefix
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optInside
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optStepsDir
            Parser
  (Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsDataize)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe Int
      -> Bool -> Maybe FilePath -> Maybe FilePath -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optProtocol
            Parser
  (Maybe Int
   -> Bool -> Maybe FilePath -> Maybe FilePath -> OptsDataize)
-> Parser (Maybe Int)
-> Parser (Bool -> Maybe FilePath -> Maybe FilePath -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optAbridged
            Parser (Bool -> Maybe FilePath -> Maybe FilePath -> OptsDataize)
-> Parser Bool
-> Parser (Maybe FilePath -> Maybe FilePath -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optAbridgedData
            Parser (Maybe FilePath -> Maybe FilePath -> OptsDataize)
-> Parser (Maybe FilePath)
-> Parser (Maybe FilePath -> OptsDataize)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optSymbolic
            Parser (Maybe FilePath -> OptsDataize)
-> Parser (Maybe FilePath) -> Parser OptsDataize
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
argInputFile
        )

morphParser :: Parser Command
morphParser :: Parser Command
morphParser =
  OptsMorph -> Command
CmdMorph
    (OptsMorph -> Command) -> Parser OptsMorph -> Parser Command
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( LogLevel
-> Int
-> IOFormat
-> Form
-> IOFormat
-> SugarType
-> Bool
-> LineFormat
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Int
-> Bool
-> Bool
-> Maybe Acyclic
-> Int
-> Bool
-> Int
-> Int
-> Int
-> Maybe Int
-> Maybe Int
-> Int
-> Maybe Int
-> Maybe Int
-> [FilePath]
-> [FilePath]
-> FilePath
-> FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe Int
-> Bool
-> Maybe FilePath
-> Maybe FilePath
-> OptsMorph
OptsMorph
            (LogLevel
 -> Int
 -> IOFormat
 -> Form
 -> IOFormat
 -> SugarType
 -> Bool
 -> LineFormat
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Int
 -> Bool
 -> Bool
 -> Maybe Acyclic
 -> Int
 -> Bool
 -> Int
 -> Int
 -> Int
 -> Maybe Int
 -> Maybe Int
 -> Int
 -> Maybe Int
 -> Maybe Int
 -> [FilePath]
 -> [FilePath]
 -> FilePath
 -> FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe Int
 -> Bool
 -> Maybe FilePath
 -> Maybe FilePath
 -> OptsMorph)
-> Parser LogLevel
-> Parser
     (Int
      -> IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser LogLevel
optLogLevel
            Parser
  (Int
   -> IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Int
-> Parser
     (IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optLogLines
            Parser
  (IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser IOFormat
-> Parser
     (Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser IOFormat
optInputFormat
            Parser
  (Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Form
-> Parser
     (IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Form
optMonoform
            Parser
  (IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser IOFormat
-> Parser
     (SugarType
      -> Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser IOFormat
optOutputFormat
            Parser
  (SugarType
   -> Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser SugarType
-> Parser
     (Bool
      -> LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser SugarType
optSugar
            Parser
  (Bool
   -> LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (LineFormat
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optHideRho
            Parser
  (LineFormat
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser LineFormat
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser LineFormat
optLineFormat
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitListing
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitComments
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optNonumber
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optSequence
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optHeaders
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optCanonize
            Parser
  (Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optDepthSensitive
            Parser
  (Bool
   -> Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Int
      -> Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optShuffle
            Parser
  (Int
   -> Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Int
-> Parser
     (Bool
      -> Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optSeed
            Parser
  (Bool
   -> Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Bool
      -> Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"quiet" 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
"Don't print the result of morphing")
            Parser
  (Bool
   -> Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Maybe Acyclic
      -> Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optPartial
            Parser
  (Maybe Acyclic
   -> Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe Acyclic)
-> Parser
     (Int
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Acyclic)
optAcyclic
            Parser
  (Int
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Int
-> Parser
     (Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxLoops
            Parser
  (Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Bool
-> Parser
     (Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optCompress
            Parser
  (Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxDepth
            Parser
  (Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Int
-> Parser
     (Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxCycles
            Parser
  (Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Int
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxSteps
            Parser
  (Maybe Int
   -> Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMaxFirings
            Parser
  (Maybe Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe Int)
-> Parser
     (Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMaxSeconds
            Parser
  (Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser Int
-> Parser
     (Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMargin
            Parser
  (Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMeetPopularity
            Parser
  (Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe Int)
-> Parser
     ([FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMeetLength
            Parser
  ([FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser [FilePath]
-> Parser
     ([FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optHide
            Parser
  ([FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser [FilePath]
-> Parser
     (FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optShow
            Parser
  (FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser FilePath
-> Parser
     (FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath
optLocator
            Parser
  (FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser FilePath
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath
optFocus
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optExpression
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optLabel
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optMeetPrefix
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optInside
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe Int
      -> Bool
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optStepsDir
            Parser
  (Maybe FilePath
   -> Maybe Int
   -> Bool
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsMorph)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe Int
      -> Bool -> Maybe FilePath -> Maybe FilePath -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optProtocol
            Parser
  (Maybe Int
   -> Bool -> Maybe FilePath -> Maybe FilePath -> OptsMorph)
-> Parser (Maybe Int)
-> Parser (Bool -> Maybe FilePath -> Maybe FilePath -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optAbridged
            Parser (Bool -> Maybe FilePath -> Maybe FilePath -> OptsMorph)
-> Parser Bool
-> Parser (Maybe FilePath -> Maybe FilePath -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optAbridgedData
            Parser (Maybe FilePath -> Maybe FilePath -> OptsMorph)
-> Parser (Maybe FilePath) -> Parser (Maybe FilePath -> OptsMorph)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optSymbolic
            Parser (Maybe FilePath -> OptsMorph)
-> Parser (Maybe FilePath) -> Parser OptsMorph
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
argInputFile
        )

rewriteParser :: Parser Command
rewriteParser :: Parser Command
rewriteParser =
  OptsRewrite -> Command
CmdRewrite
    (OptsRewrite -> Command) -> Parser OptsRewrite -> Parser Command
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( LogLevel
-> Int
-> IOFormat
-> Form
-> IOFormat
-> SugarType
-> Bool
-> LineFormat
-> Must
-> Bool
-> Bool
-> Int
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Int
-> Int
-> Int
-> Maybe Int
-> Maybe Int
-> [FilePath]
-> [FilePath]
-> [FilePath]
-> FilePath
-> FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> OptsRewrite
OptsRewrite
            (LogLevel
 -> Int
 -> IOFormat
 -> Form
 -> IOFormat
 -> SugarType
 -> Bool
 -> LineFormat
 -> Must
 -> Bool
 -> Bool
 -> Int
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Bool
 -> Int
 -> Int
 -> Int
 -> Maybe Int
 -> Maybe Int
 -> [FilePath]
 -> [FilePath]
 -> [FilePath]
 -> FilePath
 -> FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> OptsRewrite)
-> Parser LogLevel
-> Parser
     (Int
      -> IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser LogLevel
optLogLevel
            Parser
  (Int
   -> IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Int
-> Parser
     (IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optLogLines
            Parser
  (IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser IOFormat
-> Parser
     (Form
      -> IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser IOFormat
optInputFormat
            Parser
  (Form
   -> IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Form
-> Parser
     (IOFormat
      -> SugarType
      -> Bool
      -> LineFormat
      -> Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Form
optMonoform
            Parser
  (IOFormat
   -> SugarType
   -> Bool
   -> LineFormat
   -> Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser IOFormat
-> Parser
     (SugarType
      -> Bool
      -> LineFormat
      -> Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser IOFormat
optOutputFormat
            Parser
  (SugarType
   -> Bool
   -> LineFormat
   -> Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser SugarType
-> Parser
     (Bool
      -> LineFormat
      -> Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser SugarType
optSugar
            Parser
  (Bool
   -> LineFormat
   -> Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (LineFormat
      -> Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optHideRho
            Parser
  (LineFormat
   -> Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser LineFormat
-> Parser
     (Must
      -> Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser LineFormat
optLineFormat
            Parser
  (Must
   -> Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Must
-> Parser
     (Bool
      -> Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Must
optMust
            Parser
  (Bool
   -> Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optNormalize
            Parser
  (Bool
   -> Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Int
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optShuffle
            Parser
  (Int
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Int
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optSeed
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitListing
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitComments
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optDepthSensitive
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optNonumber
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"in-place" 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
"Edit file in-place instead of printing to output")
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Mod FlagFields Bool -> Parser Bool
switch (FilePath -> Mod FlagFields Bool
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"update" 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
"Skip rewriting if --target file is newer than the input file")
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optSequence
            Parser
  (Bool
   -> Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optHeaders
            Parser
  (Bool
   -> Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Bool
      -> Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optCanonize
            Parser
  (Bool
   -> Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Bool
-> Parser
     (Int
      -> Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optCompress
            Parser
  (Int
   -> Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxDepth
            Parser
  (Int
   -> Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Int
-> Parser
     (Int
      -> Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMaxCycles
            Parser
  (Int
   -> Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser Int
-> Parser
     (Maybe Int
      -> Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMargin
            Parser
  (Maybe Int
   -> Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> [FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMeetPopularity
            Parser
  (Maybe Int
   -> [FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser (Maybe Int)
-> Parser
     ([FilePath]
      -> [FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Int)
optMeetLength
            Parser
  ([FilePath]
   -> [FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser [FilePath]
-> Parser
     ([FilePath]
      -> [FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optRule
            Parser
  ([FilePath]
   -> [FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser [FilePath]
-> Parser
     ([FilePath]
      -> FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optHide
            Parser
  ([FilePath]
   -> FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser [FilePath]
-> Parser
     (FilePath
      -> FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optShow
            Parser
  (FilePath
   -> FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser FilePath
-> Parser
     (FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath
optLocator
            Parser
  (FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser FilePath
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath
optFocus
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optExpression
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optLabel
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optMeetPrefix
            Parser
  (Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> OptsRewrite)
-> Parser (Maybe FilePath)
-> Parser
     (Maybe FilePath -> Maybe FilePath -> Maybe FilePath -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optBreakpoint
            Parser
  (Maybe FilePath -> Maybe FilePath -> Maybe FilePath -> OptsRewrite)
-> Parser (Maybe FilePath)
-> Parser (Maybe FilePath -> Maybe FilePath -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optTarget
            Parser (Maybe FilePath -> Maybe FilePath -> OptsRewrite)
-> Parser (Maybe FilePath)
-> Parser (Maybe FilePath -> OptsRewrite)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optStepsDir
            Parser (Maybe FilePath -> OptsRewrite)
-> Parser (Maybe FilePath) -> Parser OptsRewrite
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
argInputFile
        )

mergeParser :: Parser Command
mergeParser :: Parser Command
mergeParser =
  OptsMerge -> Command
CmdMerge
    (OptsMerge -> Command) -> Parser OptsMerge -> Parser Command
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( LogLevel
-> Int
-> IOFormat
-> Form
-> IOFormat
-> SugarType
-> LineFormat
-> Bool
-> Bool
-> Int
-> Maybe FilePath
-> [FilePath]
-> Int
-> OptsMerge
OptsMerge
            (LogLevel
 -> Int
 -> IOFormat
 -> Form
 -> IOFormat
 -> SugarType
 -> LineFormat
 -> Bool
 -> Bool
 -> Int
 -> Maybe FilePath
 -> [FilePath]
 -> Int
 -> OptsMerge)
-> Parser LogLevel
-> Parser
     (Int
      -> IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> LineFormat
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> [FilePath]
      -> Int
      -> OptsMerge)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser LogLevel
optLogLevel
            Parser
  (Int
   -> IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> LineFormat
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> [FilePath]
   -> Int
   -> OptsMerge)
-> Parser Int
-> Parser
     (IOFormat
      -> Form
      -> IOFormat
      -> SugarType
      -> LineFormat
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> [FilePath]
      -> Int
      -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optLogLines
            Parser
  (IOFormat
   -> Form
   -> IOFormat
   -> SugarType
   -> LineFormat
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> [FilePath]
   -> Int
   -> OptsMerge)
-> Parser IOFormat
-> Parser
     (Form
      -> IOFormat
      -> SugarType
      -> LineFormat
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> [FilePath]
      -> Int
      -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser IOFormat
optInputFormat
            Parser
  (Form
   -> IOFormat
   -> SugarType
   -> LineFormat
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> [FilePath]
   -> Int
   -> OptsMerge)
-> Parser Form
-> Parser
     (IOFormat
      -> SugarType
      -> LineFormat
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> [FilePath]
      -> Int
      -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Form
optMonoform
            Parser
  (IOFormat
   -> SugarType
   -> LineFormat
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> [FilePath]
   -> Int
   -> OptsMerge)
-> Parser IOFormat
-> Parser
     (SugarType
      -> LineFormat
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> [FilePath]
      -> Int
      -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ReadM IOFormat -> Mod OptionFields IOFormat -> Parser IOFormat
forall a. ReadM a -> Mod OptionFields a -> Parser a
option (FilePath -> ReadM IOFormat
parseIOFormat FilePath
"output") (FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"output" Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FORMAT" Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields IOFormat
forall (f :: * -> *) a. FilePath -> Mod f a
help (FilePath -> FilePath
forall r. PrintfType r => FilePath -> r
printf FilePath
"Result expression output format (phi, xmir, latex)") Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> IOFormat -> Mod OptionFields IOFormat
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value IOFormat
PHI Mod OptionFields IOFormat
-> Mod OptionFields IOFormat -> Mod OptionFields IOFormat
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields IOFormat
forall a (f :: * -> *). Show a => Mod f a
showDefault)
            Parser
  (SugarType
   -> LineFormat
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> [FilePath]
   -> Int
   -> OptsMerge)
-> Parser SugarType
-> Parser
     (LineFormat
      -> Bool
      -> Bool
      -> Int
      -> Maybe FilePath
      -> [FilePath]
      -> Int
      -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser SugarType
optSugar'
            Parser
  (LineFormat
   -> Bool
   -> Bool
   -> Int
   -> Maybe FilePath
   -> [FilePath]
   -> Int
   -> OptsMerge)
-> Parser LineFormat
-> Parser
     (Bool
      -> Bool -> Int -> Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser LineFormat
optLineFormat'
            Parser
  (Bool
   -> Bool -> Int -> Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
-> Parser Bool
-> Parser
     (Bool -> Int -> Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitListing
            Parser
  (Bool -> Int -> Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
-> Parser Bool
-> Parser (Int -> Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Bool
optOmitComments
            Parser (Int -> Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
-> Parser Int
-> Parser (Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optMargin
            Parser (Maybe FilePath -> [FilePath] -> Int -> OptsMerge)
-> Parser (Maybe FilePath)
-> Parser ([FilePath] -> Int -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
optTarget
            Parser ([FilePath] -> Int -> OptsMerge)
-> Parser [FilePath] -> Parser (Int -> OptsMerge)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath -> Parser [FilePath]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (ReadM FilePath -> Mod ArgumentFields FilePath -> Parser FilePath
forall a. ReadM a -> Mod ArgumentFields a -> Parser a
argument ReadM FilePath
forall s. IsString s => ReadM s
str (FilePath -> Mod ArgumentFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"[FILE]" Mod ArgumentFields FilePath
-> Mod ArgumentFields FilePath -> Mod ArgumentFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod ArgumentFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Paths to input files"))
            Parser (Int -> OptsMerge) -> Parser Int -> Parser OptsMerge
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optSeed
        )

matchParser :: Parser Command
matchParser :: Parser Command
matchParser =
  OptsMatch -> Command
CmdMatch
    (OptsMatch -> Command) -> Parser OptsMatch -> Parser Command
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( LogLevel
-> Int
-> Form
-> SugarType
-> LineFormat
-> Maybe FilePath
-> Maybe FilePath
-> Maybe FilePath
-> Int
-> OptsMatch
OptsMatch
            (LogLevel
 -> Int
 -> Form
 -> SugarType
 -> LineFormat
 -> Maybe FilePath
 -> Maybe FilePath
 -> Maybe FilePath
 -> Int
 -> OptsMatch)
-> Parser LogLevel
-> Parser
     (Int
      -> Form
      -> SugarType
      -> LineFormat
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Int
      -> OptsMatch)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser LogLevel
optLogLevel
            Parser
  (Int
   -> Form
   -> SugarType
   -> LineFormat
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Int
   -> OptsMatch)
-> Parser Int
-> Parser
     (Form
      -> SugarType
      -> LineFormat
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Int
      -> OptsMatch)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optLogLines
            Parser
  (Form
   -> SugarType
   -> LineFormat
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Int
   -> OptsMatch)
-> Parser Form
-> Parser
     (SugarType
      -> LineFormat
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Int
      -> OptsMatch)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Form
optMonoform
            Parser
  (SugarType
   -> LineFormat
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Int
   -> OptsMatch)
-> Parser SugarType
-> Parser
     (LineFormat
      -> Maybe FilePath
      -> Maybe FilePath
      -> Maybe FilePath
      -> Int
      -> OptsMatch)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser SugarType
optSugar'
            Parser
  (LineFormat
   -> Maybe FilePath
   -> Maybe FilePath
   -> Maybe FilePath
   -> Int
   -> OptsMatch)
-> Parser LineFormat
-> Parser
     (Maybe FilePath
      -> Maybe FilePath -> Maybe FilePath -> Int -> OptsMatch)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser LineFormat
optLineFormat'
            Parser
  (Maybe FilePath
   -> Maybe FilePath -> Maybe FilePath -> Int -> OptsMatch)
-> Parser (Maybe FilePath)
-> Parser (Maybe FilePath -> Maybe FilePath -> Int -> OptsMatch)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"pattern" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"EXPRESSION" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Pattern expression to match against"))
            Parser (Maybe FilePath -> Maybe FilePath -> Int -> OptsMatch)
-> Parser (Maybe FilePath)
-> Parser (Maybe FilePath -> Int -> OptsMatch)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser FilePath -> Parser (Maybe FilePath)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"when" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"CONDITION" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Predicate for matched substitutions"))
            Parser (Maybe FilePath -> Int -> OptsMatch)
-> Parser (Maybe FilePath) -> Parser (Int -> OptsMatch)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe FilePath)
argInputFile
            Parser (Int -> OptsMatch) -> Parser Int -> Parser OptsMatch
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optSeed
        )

compileParser :: Parser Command
compileParser :: Parser Command
compileParser =
  OptsCompile -> Command
CmdCompile
    (OptsCompile -> Command) -> Parser OptsCompile -> Parser Command
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( LogLevel -> Int -> [FilePath] -> FilePath -> OptsCompile
OptsCompile
            (LogLevel -> Int -> [FilePath] -> FilePath -> OptsCompile)
-> Parser LogLevel
-> Parser (Int -> [FilePath] -> FilePath -> OptsCompile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser LogLevel
optLogLevel
            Parser (Int -> [FilePath] -> FilePath -> OptsCompile)
-> Parser Int -> Parser ([FilePath] -> FilePath -> OptsCompile)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Int
optLogLines
            Parser ([FilePath] -> FilePath -> OptsCompile)
-> Parser [FilePath] -> Parser (FilePath -> OptsCompile)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser [FilePath]
optRule
            Parser (FilePath -> OptsCompile)
-> Parser FilePath -> Parser OptsCompile
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption (FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"target" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> Char -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
't' Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value FilePath
"compiled/generated/Compiled.hs" Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields FilePath
forall a (f :: * -> *). Show a => Mod f a
showDefault Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"File to write the Haskell module to")
        )

commandParser :: Parser Command
commandParser :: Parser Command
commandParser =
  Mod CommandFields Command -> Parser Command
forall a. Mod CommandFields a -> Parser a
hsubparser
    ( FilePath -> ParserInfo Command -> Mod CommandFields Command
forall a. FilePath -> ParserInfo a -> Mod CommandFields a
command FilePath
"rewrite" (Parser Command -> InfoMod Command -> ParserInfo Command
forall a. Parser a -> InfoMod a -> ParserInfo a
info Parser Command
rewriteParser (FilePath -> InfoMod Command
forall a. FilePath -> InfoMod a
progDesc FilePath
"Rewrite the 𝜑-expression"))
        Mod CommandFields Command
-> Mod CommandFields Command -> Mod CommandFields Command
forall a. Semigroup a => a -> a -> a
<> FilePath -> ParserInfo Command -> Mod CommandFields Command
forall a. FilePath -> ParserInfo a -> Mod CommandFields a
command FilePath
"dataize" (Parser Command -> InfoMod Command -> ParserInfo Command
forall a. Parser a -> InfoMod a -> ParserInfo a
info Parser Command
dataizeParser (FilePath -> InfoMod Command
forall a. FilePath -> InfoMod a
progDesc FilePath
"Dataize the 𝜑-expression"))
        Mod CommandFields Command
-> Mod CommandFields Command -> Mod CommandFields Command
forall a. Semigroup a => a -> a -> a
<> FilePath -> ParserInfo Command -> Mod CommandFields Command
forall a. FilePath -> ParserInfo a -> Mod CommandFields a
command FilePath
"morph" (Parser Command -> InfoMod Command -> ParserInfo Command
forall a. Parser a -> InfoMod a -> ParserInfo a
info Parser Command
morphParser (FilePath -> InfoMod Command
forall a. FilePath -> InfoMod a
progDesc FilePath
"Morph the 𝜑-expression"))
        Mod CommandFields Command
-> Mod CommandFields Command -> Mod CommandFields Command
forall a. Semigroup a => a -> a -> a
<> FilePath -> ParserInfo Command -> Mod CommandFields Command
forall a. FilePath -> ParserInfo a -> Mod CommandFields a
command FilePath
"explain" (Parser Command -> InfoMod Command -> ParserInfo Command
forall a. Parser a -> InfoMod a -> ParserInfo a
info Parser Command
explainParser (FilePath -> InfoMod Command
forall a. FilePath -> InfoMod a
progDesc FilePath
"Explain rules in LaTeX format"))
        Mod CommandFields Command
-> Mod CommandFields Command -> Mod CommandFields Command
forall a. Semigroup a => a -> a -> a
<> FilePath -> ParserInfo Command -> Mod CommandFields Command
forall a. FilePath -> ParserInfo a -> Mod CommandFields a
command FilePath
"merge" (Parser Command -> InfoMod Command -> ParserInfo Command
forall a. Parser a -> InfoMod a -> ParserInfo a
info Parser Command
mergeParser (FilePath -> InfoMod Command
forall a. FilePath -> InfoMod a
progDesc FilePath
"Merge 𝜑-expressions into single one by merging their top level formations"))
        Mod CommandFields Command
-> Mod CommandFields Command -> Mod CommandFields Command
forall a. Semigroup a => a -> a -> a
<> FilePath -> ParserInfo Command -> Mod CommandFields Command
forall a. FilePath -> ParserInfo a -> Mod CommandFields a
command FilePath
"match" (Parser Command -> InfoMod Command -> ParserInfo Command
forall a. Parser a -> InfoMod a -> ParserInfo a
info Parser Command
matchParser (FilePath -> InfoMod Command
forall a. FilePath -> InfoMod a
progDesc FilePath
"Match 𝜑-expression against provided pattern and build matched substitutions"))
        Mod CommandFields Command
-> Mod CommandFields Command -> Mod CommandFields Command
forall a. Semigroup a => a -> a -> a
<> FilePath -> ParserInfo Command -> Mod CommandFields Command
forall a. FilePath -> ParserInfo a -> Mod CommandFields a
command FilePath
"compile" (Parser Command -> InfoMod Command -> ParserInfo Command
forall a. Parser a -> InfoMod a -> ParserInfo a
info Parser Command
compileParser (FilePath -> InfoMod Command
forall a. FilePath -> InfoMod a
progDesc FilePath
"Compile the rules into a Haskell module a build with the flag 'compiled' links in"))
    )

optPin :: Parser (Maybe Pin)
optPin :: Parser (Maybe Pin)
optPin = Parser Pin -> Parser (Maybe Pin)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (FilePath -> Pin
PinVersion (FilePath -> Pin) -> Parser FilePath -> Parser Pin
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser FilePath
literal Parser Pin -> Parser Pin -> Parser Pin
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> FilePath -> Pin
PinFile (FilePath -> Pin) -> Parser FilePath -> Parser Pin
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser FilePath
file)
  where
    literal :: Parser String
    literal :: Parser FilePath
literal =
      Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
        ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"pin"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"VERSION"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Fail if this version doesn't match the version of phino"
        )
    file :: Parser FilePath
    file :: Parser FilePath
file =
      Mod OptionFields FilePath -> Parser FilePath
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
        ( FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasName f => FilePath -> Mod f a
long FilePath
"pin-file"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. HasMetavar f => FilePath -> Mod f a
metavar FilePath
"FILE"
            Mod OptionFields FilePath
-> Mod OptionFields FilePath -> Mod OptionFields FilePath
forall a. Semigroup a => a -> a -> a
<> FilePath -> Mod OptionFields FilePath
forall (f :: * -> *) a. FilePath -> Mod f a
help FilePath
"Fail if the version written in this file doesn't match the version of phino"
        )

cliArgsParser :: Parser CliArgs
cliArgsParser :: Parser CliArgs
cliArgsParser = Maybe Pin -> Command -> CliArgs
CliArgs (Maybe Pin -> Command -> CliArgs)
-> Parser (Maybe Pin) -> Parser (Command -> CliArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (Maybe Pin)
optPin Parser (Command -> CliArgs) -> Parser Command -> Parser CliArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Command
commandParser

parserInfo :: ParserInfo CliArgs
parserInfo :: ParserInfo CliArgs
parserInfo =
  Parser CliArgs -> InfoMod CliArgs -> ParserInfo CliArgs
forall a. Parser a -> InfoMod a -> ParserInfo a
info
    (Parser CliArgs
cliArgsParser Parser CliArgs -> Parser (CliArgs -> CliArgs) -> Parser CliArgs
forall (f :: * -> *) a b. Applicative f => f a -> f (a -> b) -> f b
<**> Parser (CliArgs -> CliArgs)
forall a. Parser (a -> a)
helper Parser CliArgs -> Parser (CliArgs -> CliArgs) -> Parser CliArgs
forall (f :: * -> *) a b. Applicative f => f a -> f (a -> b) -> f b
<**> FilePath -> Parser (CliArgs -> CliArgs)
forall a. FilePath -> Parser (a -> a)
simpleVersioner (Version -> FilePath
showVersion Version
version))
    (InfoMod CliArgs
forall a. InfoMod a
fullDesc InfoMod CliArgs -> InfoMod CliArgs -> InfoMod CliArgs
forall a. Semigroup a => a -> a -> a
<> FilePath -> InfoMod CliArgs
forall a. FilePath -> InfoMod a
header FilePath
"Phino - CLI Manipulator of 𝜑-Calculus Expressions")