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

Darcs.UI.Options

Synopsis

# Documentation

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.

type PrimDarcsOption v = forall a. PrimOptSpec DarcsOptDescr Flag a v Source #

This is PrimOptSpec instantiated with 'DarcsOptDescr and Flag.

We do not instantiate the d in OptSpec d f directly with OptDescr. Instead we (post-) compose it with (->) AbsolutePath. Modulo newtype noise, this is the same as

 type 'DarcsOptDescr f = OptDescr (AbsolutePath -> f)

This is so we can pass a directory relative to which an option argument is interpreted (if it has the form of a relative path).

Instantiate a DarcsOptDescr with an AbsolutePath