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-install-3.12.1.0Haskell2010

Distribution.Client.Targets

Handling for user-specified targets

  • 7 types
  • 13 values

User targets

2 declarations
datadata UserTarget
#

Various ways that a user may specify a package or package collection.

Constructors

  • UserTargetNamed PackageVersionConstraint

    A partially specified package, identified by name and possibly with an exact version or a version constraint.

    cabal install foo
    cabal install foo-1.0
    cabal install 'foo < 2'
  • UserTargetLocalDir FilePath

    A specific package that is unpacked in a local directory, often the current directory.

    cabal install .
    cabal install ../lib/other
    • Note: in future, if multiple .cabal files are allowed in a single directory then this will refer to the collection of packages.

  • UserTargetLocalCabalFile FilePath

    A specific local unpacked package, identified by its .cabal file.

    cabal install foo.cabal
    cabal install ../lib/other/bar.cabal
  • UserTargetLocalTarball FilePath

    A specific package that is available as a local tarball file

    cabal install dist/foo-1.0.tar.gz
    cabal install ../build/baz-1.0.tar.gz
  • UserTargetRemoteTarball URI

    A specific package that is available as a remote tarball file

    cabal install http://code.haskell.org/~user/foo/foo-0.9.tar.gz
Instances2Eq, Show
  • Eq UserTargetDefined in cabal-install-3.12.1.0 · Distribution.Client.Targets
  • Show UserTargetDefined in cabal-install-3.12.1.0 · Distribution.Client.Targets

Resolving user targets to package specifiers

1 declaration

Detailed interface

datadata PackageTarget pkg
#

An intermediate between a UserTarget and a resolved PackageSpecifier. Unlike a UserTarget, a PackageTarget refers only to a single package.

Constructors

Instances4Functor, Foldable, Traversable, Show
valuedisambiguatePackageName
  1. :: PackageNameEnv
  2. -> PackageName
  3. -> MaybeAmbiguous PackageName
#

Given a package name and a list of matching names, figure out which one it might be referring to. If there is an exact case-sensitive match then that's ok (i.e. returned via Unambiguous). If it matches just one package case-insensitively or if it matches multiple packages case-insensitively, in that case the result is Ambiguous.

Note: Before cabal 2.2, when only a single package matched case-insensitively it would be considered Unambiguous.

User constraints

6 declarations
datadata UserQualifier
#

Version of Qualifier that a user may specify on the command line.

Constructors

Instances6Eq, Show, Generic, Binary, Structured, Rep
datadata UserConstraintScope
#

Version of ConstraintScope that a user may specify on the command line.

Constructors

Instances6Eq, Show, Generic, Binary, Structured, Rep
datadata UserConstraint
#

Version of PackageConstraint that the user can specify on the command line.

Instances8Eq, Show, Generic, Binary, Parsec, Pretty, …