This is to do with command line handling. The Cabal command line is
organised into a number of named sub-commands (much like darcs). The
CommandUI abstraction represents one of these sub-commands, with a name,
description, a set of flags. Commands can be associated with actions and
run. It handles some common stuff automatically, like the --help and
command line completion flags. It is designed to allow other tools make
derived commands. This feature is used heavily in cabal-install.

Running commands

Option Fields

We usually have a datatype for storing configuration values, where
every field stores a configuration option, and the user sets
the value either via command line flags or a configuration file.
An individual OptionField models such a field, and we usually
build a list of options associated to a configuration datatype.