darcs-2.11.0: a distributed, interactive, smart revision control system

Safe HaskellNone

Darcs.UI.Options.All

Description

All the concrete options.

Notes:

  • The term "option" refers to a flag or combination of flags that together form a part of a command's configuration. Ideally, options should be orthogonal to each other, so we can freely combine them.
  • A primitive (indivisible) option has an associate value type.
  • An option named "xyzActions" represents a set of flags that act as mutually exclusive sub-commands. They typically have a dedicated value type named "XyzAction".
  • This module is probably best imported qualified. This is in contrast to the current practice of using subtly differing names to avoid name clashes for closely related items. For instance, the data constructors for an option's value type and the corresponding data constructors in DarcsFlag may coincide. This is also why we import Darcs.UI.Flags qualified here.
  • When the new options system is finally in place, no code other than the one for constructing options should directly refer to DarcsFlag constructors.

Synopsis

Documentation

type DarcsOption = OptSpec DarcsOptDescr Flag

DarcsOption instantiates the first two type parameters of OptSpec to what we need in darcs. The first parameter is instantiated to The flag type is instantiate to Flag.

data RootAction

Options for darcs iself that act like sub-commands.

data UseCache

Constructors

YesUseCache 
NoUseCache 

Instances

data XmlOutput

Constructors

NoXml 
YesXml 

data DryRun

Constructors

YesDryRun 
NoDryRun 

Instances

dryRun :: PrimDarcsOption DryRun

NOTE: I'd rather work to have no uses of dryRunNoxml, so that any time --dry-run is a possibility, automated users can examine the results more easily with --xml.

See also issue2397.

matchMaxcount :: PrimDarcsOption (Maybe Int)

TODO: Returning -1 if the argument cannot be parsed as an integer is not something I expected to find in a Haskell program. Instead, the flag should take either a plain String argument (leaving it to a later stage to parse the String to an Int), or else a Maybe Int, taking the possibility of a failed parse into account.

data RemoteRepos

Constructors

RemoteRepos [String] 

reponame :: PrimDarcsOption (Maybe String)

--repodir is there for compatibility, should be removed eventually

IMHO the whole option can disappear; it overlaps with using an extra (non-option) argument, which is how e.g. darcs get is usually invoked.

data Logfile

Constructors

Logfile 

data UseIndex

Constructors

UseIndex 
IgnoreIndex 

Instances

data ScanKnown

Constructors

ScanKnown

Just files already known to darcs

ScanAll

All files, i.e. look for new ones

ScanBoring

All files, even boring ones

onlyToFiles :: PrimDarcsOption Bool

TODO: see issue2395

data RunTest

Constructors

YesRunTest 
NoRunTest 

Instances

data Sign

Instances

data Reorder

Constructors

NoReorder 
Reorder 

Instances

data Summary

Constructors

NoSummary 
YesSummary 

Instances

data NetworkOptions

TODO: reconsider this grouping of options

data UMask

Constructors

YesUMask String 
NoUMask 

Instances

humanReadable :: PrimDarcsOption Bool

TODO: These should be mutually exclusive, but are they? The code is almost inscrutable.

data CloneKind

Constructors

LazyClone

Just copy pristine and inventories

NormalClone

First do a lazy clone then copy everything

CompleteClone

Same as Normal but omit telling user they can interrumpt

hashed :: PrimDarcsOption ()

Deprecated flag, still present to output an error message.