Safe Haskell | None |
---|---|
Language | GHC2021 |
This module contains all the types related to the idea of installing a package in the pkg-db or an executable on the file system.
Synopsis
- data InstallLocation
- data InstalledPackageLocation
- data PackageDatabase
- data PackageDbVariety
- type InstallMap = Map PackageName (InstallLocation, Version)
- data Installed
- type InstalledMap = Map PackageName (InstallLocation, Installed)
- data InstalledLibraryInfo = InstalledLibraryInfo {}
- toPackageDbVariety :: PackageDatabase -> PackageDbVariety
- installedLibraryInfoFromGhcPkgId :: GhcPkgId -> InstalledLibraryInfo
- simpleInstalledLib :: PackageIdentifier -> GhcPkgId -> Map StackUnqualCompName GhcPkgId -> Installed
- installedToPackageIdOpt :: InstalledLibraryInfo -> [String]
- installedPackageIdentifier :: Installed -> PackageIdentifier
- installedVersion :: Installed -> Version
- foldOnGhcPkgId' :: (Maybe StackUnqualCompName -> GhcPkgId -> resT -> resT) -> Installed -> resT -> resT
Documentation
data InstallLocation Source #
Type representing user package databases that packages can be installed into.
Snap | The write-only package database, formerly known as the snapshot database. |
Local | The mutable package database, formerly known as the local database. |
Instances
Monoid InstallLocation Source # | |
Defined in Stack.Types.Installed mappend :: InstallLocation -> InstallLocation -> InstallLocation # mconcat :: [InstallLocation] -> InstallLocation # | |
Semigroup InstallLocation Source # | |
Defined in Stack.Types.Installed (<>) :: InstallLocation -> InstallLocation -> InstallLocation # sconcat :: NonEmpty InstallLocation -> InstallLocation # stimes :: Integral b => b -> InstallLocation -> InstallLocation # | |
Show InstallLocation Source # | |
Defined in Stack.Types.Installed showsPrec :: Int -> InstallLocation -> ShowS # show :: InstallLocation -> String # showList :: [InstallLocation] -> ShowS # | |
Eq InstallLocation Source # | |
Defined in Stack.Types.Installed (==) :: InstallLocation -> InstallLocation -> Bool # (/=) :: InstallLocation -> InstallLocation -> Bool # |
data InstalledPackageLocation Source #
Type representing user (non-global) package databases that can provide installed packages.
InstalledTo InstallLocation | A package database that a package can be installed into. |
ExtraPkgDb | An 'extra' package database, specified by |
Instances
Show InstalledPackageLocation Source # | |
Defined in Stack.Types.Installed showsPrec :: Int -> InstalledPackageLocation -> ShowS # show :: InstalledPackageLocation -> String # showList :: [InstalledPackageLocation] -> ShowS # | |
Eq InstalledPackageLocation Source # | |
Defined in Stack.Types.Installed |
data PackageDatabase Source #
Type representing package databases that can provide installed packages.
GlobalPkgDb | GHC's global package database. |
UserPkgDb InstalledPackageLocation (Path Abs Dir) | A user package database. |
Instances
Show PackageDatabase Source # | |
Defined in Stack.Types.Installed showsPrec :: Int -> PackageDatabase -> ShowS # show :: PackageDatabase -> String # showList :: [PackageDatabase] -> ShowS # | |
Eq PackageDatabase Source # | |
Defined in Stack.Types.Installed (==) :: PackageDatabase -> PackageDatabase -> Bool # (/=) :: PackageDatabase -> PackageDatabase -> Bool # |
data PackageDbVariety Source #
Type representing varieties of package databases that can provide installed packages.
GlobalDb | GHC's global package database. |
ExtraDb | An 'extra' package database, specified by |
WriteOnlyDb | The write-only package database, for immutable packages. |
MutableDb | The mutable package database. |
Instances
Show PackageDbVariety Source # | |
Defined in Stack.Types.Installed showsPrec :: Int -> PackageDbVariety -> ShowS # show :: PackageDbVariety -> String # showList :: [PackageDbVariety] -> ShowS # | |
Eq PackageDbVariety Source # | |
Defined in Stack.Types.Installed (==) :: PackageDbVariety -> PackageDbVariety -> Bool # (/=) :: PackageDbVariety -> PackageDbVariety -> Bool # |
type InstallMap = Map PackageName (InstallLocation, Version) Source #
Type synonym representing dictionaries of package names for a project's packages and dependencies, and pairs of their relevant database (write-only or mutable) and package versions.
Type representing information about what is installed.
Library PackageIdentifier InstalledLibraryInfo | A library, including its installed package id and, optionally, its license. |
Executable PackageIdentifier | An executable. |
Instances
type InstalledMap = Map PackageName (InstallLocation, Installed) Source #
Type synonym representing dictionaries of package names, and a pair of in which package database the package is installed (write-only or mutable) and information about what is installed.
data InstalledLibraryInfo Source #
Instances
Show InstalledLibraryInfo Source # | |
Defined in Stack.Types.Installed showsPrec :: Int -> InstalledLibraryInfo -> ShowS # show :: InstalledLibraryInfo -> String # showList :: [InstalledLibraryInfo] -> ShowS # | |
Eq InstalledLibraryInfo Source # | |
Defined in Stack.Types.Installed (==) :: InstalledLibraryInfo -> InstalledLibraryInfo -> Bool # (/=) :: InstalledLibraryInfo -> InstalledLibraryInfo -> Bool # |
toPackageDbVariety :: PackageDatabase -> PackageDbVariety Source #
A function to yield the variety of package database for a given package database that can provide installed packages.
simpleInstalledLib :: PackageIdentifier -> GhcPkgId -> Map StackUnqualCompName GhcPkgId -> Installed Source #
installedVersion :: Installed -> Version Source #
Get the installed Version.
foldOnGhcPkgId' :: (Maybe StackUnqualCompName -> GhcPkgId -> resT -> resT) -> Installed -> resT -> resT Source #
A strict fold over the GhcPkgId
of the given installed package. This will
iterate on both sub and main libraries, if any.