CurryInfo: cpm-manage-3.0.0 / CPM.Manage.main

definition:
main :: IO ()
main = do
  allargs <- getArgs
  let (rcdefs, args) = readRcOptions allargs
  config <- readConfiguration rcdefs
  case args of
    ["genhtml"]       -> writePackageIndexAsHTML config "CPM"
    ["genhtml",d]     -> writePackageIndexAsHTML config d
    ["genhtml",d,p,v] -> writePackageVersionAsHTML config d p v
    ["genreadme"]     -> writeReadmeFiles config "CPM"
    ["genreadme",d]   -> writeReadmeFiles config d
    ["gendocs"]       -> generateDocsOfAllPackages config rcdefs packageDocDir
    ["gendocs",d]     -> getAbsolutePath d >>=
                           generateDocsOfAllPackages config rcdefs
    ["gentar"]        -> genTarOfAllPackages config packageTarDir
    ["gentar",d]      -> getAbsolutePath d >>= genTarOfAllPackages config
    ["testall"]       -> testAllPackages config rcdefs ""
    ["testall",d]     -> getAbsolutePath d >>= testAllPackages config rcdefs
    ["sumcsv",d]      -> do ad <- getAbsolutePath d
                            sumCSVStatsOfPkgs ad "SUM.csv"
    ["showgraph"]     -> visualizePackageDependencies config ""
    ["showgraph",p]   -> visualizePackageDependencies config p
    ["packagelist"]   -> getPackageDependencies config >>= putStrLn . showCSV
    ["writeall"]      -> writeAllPackages config
    ["writedeps"]     -> writeAllPackageDependencies config
    ["writemods"]     -> writeAllPackageModules config rcdefs
    ["copydocs"]      -> copyPackageDocumentations config packageDocDir
    ["copydocs",d]    -> getAbsolutePath d >>= copyPackageDocumentations config
    ["config"]        -> printConfig config
    ["--help"]        -> putStrLn helpText
    ["-h"]            -> putStrLn helpText
    _                 -> do putStrLn $ "Illegal arguments: " ++ unwords args
                            putStrLn helpText
                            exitWith 1
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
------------------------------------------------------------------------------
-- Main operation to parse arguments and invoke the various manager commands.
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{() |-> _}
name:
main
precedence:
no precedence defined
result-values:
_
signature:
Prelude.IO ()
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term