HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulecabal-install-3.16.0.0Haskell2010

Distribution.Client.Types.Repo

  • 3 types
  • 7 values

Remote repository

2 declarations
datadata RemoteRepo
#

Constructors

  • RemoteRepo
    • 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.

Instances9Eq, Ord, Show, Generic, Binary, Parsec, …

Local repository (no-index)

3 declarations
datadata LocalRepo
#
Instances9Eq, Ord, Show, Generic, Binary, Parsec, …

Repository

4 declarations
datadata Repo
#

Different kinds of repositories

NOTE: It is important that this type remains serializable.

Constructors

Instances7Eq, Ord, Show, Generic, Binary, Structured, …

Windows

1 declaration
valuenormaliseFileNoIndexURI :: OS -> URI -> URI
#

When on Windows, we need to convert the paths in URIs to be POSIX-style.

Example2 expressions
import Network.URInormaliseFileNoIndexURI Windows (URI "file+noindex:" (Just nullURIAuth) "C:\\dev\\foo" "" "")file+noindex:C:/dev/foo

Other formats of file paths are not understood by network-uri:

Example5 expressions
import Network.URIuriPath <$> parseURI "file+noindex://C:/foo.txt"Just "/foo.txt"parseURI "file+noindex://C:\foo.txt"NothinguriPath <$> parseURI "file+noindex:///C:/foo.txt"Just "/C:/foo.txt"uriPath <$> parseURI "file+noindex:C:/foo.txt"Just "C:/foo.txt"

Out of the ones above, only the last one can be used from anywhere in the system.