Distribution.Client.Get

cabal-install-3.12.1.0: The command-line interface for Cabal and Hackage.

Copyright | (c) Andrea Vezzosi 2008 Duncan Coutts 2011 John Millikin 2012
License | BSD-like
Maintainer | cabal-devel@haskell.org
Stability | provisional
Portability | portable
Safe Haskell | None
Language | Haskell2010

Distribution.Client.Get

Contents

- Cloning `SourceRepo`s

Description

The 'cabal get' command.

Synopsis

- get :: Verbosity -> RepoContext -> GlobalFlags -> GetFlags -> [UserTarget] -> IO ()
- clonePackagesFromSourceRepo :: Verbosity -> FilePath -> Maybe RepoKind -> [FilePath] -> [(PackageId, [SourceRepo])] -> IO ()
- data ClonePackageException
  - = ClonePackageNoSourceRepos PackageId
  - | ClonePackageNoSourceReposOfKind PackageId (Maybe RepoKind)
  - | ClonePackageNoRepoType PackageId SourceRepo
  - | ClonePackageUnsupportedRepoType PackageId SourceRepoProxy RepoType
  - | ClonePackageNoRepoLocation PackageId SourceRepo
  - | ClonePackageDestinationExists PackageId FilePath Bool
  - | ClonePackageFailedWithExitCode PackageId SourceRepoProxy String ExitCode

# Documentation

get :: Verbosity -> RepoContext -> GlobalFlags -> GetFlags -> [UserTarget] -> IO () #

Entry point for the 'cabal get' command.

# Cloning `SourceRepo`s

Mainly exported for testing purposes

clonePackagesFromSourceRepo #

Arguments

:: Verbosity |
-> FilePath | destination dir prefix
-> Maybe RepoKind | preferred `RepoKind`
-> [FilePath] | Extra prog paths
-> [(PackageId, [SourceRepo])] | the packages and their available `SourceRepo`s
-> IO () |

Given a bunch of package ids and their corresponding available `SourceRepo`s, pick a single `SourceRepo` for each one and clone into new subdirs of the given directory.

data ClonePackageException #

Constructors

ClonePackageNoSourceRepos PackageId |
ClonePackageNoSourceReposOfKind PackageId (Maybe RepoKind) |
ClonePackageNoRepoType PackageId SourceRepo |
ClonePackageUnsupportedRepoType PackageId SourceRepoProxy RepoType |
ClonePackageNoRepoLocation PackageId SourceRepo |
ClonePackageDestinationExists PackageId FilePath Bool |
ClonePackageFailedWithExitCode PackageId SourceRepoProxy String ExitCode |

#### Instances

Instances details

Exception ClonePackageException # |
Instance details Defined in Distribution.Client.Get Methods toException :: ClonePackageException -> SomeException # fromException :: SomeException -> Maybe ClonePackageException # displayException :: ClonePackageException -> String # backtraceDesired :: ClonePackageException -> Bool #
Show ClonePackageException # |
Instance details Defined in Distribution.Client.Get Methods showsPrec :: Int -> ClonePackageException -> ShowS # show :: ClonePackageException -> String # showList :: [ClonePackageException] -> ShowS #
Eq ClonePackageException # |
Instance details Defined in Distribution.Client.Get Methods (==) :: ClonePackageException -> ClonePackageException -> Bool # (/=) :: ClonePackageException -> ClonePackageException -> Bool #