cabal-install-3.10.2.1: The command-line interface for Cabal and Hackage.
Safe HaskellNone
LanguageHaskell2010

Distribution.Client.Types.Repo

Synopsis

Remote repository

data RemoteRepo #

Constructors

RemoteRepo 

Fields

  • remoteRepoName :: RepoName
     
  • remoteRepoURI :: URI
     
  • remoteRepoSecure :: Maybe Bool

    Enable secure access?

    Nothing here represents "whatever the default is"; this is important to allow for a smooth transition from opt-in to opt-out security (once we switch to opt-out, all access to the central Hackage repository should be secure by default)

  • remoteRepoRootKeys :: [String]

    Root key IDs (for bootstrapping)

  • remoteRepoKeyThreshold :: Int

    Threshold for verification during bootstrapping

  • remoteRepoShouldTryHttps :: Bool

    Normally a repo just specifies an HTTP or HTTPS URI, but as a special case we may know a repo supports both and want to try HTTPS if we can, but still allow falling back to HTTP.

    This field is not currently stored in the config file, but is filled in automagically for known repos.

Instances

Instances details
Parsec RemoteRepo #

Note: serialised format represents RemoteRepo only partially.

Instance details

Defined in Distribution.Client.Types.Repo

Methods

parsec :: CabalParsing m => m RemoteRepo #

Pretty RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Structured RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Generic RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Associated Types

type Rep RemoteRepo 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep RemoteRepo = D1 ('MetaData "RemoteRepo" "Distribution.Client.Types.Repo" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "RemoteRepo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "remoteRepoName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RepoName) :*: (S1 ('MetaSel ('Just "remoteRepoURI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 URI) :*: S1 ('MetaSel ('Just "remoteRepoSecure") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "remoteRepoRootKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: (S1 ('MetaSel ('Just "remoteRepoKeyThreshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "remoteRepoShouldTryHttps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))
Show RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Binary RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Eq RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Ord RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep RemoteRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep RemoteRepo = D1 ('MetaData "RemoteRepo" "Distribution.Client.Types.Repo" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "RemoteRepo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "remoteRepoName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RepoName) :*: (S1 ('MetaSel ('Just "remoteRepoURI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 URI) :*: S1 ('MetaSel ('Just "remoteRepoSecure") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "remoteRepoRootKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: (S1 ('MetaSel ('Just "remoteRepoKeyThreshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "remoteRepoShouldTryHttps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))

emptyRemoteRepo :: RepoName -> RemoteRepo #

Construct a partial RemoteRepo value to fold the field parser list over.

Local repository (no-index)

data LocalRepo #

no-index style local repositories.

https://github.com/haskell/cabal/issues/6359

Instances

Instances details
Parsec LocalRepo #

Note: doesn't parse localRepoSharedCache field.

Instance details

Defined in Distribution.Client.Types.Repo

Methods

parsec :: CabalParsing m => m LocalRepo #

Pretty LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Structured LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Generic LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Associated Types

type Rep LocalRepo 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep LocalRepo = D1 ('MetaData "LocalRepo" "Distribution.Client.Types.Repo" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "LocalRepo" 'PrefixI 'True) (S1 ('MetaSel ('Just "localRepoName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RepoName) :*: (S1 ('MetaSel ('Just "localRepoPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "localRepoSharedCache") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))
Show LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Binary LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Eq LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

Ord LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep LocalRepo # 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep LocalRepo = D1 ('MetaData "LocalRepo" "Distribution.Client.Types.Repo" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "LocalRepo" 'PrefixI 'True) (S1 ('MetaSel ('Just "localRepoName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RepoName) :*: (S1 ('MetaSel ('Just "localRepoPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "localRepoSharedCache") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

emptyLocalRepo :: RepoName -> LocalRepo #

Construct a partial LocalRepo value to fold the field parser list over.

localRepoCacheKey :: LocalRepo -> String #

Calculate a cache key for local-repo.

For remote repositories we just use name, but local repositories may all be named "local", so we add a bit of localRepoPath into the mix.

Repository

data Repo #

Different kinds of repositories

NOTE: It is important that this type remains serializable.

Constructors

RepoLocalNoIndex

Local repository, without index.

https://github.com/haskell/cabal/issues/6359

RepoRemote

Standard (unsecured) remote repositories

RepoSecure

Secure repositories

Although this contains the same fields as RepoRemote, we use a separate constructor to avoid confusing the two.

Not all access to a secure repo goes through the hackage-security library currently; code paths that do not still make use of the repoRemote and repoLocalDir fields directly.

Instances

Instances details
Structured Repo # 
Instance details

Defined in Distribution.Client.Types.Repo

Generic Repo # 
Instance details

Defined in Distribution.Client.Types.Repo

Associated Types

type Rep Repo 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep Repo = D1 ('MetaData "Repo" "Distribution.Client.Types.Repo" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "RepoLocalNoIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "repoLocal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalRepo) :*: S1 ('MetaSel ('Just "repoLocalDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :+: (C1 ('MetaCons "RepoRemote" 'PrefixI 'True) (S1 ('MetaSel ('Just "repoRemote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RemoteRepo) :*: S1 ('MetaSel ('Just "repoLocalDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :+: C1 ('MetaCons "RepoSecure" 'PrefixI 'True) (S1 ('MetaSel ('Just "repoRemote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RemoteRepo) :*: S1 ('MetaSel ('Just "repoLocalDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath))))

Methods

from :: Repo -> Rep Repo x #

to :: Rep Repo x -> Repo #

Show Repo # 
Instance details

Defined in Distribution.Client.Types.Repo

Methods

showsPrec :: Int -> Repo -> ShowS #

show :: Repo -> String #

showList :: [Repo] -> ShowS #

Binary Repo # 
Instance details

Defined in Distribution.Client.Types.Repo

Methods

put :: Repo -> Put #

get :: Get Repo #

putList :: [Repo] -> Put #

Eq Repo # 
Instance details

Defined in Distribution.Client.Types.Repo

Methods

(==) :: Repo -> Repo -> Bool #

(/=) :: Repo -> Repo -> Bool #

Ord Repo # 
Instance details

Defined in Distribution.Client.Types.Repo

Methods

compare :: Repo -> Repo -> Ordering #

(<) :: Repo -> Repo -> Bool #

(<=) :: Repo -> Repo -> Bool #

(>) :: Repo -> Repo -> Bool #

(>=) :: Repo -> Repo -> Bool #

max :: Repo -> Repo -> Repo #

min :: Repo -> Repo -> Repo #

type Rep Repo # 
Instance details

Defined in Distribution.Client.Types.Repo

type Rep Repo = D1 ('MetaData "Repo" "Distribution.Client.Types.Repo" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "RepoLocalNoIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "repoLocal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LocalRepo) :*: S1 ('MetaSel ('Just "repoLocalDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :+: (C1 ('MetaCons "RepoRemote" 'PrefixI 'True) (S1 ('MetaSel ('Just "repoRemote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RemoteRepo) :*: S1 ('MetaSel ('Just "repoLocalDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :+: C1 ('MetaCons "RepoSecure" 'PrefixI 'True) (S1 ('MetaSel ('Just "repoRemote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RemoteRepo) :*: S1 ('MetaSel ('Just "repoLocalDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath))))

isRepoRemote :: Repo -> Bool #

Check if this is a remote repo

maybeRepoRemote :: Repo -> Maybe RemoteRepo #

Extract RemoteRepo from Repo if remote.