HORIZON HASKELLDocslts/ghc-9.14.xb9228482026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · b922848 · 2026-10-12

User targets

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.16.0.0 · Distribution.Client.Targets
  • Show UserTargetDefined in cabal-install-3.16.0.0 · Distribution.Client.Targets

Resolving user targets to package specifiers

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

datadata UserQualifier

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

Constructors

Instances6Eq, Show, Generic, Binary, Structured, Rep

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, …