darcs-2.12.5: 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 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 Logfile Source #

Constructors

Logfile 

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 Sign Source #

Instances

Eq Sign Source # 

Methods

(==) :: Sign -> Sign -> Bool #

(/=) :: Sign -> Sign -> Bool #

Show Sign Source # 

Methods

showsPrec :: Int -> Sign -> ShowS #

show :: Sign -> String #

showList :: [Sign] -> ShowS #

data Reorder Source #

Constructors

NoReorder 
Reorder 

Instances

data NetworkOptions Source #

TODO: reconsider this grouping of options

data UMask Source #

Constructors

YesUMask String 
NoUMask 

Instances

Eq UMask Source # 

Methods

(==) :: UMask -> UMask -> Bool #

(/=) :: UMask -> UMask -> Bool #

Show UMask Source # 

Methods

showsPrec :: Int -> UMask -> ShowS #

show :: UMask -> String #

showList :: [UMask] -> ShowS #

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.