Module CPM.Options

This module defines the options of CPM and operations to process them.

Summary of exported operations:

defaultOptions :: Options  Deterministic 
The default options: no command, no timing, info log level
configOpts :: Options -> ConfigOptions  Deterministic 
depsOpts :: Options -> DepsOptions  Deterministic 
checkOpts :: Options -> CheckOptions  Deterministic 
checkoutOpts :: Options -> CheckoutOptions  Deterministic 
installOpts :: Options -> InstallOptions  Deterministic 
uninstallOpts :: Options -> UninstallOptions  Deterministic 
infoOpts :: Options -> InfoOptions  Deterministic 
listOpts :: Options -> ListOptions  Deterministic 
searchOpts :: Options -> SearchOptions  Deterministic 
upgradeOpts :: Options -> UpgradeOptions  Deterministic 
linkOpts :: Options -> LinkOptions  Deterministic 
addOpts :: Options -> AddOptions  Deterministic 
newOpts :: Options -> NewOptions  Deterministic 
cleanOpts :: Options -> CleanOptions  Deterministic 
updateOpts :: Options -> UpdateOptions  Deterministic 
uploadOpts :: Options -> UploadOptions  Deterministic 
execOpts :: Options -> ExecOptions  Deterministic 
docOpts :: Options -> DocOptions  Deterministic 
testOpts :: Options -> TestOptions  Deterministic 
diffOpts :: Options -> DiffOptions  Deterministic 
readLogLevel :: String -> Either String LogLevel  Deterministic 
readRcOption :: String -> Either String (String,String)  Deterministic 
readVersion' :: String -> Either String (Int,Int,Int,Maybe String)  Deterministic 
applyEither :: [Options -> Either String Options] -> Options -> Either String Options  Deterministic 
applyParse :: [Options -> Either String Options] -> Either String Options  Deterministic 
(>.>) :: Either String a -> (a -> b) -> Either String b  Deterministic 
optionParser :: [String] -> ParseSpec (Options -> Either String Options)  Deterministic 

Exported datatypes:


Options

The global options of CPM.

Constructors:

  • Options :: LogLevel -> [(String,String)] -> Bool -> Bool -> Command -> Options

    Fields:

    • optLogLevel :: LogLevel
    • optDefConfig :: [(String,String)]
    • optShowVersion :: Bool
    • optWithTime :: Bool
    • optCommand :: Command

Command

The CPM commands with their options.

Constructors:


ConfigOptions

Constructors:

  • ConfigOptions :: Bool -> ConfigOptions

    Fields:

    • configAll :: Bool

DepsOptions

Constructors:

  • DepsOptions :: Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> DepsOptions

    Fields:

    • depsPath :: Bool
    • depsVSCode :: Bool
    • depsLangServer :: Bool
    • depsFull :: Bool
    • depsGraph :: Bool
    • depsView :: Bool

CheckOptions

Constructors:

  • CheckOptions :: Bool -> Bool -> CheckOptions

    Fields:

    • chkInfo :: Bool
    • chkSource :: Bool

CheckoutOptions

Constructors:

  • CheckoutOptions :: String -> (Maybe Version) -> Bool -> String -> CheckoutOptions

    Fields:

    • coPackage :: String
    • coVersion :: (Maybe Version)
    • coPrerelease :: Bool
    • coOutput :: String

InstallOptions

Constructors:

  • InstallOptions :: (Maybe String) -> (Maybe Version) -> Bool -> Bool -> Bool -> InstallOptions

    Fields:

    • instTarget :: (Maybe String)
    • instVersion :: (Maybe Version)
    • instPrerelease :: Bool
    • instExecutable :: Bool
    • instExecOnly :: Bool

UninstallOptions

Constructors:

  • UninstallOptions :: (Maybe String) -> (Maybe Version) -> UninstallOptions

    Fields:

    • uninstPackage :: (Maybe String)
    • uninstVersion :: (Maybe Version)

InfoOptions

Constructors:

  • InfoOptions :: (Maybe String) -> (Maybe Version) -> Bool -> Bool -> InfoOptions

    Fields:

    • infoPackage :: (Maybe String)
    • infoVersion :: (Maybe Version)
    • infoAll :: Bool
    • infoPlain :: Bool

ListOptions

Constructors:

  • ListOptions :: Bool -> Bool -> Bool -> Bool -> ListOptions

    Fields:

    • listVers :: Bool
    • listSystem :: Bool
    • listCSV :: Bool
    • listCat :: Bool

SearchOptions

Constructors:

  • SearchOptions :: String -> Bool -> Bool -> SearchOptions

    Fields:

    • searchQuery :: String
    • searchModule :: Bool
    • searchExec :: Bool

UpgradeOptions

Constructors:

  • UpgradeOptions :: (Maybe String) -> UpgradeOptions

    Fields:

    • upgrTarget :: (Maybe String)

LinkOptions

Constructors:

  • LinkOptions :: String -> LinkOptions

    Fields:

    • lnkSource :: String

AddOptions

Constructors:

  • AddOptions :: Bool -> Bool -> String -> Bool -> AddOptions

    Fields:

    • addPackage :: Bool
    • addDependency :: Bool
    • addSource :: String
    • forceAdd :: Bool

NewOptions

Constructors:

  • NewOptions :: String -> NewOptions

    Fields:

    • projectName :: String

CleanOptions

Constructors:

  • CleanOptions :: Bool -> CleanOptions

    Fields:

    • cleanDeps :: Bool

UpdateOptions

Constructors:

  • UpdateOptions :: [String] -> Bool -> Bool -> Bool -> Bool -> UpdateOptions

    Fields:

    • indexURLs :: [String]
    • cleanCache :: Bool
    • downloadIndex :: Bool
    • useRepoCache :: Bool
    • writeCSV :: Bool

UploadOptions

Constructors:

  • UploadOptions :: Bool -> Bool -> Bool -> String -> String -> UploadOptions

    Fields:

    • setTag :: Bool
    • forceUpdate :: Bool
    • uploadPublish :: Bool
    • uploadLogin :: String
    • uploadPasswd :: String

ExecOptions

Constructors:

  • ExecOptions :: String -> ExecOptions

    Fields:

    • exeCommand :: String

DocOptions

Constructors:

  • DocOptions :: (Maybe String) -> (Maybe [String]) -> Bool -> Bool -> Bool -> Bool -> String -> DocOptions

    Fields:

    • docDir :: (Maybe String)
    • docModules :: (Maybe [String])
    • docReadme :: Bool
    • docPrograms :: Bool
    • docManual :: Bool
    • docGenImports :: Bool
    • docPackageURL :: String

TestOptions

Constructors:

  • TestOptions :: (Maybe [String]) -> Bool -> Bool -> String -> [String] -> TestOptions

    Fields:

    • testModules :: (Maybe [String])
    • testCompile :: Bool
    • testSafe :: Bool
    • testFile :: String
    • testCheckOpts :: [String]

DiffOptions

Constructors:

  • DiffOptions :: (Maybe Version) -> (Maybe [String]) -> Bool -> Bool -> Bool -> Bool -> DiffOptions

    Fields:

    • diffVersion :: (Maybe Version)
    • diffModules :: (Maybe [String])
    • diffAPI :: Bool
    • diffBehavior :: Bool
    • diffGroundEqu :: Bool
    • diffUseAna :: Bool

Exported operations:

defaultOptions :: Options  Deterministic 

The default options: no command, no timing, info log level

Further infos:
  • solution complete, i.e., able to compute all solutions

addOpts :: Options -> AddOptions  Deterministic 

newOpts :: Options -> NewOptions  Deterministic 

docOpts :: Options -> DocOptions  Deterministic 

readLogLevel :: String -> Either String LogLevel  Deterministic 

readRcOption :: String -> Either String (String,String)  Deterministic 

readVersion' :: String -> Either String (Int,Int,Int,Maybe String)  Deterministic 

applyEither :: [Options -> Either String Options] -> Options -> Either String Options  Deterministic 

applyParse :: [Options -> Either String Options] -> Either String Options  Deterministic 

(>.>) :: Either String a -> (a -> b) -> Either String b  Deterministic 

optionParser :: [String] -> ParseSpec (Options -> Either String Options)  Deterministic