| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Darcs.UI.Options
- module Darcs.UI.Options.Core
- module Darcs.UI.Options.Markdown
- type DarcsOption = OptSpec DarcsOptDescr Flag
- type PrimDarcsOption v = forall a. PrimOptSpec DarcsOptDescr Flag a v
- type DarcsOptDescr = Compose OptDescr ((->) AbsolutePath)
- optDescr :: AbsolutePath -> DarcsOptDescr f -> OptDescr f
Documentation
module Darcs.UI.Options.Core
module Darcs.UI.Options.Markdown
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.
type PrimDarcsOption v = forall a. PrimOptSpec DarcsOptDescr Flag a v #
This is PrimOptSpec instantiated with 'DarcsOptDescr and Flag.
type DarcsOptDescr = Compose OptDescr ((->) AbsolutePath) #
We do not instantiate the d in directly with
OptSpec d fOptDescr. Instead we (post-) compose it with (->)
. Modulo newtype noise, this is the same asAbsolutePath
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).
optDescr :: AbsolutePath -> DarcsOptDescr f -> OptDescr f #
The instance Functor OptDescr was introduced only in base-4.7.0.0, which is
why we implement it here manually.