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

Safe HaskellNone
LanguageHaskell2010

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

data XmlOutput Source

Constructors

NoXml 
YesXml 

data DryRun Source

Constructors

YesDryRun 
NoDryRun 

Instances

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

Constructors

UseIndex 
IgnoreIndex 

Instances

data ScanKnown Source

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 Source

TODO: see issue2395

data RunTest Source

Constructors

YesRunTest 
NoRunTest 

Instances

data Sign Source

Instances

data Reorder Source

Constructors

NoReorder 
Reorder 

Instances

data Summary Source

Constructors

NoSummary 
YesSummary 

Instances

data NetworkOptions Source

TODO: reconsider this grouping of options

data UMask Source

Constructors

YesUMask String 
NoUMask 

Instances

humanReadable :: PrimDarcsOption Bool Source

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

data CloneKind Source

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

Deprecated flag, still present to output an error message.