HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleCabal-syntax-3.12.1.0Haskell2010

Distribution.Types.SourceRepo

  • 4 types
  • 4 values
datadata SourceRepo
#

Information about the source revision control system for a package.

When specifying a repo it is useful to know the meaning or intention of the information as doing so enables automation. There are two obvious common purposes: one is to find the repo for the latest development version, the other is to find the repo for this specific release. The ReopKind specifies which one we mean (or another custom one).

A package can specify one or the other kind or both. Most will specify just a head repo but some may want to specify a repo to reconstruct the sources for this package release.

The required information is the RepoType which tells us if it's using Darcs, Git for example. The repoLocation and other details are interpreted according to the repo type.

Constructors

  • SourceRepo
    • repoKind :: RepoKind

      The kind of repo. This field is required.

    • repoType :: Maybe RepoType

      The type of the source repository system for this repo, eg Darcs or Git. This field is required.

    • repoLocation :: Maybe String

      The location of the repository. For most RepoTypes this is a URL. This field is required.

    • repoModule :: Maybe String

      CVS can put multiple "modules" on one server and requires a module name in addition to the location to identify a particular repo. Logically this is part of the location but unfortunately has to be specified separately. This field is required for the CVS RepoType and should not be given otherwise.

    • repoBranch :: Maybe String

      The name or identifier of the branch, if any. Many source control systems have the notion of multiple branches in a repo that exist in the same location. For example Git and CVS use this while systems like Darcs use different locations for different branches. This field is optional but should be used if necessary to identify the sources, especially for the RepoThis repo kind.

    • repoTag :: Maybe String

      The tag identify a particular state of the repository. This should be given for the RepoThis repo kind and not for RepoHead kind.

    • repoSubdir :: Maybe FilePath

      Some repositories contain multiple projects in different subdirectories This field specifies the subdirectory where this packages sources can be found, eg the subdirectory containing the .cabal file. It is interpreted relative to the root of the repository. This field is optional. If not given the default is "." ie no subdirectory.

Instances10Eq, Data, Ord, Read, Show, Generic, …
datadata RepoKind
#

What this repo info is for, what it represents.

Constructors

  • RepoHead

    The repository for the "head" or development version of the project. This repo is where we should track the latest development activity or the usual repo people should get to contribute patches.

  • RepoThis

    The repository containing the sources for this exact package version or release. For this kind of repo a tag should be given to give enough information to re-create the exact sources.

  • RepoKindUnknown String
Instances12Eq, Data, Ord, Read, Show, Generic, …
datadata RepoType
#
Instances12Eq, Data, Ord, Read, Show, Generic, …
datadata KnownRepoType
#

An enumeration of common source control systems. The fields used in the SourceRepo depend on the type of repo. The tools and methods used to obtain and track the repo depend on the repo type.

Instances14Bounded, Enum, Eq, Data, Ord, Read, …