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

Safe HaskellNone



All the concrete options.


  • 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.



type DarcsOption = OptSpec DarcsOptDescr Flag Source

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 Source

Options for darcs iself that act like sub-commands.

dryRun :: PrimDarcsOption DryRun Source

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) Source

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.

reponame :: PrimDarcsOption (Maybe String) Source

--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 ScanKnown Source



Just files already known to darcs


All files, i.e. look for new ones


All files, even boring ones

onlyToFiles :: PrimDarcsOption Bool Source

TODO: see issue2395

data Reorder Source




data NetworkOptions Source

TODO: reconsider this grouping of options

data UMask Source


YesUMask String 

humanReadable :: PrimDarcsOption Bool Source

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

data CloneKind Source



Just copy pristine and inventories


First do a lazy clone then copy everything


Same as Normal but omit telling user they can interrumpt

hashed :: PrimDarcsOption () Source

Deprecated flag, still present to output an error message.