| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Pantry
Description
Content addressable Haskell package management, providing for secure, reproducible acquisition of Haskell package contents and metadata.
Since: 0.1.0.0
Synopsis
- data PantryConfig
- data PackageIndexConfig = PackageIndexConfig {}
- data HackageSecurityConfig = HackageSecurityConfig {
- hscKeyIds :: ![Text]
- hscKeyThreshold :: !Int
- hscIgnoreExpiry :: !Bool
- defaultPackageIndexConfig :: PackageIndexConfig
- defaultDownloadPrefix :: Text
- defaultHackageSecurityConfig :: HackageSecurityConfig
- defaultCasaRepoPrefix :: CasaRepoPrefix
- defaultCasaMaxPerRequest :: Int
- defaultSnapshotLocation :: SnapName -> RawSnapshotLocation
- defaultGlobalHintsLocation :: WantedCompiler -> GlobalHintsLocation
- class HasPantryConfig env where
- pantryConfigL :: Lens' env PantryConfig
- withPantryConfig :: HasLogFunc env => Path Abs Dir -> PackageIndexConfig -> HpackExecutable -> Int -> CasaRepoPrefix -> Int -> (SnapName -> RawSnapshotLocation) -> (WantedCompiler -> GlobalHintsLocation) -> (PantryConfig -> RIO env a) -> RIO env a
- withPantryConfig' :: HasLogFunc env => Path Abs Dir -> PackageIndexConfig -> HpackExecutable -> Force -> Int -> Maybe (CasaRepoPrefix, Int) -> (SnapName -> RawSnapshotLocation) -> (WantedCompiler -> GlobalHintsLocation) -> (PantryConfig -> RIO env a) -> RIO env a
- data HpackExecutable
- data PantryApp
- runPantryApp :: MonadIO m => RIO PantryApp a -> m a
- runPantryAppClean :: MonadIO m => RIO PantryApp a -> m a
- runPantryAppWith :: MonadIO m => Int -> CasaRepoPrefix -> Int -> RIO PantryApp a -> m a
- hpackExecutableL :: Lens' PantryConfig HpackExecutable
- hpackForceL :: Lens' PantryConfig Force
- data PantryException
- = PackageIdentifierRevisionParseFail !Text
- | RawPackageLocationImmutableParseFail !Text !SomeException
- | RawPackageLocationImmutableParseWarnings !Text ![JSONWarning]
- | InvalidCabalFile !(Either RawPackageLocationImmutable (Path Abs File)) !(Maybe Version) ![PError] ![PWarning]
- | TreeWithoutCabalFile !RawPackageLocationImmutable
- | TreeWithMultipleCabalFiles !RawPackageLocationImmutable ![SafeFilePath]
- | MismatchedCabalName !(Path Abs File) !PackageName
- | NoLocalPackageDirFound !(Path Abs Dir)
- | NoCabalFileFound !(Path Abs Dir)
- | MultipleCabalFilesFound !(Path Abs Dir) ![Path Abs File]
- | InvalidWantedCompiler !Text
- | InvalidSnapshotLocation !(Path Abs Dir) !Text
- | InvalidOverrideCompiler !WantedCompiler !WantedCompiler
- | InvalidFilePathSnapshot !Text
- | InvalidSnapshot !RawSnapshotLocation !SomeException
- | InvalidGlobalHintsLocation !(Path Abs Dir) !Text
- | InvalidFilePathGlobalHints !Text
- | MismatchedPackageMetadata !RawPackageLocationImmutable !RawPackageMetadata !(Maybe TreeKey) !PackageIdentifier
- | Non200ResponseStatus !Status
- | InvalidBlobKey !(Mismatch BlobKey)
- | Couldn'tParseSnapshot !RawSnapshotLocation !String
- | WrongCabalFileName !RawPackageLocationImmutable !SafeFilePath !PackageName
- | DownloadInvalidSHA256 !Text !(Mismatch SHA256)
- | DownloadInvalidSize !Text !(Mismatch FileSize)
- | DownloadTooLarge !Text !(Mismatch FileSize)
- | LocalNoArchiveFileFound !(Path Abs File)
- | LocalInvalidSHA256 !(Path Abs File) !(Mismatch SHA256)
- | LocalInvalidSize !(Path Abs File) !(Mismatch FileSize)
- | UnknownArchiveType !ArchiveLocation
- | InvalidTarFileType !ArchiveLocation !FilePath !FileType
- | UnsupportedTarball !ArchiveLocation !Text
- | NoHackageCryptographicHash !PackageIdentifier
- | FailedToCloneRepo !SimpleRepo
- | TreeReferencesMissingBlob !RawPackageLocationImmutable !SafeFilePath !BlobKey
- | CompletePackageMetadataMismatch !RawPackageLocationImmutable !PackageMetadata
- | CRC32Mismatch !ArchiveLocation !FilePath !(Mismatch Word32)
- | UnknownHackagePackage !PackageIdentifierRevision !FuzzyResults
- | CannotCompleteRepoNonSHA1 !Repo
- | MutablePackageLocationFromUrl !Text
- | MismatchedCabalFileForHackage !PackageIdentifierRevision !(Mismatch PackageIdentifier)
- | PackageNameParseFail !Text
- | PackageVersionParseFail !Text
- | InvalidCabalFilePath !(Path Abs File)
- | DuplicatePackageNames !Utf8Builder ![(PackageName, [RawPackageLocationImmutable])]
- | MigrationFailure !Text !(Path Abs File) !SomeException
- | NoCasaConfig
- | InvalidTreeFromCasa !BlobKey !ByteString
- | ParseSnapNameException !Text
- | HpackLibraryException !(Path Abs File) !String
- | HpackExeException !FilePath !(Path Abs Dir) !SomeException
- data Mismatch a = Mismatch {
- mismatchExpected :: !a
- mismatchActual :: !a
- data FuzzyResults
- data PackageName
- data Version
- data FlagName
- data PackageIdentifier = PackageIdentifier {}
- data Force
- newtype FileSize = FileSize Word
- newtype RelFilePath = RelFilePath Text
- data ResolvedPath t = ResolvedPath {
- resolvedRelative :: !RelFilePath
- resolvedAbsolute :: !(Path Abs t)
- data Unresolved a
- data SafeFilePath
- mkSafeFilePath :: Text -> Maybe SafeFilePath
- data SHA256
- newtype TreeKey = TreeKey BlobKey
- data BlobKey = BlobKey !SHA256 !FileSize
- data RawPackageMetadata = RawPackageMetadata {
- rpmName :: !(Maybe PackageName)
- rpmVersion :: !(Maybe Version)
- rpmTreeKey :: !(Maybe TreeKey)
- data PackageMetadata = PackageMetadata {
- pmIdent :: !PackageIdentifier
- pmTreeKey :: !TreeKey
- data Package = Package {}
- data CabalFileInfo
- newtype Revision = Revision Word
- data PackageIdentifierRevision = PackageIdentifierRevision !PackageName !Version !CabalFileInfo
- data UsePreferredVersions
- data RawArchive = RawArchive {
- raLocation :: !ArchiveLocation
- raHash :: !(Maybe SHA256)
- raSize :: !(Maybe FileSize)
- raSubdir :: !Text
- data Archive = Archive {}
- data ArchiveLocation
- = ALUrl !Text
- | ALFilePath !(ResolvedPath File)
- data Repo = Repo {
- repoUrl :: !Text
- repoCommit :: !Text
- repoType :: !RepoType
- repoSubdir :: !Text
- data RepoType
- data SimpleRepo = SimpleRepo {}
- withRepo :: (HasLogFunc env, HasProcessContext env) => SimpleRepo -> RIO env a -> RIO env a
- fetchRepos :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, PackageMetadata)] -> RIO env ()
- fetchReposRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, RawPackageMetadata)] -> RIO env ()
- data RawPackageLocation
- data PackageLocation
- toRawPL :: PackageLocation -> RawPackageLocation
- data RawPackageLocationImmutable
- data PackageLocationImmutable
- data RawSnapshotLocation
- = RSLCompiler !WantedCompiler
- | RSLUrl !Text !(Maybe BlobKey)
- | RSLFilePath !(ResolvedPath File)
- | RSLSynonym !SnapName
- data SnapshotLocation
- = SLCompiler !WantedCompiler
- | SLUrl !Text !BlobKey
- | SLFilePath !(ResolvedPath File)
- toRawSL :: SnapshotLocation -> RawSnapshotLocation
- data RawSnapshot = RawSnapshot {
- rsCompiler :: !WantedCompiler
- rsPackages :: !(Map PackageName RawSnapshotPackage)
- rsDrop :: !(Set PackageName)
- data Snapshot = Snapshot {}
- data RawSnapshotPackage = RawSnapshotPackage {
- rspLocation :: !RawPackageLocationImmutable
- rspFlags :: !(Map FlagName Bool)
- rspHidden :: !Bool
- rspGhcOptions :: ![Text]
- data SnapshotPackage = SnapshotPackage {
- spLocation :: !PackageLocationImmutable
- spFlags :: !(Map FlagName Bool)
- spHidden :: !Bool
- spGhcOptions :: ![Text]
- data RawSnapshotLayer = RawSnapshotLayer {
- rslParent :: !RawSnapshotLocation
- rslCompiler :: !(Maybe WantedCompiler)
- rslLocations :: ![RawPackageLocationImmutable]
- rslDropPackages :: !(Set PackageName)
- rslFlags :: !(Map PackageName (Map FlagName Bool))
- rslHidden :: !(Map PackageName Bool)
- rslGhcOptions :: !(Map PackageName [Text])
- rslPublishTime :: !(Maybe UTCTime)
- data SnapshotLayer = SnapshotLayer {
- slParent :: !SnapshotLocation
- slCompiler :: !(Maybe WantedCompiler)
- slLocations :: ![PackageLocationImmutable]
- slDropPackages :: !(Set PackageName)
- slFlags :: !(Map PackageName (Map FlagName Bool))
- slHidden :: !(Map PackageName Bool)
- slGhcOptions :: !(Map PackageName [Text])
- slPublishTime :: !(Maybe UTCTime)
- toRawSnapshotLayer :: SnapshotLayer -> RawSnapshotLayer
- data WantedCompiler
- data SnapName
- snapshotLocation :: HasPantryConfig env => SnapName -> RIO env RawSnapshotLocation
- data GlobalHintsLocation
- = GHLUrl !Text
- | GHLFilePath !(ResolvedPath File)
- resolvePaths :: MonadIO m => Maybe (Path Abs Dir) -> Unresolved a -> m a
- loadPackageRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env Package
- tryLoadPackageRawViaCasa :: (HasLogFunc env, HasPantryConfig env, HasProcessContext env) => RawPackageLocationImmutable -> TreeKey -> RIO env (Maybe Package)
- loadPackage :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env Package
- loadRawSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env (Either WantedCompiler (RawSnapshotLayer, CompletedSL))
- loadSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => SnapshotLocation -> RIO env (Either WantedCompiler RawSnapshotLayer)
- loadSnapshot :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => SnapshotLocation -> RIO env RawSnapshot
- loadAndCompleteSnapshot :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => SnapshotLocation -> Map RawSnapshotLocation SnapshotLocation -> Map RawPackageLocationImmutable PackageLocationImmutable -> RIO env (Snapshot, [CompletedSL], [CompletedPLI])
- loadAndCompleteSnapshot' :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Bool -> SnapshotLocation -> Map RawSnapshotLocation SnapshotLocation -> Map RawPackageLocationImmutable PackageLocationImmutable -> RIO env (Snapshot, [CompletedSL], [CompletedPLI])
- loadAndCompleteSnapshotRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawSnapshotLocation -> Map RawSnapshotLocation SnapshotLocation -> Map RawPackageLocationImmutable PackageLocationImmutable -> RIO env (Snapshot, [CompletedSL], [CompletedPLI])
- loadAndCompleteSnapshotRaw' :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Bool -> RawSnapshotLocation -> Map RawSnapshotLocation SnapshotLocation -> Map RawPackageLocationImmutable PackageLocationImmutable -> RIO env (Snapshot, [CompletedSL], [CompletedPLI])
- data CompletedSL = CompletedSL !RawSnapshotLocation !SnapshotLocation
- data CompletedPLI = CompletedPLI !RawPackageLocationImmutable !PackageLocationImmutable
- addPackagesToSnapshot :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Utf8Builder -> [RawPackageLocationImmutable] -> AddPackagesConfig -> Map PackageName RawSnapshotPackage -> RIO env (Map PackageName RawSnapshotPackage, AddPackagesConfig)
- data AddPackagesConfig = AddPackagesConfig {
- apcDrop :: !(Set PackageName)
- apcFlags :: !(Map PackageName (Map FlagName Bool))
- apcHiddens :: !(Map PackageName Bool)
- apcGhcOptions :: !(Map PackageName [Text])
- data CompletePackageLocation = CompletePackageLocation {}
- completePackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env CompletePackageLocation
- completeSnapshotLocation :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env SnapshotLocation
- warnMissingCabalFile :: HasLogFunc env => RawPackageLocationImmutable -> RIO env ()
- parseWantedCompiler :: Text -> Either PantryException WantedCompiler
- parseSnapName :: MonadThrow m => Text -> m SnapName
- parseRawSnapshotLocation :: Text -> Unresolved RawSnapshotLocation
- parsePackageIdentifierRevision :: Text -> Either PantryException PackageIdentifierRevision
- parseRawPackageLocationImmutables :: Text -> Either PantryException (Unresolved (NonEmpty RawPackageLocationImmutable))
- parseHackageText :: Text -> Either PantryException (PackageIdentifier, BlobKey)
- parsePackageIdentifier :: String -> Maybe PackageIdentifier
- parsePackageName :: String -> Maybe PackageName
- parsePackageNameThrowing :: MonadThrow m => String -> m PackageName
- parseFlagName :: String -> Maybe FlagName
- parseVersion :: String -> Maybe Version
- parseVersionThrowing :: MonadThrow m => String -> m Version
- packageIdentifierString :: PackageIdentifier -> String
- packageNameString :: PackageName -> String
- flagNameString :: FlagName -> String
- versionString :: Version -> String
- moduleNameString :: ModuleName -> String
- newtype CabalString a = CabalString {
- unCabalString :: a
- toCabalStringMap :: Map a v -> Map (CabalString a) v
- unCabalStringMap :: Map (CabalString a) v -> Map a v
- gpdPackageIdentifier :: GenericPackageDescription -> PackageIdentifier
- gpdPackageName :: GenericPackageDescription -> PackageName
- gpdVersion :: GenericPackageDescription -> Version
- fetchPackages :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env, Foldable f) => f PackageLocationImmutable -> RIO env ()
- unpackPackageLocationRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Path Abs Dir -> RawPackageLocationImmutable -> RIO env ()
- unpackPackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Path Abs Dir -> PackageLocationImmutable -> RIO env ()
- getPackageLocationName :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageName
- getRawPackageLocationIdent :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageIdentifier
- packageLocationIdent :: PackageLocationImmutable -> PackageIdentifier
- packageLocationVersion :: PackageLocationImmutable -> Version
- getRawPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env TreeKey
- getPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env TreeKey
- loadCabalFileRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Maybe Text -> RawPackageLocation -> RIO env GenericPackageDescription
- loadCabalFile :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Maybe Text -> PackageLocation -> RIO env GenericPackageDescription
- loadCabalFileRawImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env GenericPackageDescription
- loadCabalFileImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env GenericPackageDescription
- loadCabalFilePath :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Maybe Text -> Path Abs Dir -> RIO env (PrintWarnings -> IO GenericPackageDescription, PackageName, Path Abs File)
- findOrGenerateCabalFile :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Maybe Text -> Path Abs Dir -> RIO env (PackageName, Path Abs File)
- data PrintWarnings
- updateHackageIndex :: (HasPantryConfig env, HasLogFunc env) => Maybe Utf8Builder -> RIO env DidUpdateOccur
- data DidUpdateOccur
- data RequireHackageIndex
- hackageIndexTarballL :: HasPantryConfig env => SimpleGetter env (Path Abs File)
- getHackagePackageVersions :: (HasPantryConfig env, HasLogFunc env) => RequireHackageIndex -> UsePreferredVersions -> PackageName -> RIO env (Map Version (Map Revision BlobKey))
- getLatestHackageVersion :: (HasPantryConfig env, HasLogFunc env) => RequireHackageIndex -> PackageName -> UsePreferredVersions -> RIO env (Maybe PackageIdentifierRevision)
- getLatestHackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RequireHackageIndex -> PackageName -> UsePreferredVersions -> RIO env (Maybe PackageLocationImmutable)
- getLatestHackageRevision :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RequireHackageIndex -> PackageName -> Version -> RIO env (Maybe (Revision, BlobKey, TreeKey))
- getHackageTypoCorrections :: (HasPantryConfig env, HasLogFunc env) => PackageName -> RIO env [PackageName]
- loadGlobalHints :: (HasTerm env, HasPantryConfig env) => WantedCompiler -> RIO env (Maybe (Map PackageName Version))
- partitionReplacedDependencies :: Ord id => Map PackageName a -> (a -> PackageName) -> (a -> id) -> (a -> [id]) -> Set PackageName -> (Map PackageName [PackageName], Map PackageName a)
- newtype SnapshotCacheHash = SnapshotCacheHash {}
- withSnapshotCache :: (HasPantryConfig env, HasLogFunc env) => SnapshotCacheHash -> RIO env (Map PackageName (Set ModuleName)) -> ((ModuleName -> RIO env [PackageName]) -> RIO env a) -> RIO env a
Running
data PantryConfig Source #
Configuration value used by the entire pantry package. Create one using
withPantryConfig or withPantryConfig'. See also PantryApp for a
convenience approach to using pantry.
Since: 0.1.0.0
data PackageIndexConfig Source #
Configuration to securely download package metadata and contents. For most
purposes, you'll want to use the default Hackage settings via
defaultPackageIndexConfig.
NOTE It's highly recommended to only use the official Hackage server or a mirror. See https://github.com/commercialhaskell/stack/issues/4137.
Since: 0.6.0
Constructors
| PackageIndexConfig | |
Fields | |
Instances
| Show PackageIndexConfig | |
Defined in Pantry.Types | |
| FromJSON (WithJSONWarnings PackageIndexConfig) | If the Since: 0.6.0 |
Defined in Pantry.Types | |
data HackageSecurityConfig Source #
Configuration for Hackage Security to securely download package metadata
and contents. For most purposes, you'll want to use the default Hackage
settings via defaultHackageSecurityConfig.
NOTE It's highly recommended to only use the official Hackage server or a mirror. See https://github.com/commercialhaskell/stack/issues/4137.
Since: 0.6.0
Constructors
| HackageSecurityConfig | |
Fields
| |
Instances
| Show HackageSecurityConfig | |
Defined in Pantry.Types | |
| FromJSON (WithJSONWarnings HackageSecurityConfig) | If the Since: 0.1.1.0 |
Defined in Pantry.Types | |
defaultPackageIndexConfig :: PackageIndexConfig Source #
Default PackageIndexConfig value using the official Hackage server.
Since: 0.6.0
defaultDownloadPrefix :: Text Source #
The download prefix for the official Hackage server.
Since: 0.6.0
defaultHackageSecurityConfig :: HackageSecurityConfig Source #
Default HackageSecurityConfig value using the official Hackage server.
The value of the hscIgnoreExpiry field is True.
Since: 0.7.0
defaultCasaRepoPrefix :: CasaRepoPrefix Source #
Default pull URL for Casa.
Since: 0.1.1.1
defaultCasaMaxPerRequest :: Int Source #
Default max keys to pull per request.
Since: 0.1.1.1
defaultSnapshotLocation :: SnapName -> RawSnapshotLocation Source #
Default location of snapshot synonyms, i.e. commercialhaskell's GitHub repository.
Since: 0.5.0.0
defaultGlobalHintsLocation :: WantedCompiler -> GlobalHintsLocation Source #
Default location of global hints, i.e. commercialhaskell's GitHub repository.
Since: 0.9.4
class HasPantryConfig env where Source #
An environment which contains a PantryConfig.
Since: 0.1.0.0
Methods
pantryConfigL :: Lens' env PantryConfig Source #
Lens to get or set the PantryConfig
Since: 0.1.0.0
Instances
| HasPantryConfig PantryApp Source # | |
Defined in Pantry Methods | |
Arguments
| :: HasLogFunc env | |
| => Path Abs Dir | pantry root directory, where the SQLite database and Hackage downloads are kept. |
| -> PackageIndexConfig | Package index configuration. You probably want
|
| -> HpackExecutable | When converting an hpack |
| -> Int | Maximum connection count |
| -> CasaRepoPrefix | The casa pull URL e.g. https://casa.stackage.org/v1/pull. |
| -> Int | Max casa keys to pull per request. |
| -> (SnapName -> RawSnapshotLocation) | The location of snapshot synonyms |
| -> (WantedCompiler -> GlobalHintsLocation) | The location of global hints |
| -> (PantryConfig -> RIO env a) | What to do with the config |
| -> RIO env a |
Create a new PantryConfig with the given settings. For a version where
Hpack's approach to overwriting Cabal files is configurable and the use of
Casa (content-addressable storage archive) is optional, see
withPantryConfig'.
For something easier to use in simple cases, see runPantryApp.
Since: 0.1.0.0
Arguments
| :: HasLogFunc env | |
| => Path Abs Dir | pantry root directory, where the SQLite database and Hackage downloads are kept. |
| -> PackageIndexConfig | Package index configuration. You probably want
|
| -> HpackExecutable | When converting an hpack |
| -> Force | Should Hpack force the overwriting of a Cabal file that has been modified manually? Since: 0.10.0 |
| -> Int | Maximum connection count |
| -> Maybe (CasaRepoPrefix, Int) | Optionally, the Casa pull URL e.g. |
| -> (SnapName -> RawSnapshotLocation) | The location of snapshot synonyms |
| -> (WantedCompiler -> GlobalHintsLocation) | The location of global hints |
| -> (PantryConfig -> RIO env a) | What to do with the config |
| -> RIO env a |
Create a new PantryConfig with the given settings.
For something easier to use in simple cases, see runPantryApp.
Since: 0.8.3
data HpackExecutable Source #
What to use for running hpack
Since: 0.1.0.0
Constructors
| HpackBundled | Compiled in library |
| HpackCommand !FilePath | Executable at the provided path |
Instances
| Read HpackExecutable | |
Defined in Pantry.Types | |
| Show HpackExecutable | |
Defined in Pantry.Types | |
| Eq HpackExecutable | |
Defined in Pantry.Types Methods (==) :: HpackExecutable -> HpackExecutable -> Bool Source # (/=) :: HpackExecutable -> HpackExecutable -> Bool Source # | |
| Ord HpackExecutable | |
Defined in Pantry.Types Methods compare :: HpackExecutable -> HpackExecutable -> Ordering Source # (<) :: HpackExecutable -> HpackExecutable -> Bool Source # (<=) :: HpackExecutable -> HpackExecutable -> Bool Source # (>) :: HpackExecutable -> HpackExecutable -> Bool Source # (>=) :: HpackExecutable -> HpackExecutable -> Bool Source # max :: HpackExecutable -> HpackExecutable -> HpackExecutable Source # min :: HpackExecutable -> HpackExecutable -> HpackExecutable Source # | |
Convenience
Convenient data type that allows you to work with pantry more easily than
using withPantryConfig or withPantryConfig' directly. Uses basically sane
settings, like sharing a pantry directory with Stack.
You can use runPantryApp to use this. A simple example is:
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
-- From package Cabal-syntax
import Distribution.Types.Version ( mkVersion )
-- From package pantry
import Pantry
( CabalFileInfo (..), PackageIdentifierRevision (..), PantryApp
, RawPackageLocationImmutable (..), loadPackageRaw, runPantryApp
)
-- From package rio
import RIO ( RIO, liftIO )
main :: IO ()
main = runPantryApp myPantryApp
myPantryApp :: RIO PantryApp ()
myPantryApp = loadPackageRaw baseLocation >>= liftIO . print
where
baseVersion = mkVersion [4, 19, 0, 0]
basePkgId = PackageIdentifierRevision "base" baseVersion CFILatest
baseLocation = RPLIHackage basePkgId NothingSince: 0.1.0.0
runPantryApp :: MonadIO m => RIO PantryApp a -> m a Source #
Run some code against pantry using basic sane settings.
For testing, see runPantryAppClean.
Since: 0.1.0.0
runPantryAppClean :: MonadIO m => RIO PantryApp a -> m a Source #
Like runPantryApp, but uses an empty pantry directory instead of sharing
with Stack. Useful for testing.
Since: 0.1.0.0
runPantryAppWith :: MonadIO m => Int -> CasaRepoPrefix -> Int -> RIO PantryApp a -> m a Source #
Run some code against pantry using basic sane settings.
For testing, see runPantryAppClean.
Since: 0.1.1.1
hpackExecutableL :: Lens' PantryConfig HpackExecutable Source #
Lens to view or modify the HpackExecutable of a PantryConfig.
Since: 0.1.0.0
hpackForceL :: Lens' PantryConfig Force Source #
Lens to view or modify the Force of a PantryConfig.
Since: 0.10.0
Types
Exceptions
data PantryException Source #
Things that can go wrong in pantry. Note two things:
- Many other exception types may be thrown from underlying libraries. Pantry does not attempt to wrap these underlying exceptions.
- We may add more constructors to this data type in minor version bumps of pantry. This technically breaks the PVP. You should not be writing pattern matches against this type that expect total matching.
Since: 0.1.0.0
Constructors
Instances
| Exception PantryException | |
Defined in Pantry.Types Methods toException :: PantryException -> SomeException Source # fromException :: SomeException -> Maybe PantryException Source # | |
| Show PantryException | |
Defined in Pantry.Types | |
| Display PantryException | |
Defined in Pantry.Types Methods display :: PantryException -> Utf8Builder Source # textDisplay :: PantryException -> Text Source # | |
| Pretty PantryException | |
Defined in Pantry.Types Methods pretty :: PantryException -> StyleDoc Source # | |
Constructors
| Mismatch | |
Fields
| |
data FuzzyResults Source #
Cabal types
data PackageName Source #
A package name.
Use mkPackageName and unPackageName to convert from/to a
String.
This type is opaque since Cabal-2.0
Since: Cabal-syntax-2.0.0.2
Instances
A Version represents the version of a software entity.
Instances of Eq and Ord are provided, which gives exact
equality and lexicographic ordering of the version number
components (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).
This type is opaque and distinct from the Version type in
Data.Version since Cabal-2.0. The difference extends to the
Binary instance using a different (and more compact) encoding.
Since: Cabal-syntax-2.0.0.2
Instances
| Parsec Version | |||||
Defined in Distribution.Types.Version Methods parsec :: CabalParsing m => m Version Source # | |||||
| Pretty Version | |||||
Defined in Distribution.Types.Version | |||||
| Structured Version | |||||
Defined in Distribution.Types.Version | |||||
| Binary Version | |||||
| NFData Version | |||||
Defined in Distribution.Types.Version | |||||
| Data Version | |||||
Defined in Distribution.Types.Version Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version Source # toConstr :: Version -> Constr Source # dataTypeOf :: Version -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Version) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) Source # gmapT :: (forall b. Data b => b -> b) -> Version -> Version Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version Source # | |||||
| Generic Version | |||||
Defined in Distribution.Types.Version Associated Types
| |||||
| Read Version | |||||
| Show Version | |||||
| Eq Version | |||||
| Ord Version | |||||
Defined in Distribution.Types.Version | |||||
| IsCabalString Version | |||||
Defined in Pantry.Types | |||||
| type Rep Version | |||||
Defined in Distribution.Types.Version type Rep Version = D1 ('MetaData "Version" "Distribution.Types.Version" "Cabal-syntax-3.12.1.0-inplace" 'False) (C1 ('MetaCons "PV0" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :+: C1 ('MetaCons "PV1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]))) | |||||
A FlagName is the name of a user-defined configuration flag
Use mkFlagName and unFlagName to convert from/to a String.
This type is opaque since Cabal-2.0
Since: Cabal-syntax-2.0.0.2
Instances
| Parsec FlagName | |||||
Defined in Distribution.Types.Flag Methods parsec :: CabalParsing m => m FlagName Source # | |||||
| Pretty FlagName | |||||
Defined in Distribution.Types.Flag | |||||
| Structured FlagName | |||||
Defined in Distribution.Types.Flag | |||||
| Binary FlagName | |||||
| NFData FlagName | |||||
Defined in Distribution.Types.Flag | |||||
| Data FlagName | |||||
Defined in Distribution.Types.Flag Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FlagName -> c FlagName Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FlagName Source # toConstr :: FlagName -> Constr Source # dataTypeOf :: FlagName -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FlagName) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FlagName) Source # gmapT :: (forall b. Data b => b -> b) -> FlagName -> FlagName Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FlagName -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FlagName -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FlagName -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FlagName -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FlagName -> m FlagName Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FlagName -> m FlagName Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FlagName -> m FlagName Source # | |||||
| IsString FlagName | Since: Cabal-syntax-2.0.0.2 | ||||
Defined in Distribution.Types.Flag Methods fromString :: String -> FlagName Source # | |||||
| Generic FlagName | |||||
Defined in Distribution.Types.Flag Associated Types
| |||||
| Read FlagName | |||||
| Show FlagName | |||||
| Eq FlagName | |||||
| Ord FlagName | |||||
Defined in Distribution.Types.Flag | |||||
| IsCabalString FlagName | |||||
Defined in Pantry.Types | |||||
| type Rep FlagName | |||||
Defined in Distribution.Types.Flag | |||||
data PackageIdentifier Source #
The name and version of a package.
Constructors
| PackageIdentifier | |
Fields
| |
Instances
| Package PackageIdentifier | |||||
Defined in Distribution.Package Methods packageId :: PackageIdentifier -> PackageIdentifier Source # | |||||
| Parsec PackageIdentifier |
Note: Stricter than
| ||||
Defined in Distribution.Types.PackageId Methods parsec :: CabalParsing m => m PackageIdentifier Source # | |||||
| Pretty PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Methods pretty :: PackageIdentifier -> Doc Source # prettyVersioned :: CabalSpecVersion -> PackageIdentifier -> Doc Source # | |||||
| Structured PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Methods structure :: Proxy PackageIdentifier -> Structure Source # structureHash' :: Tagged PackageIdentifier MD5 | |||||
| Binary PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Methods put :: PackageIdentifier -> Put Source # get :: Get PackageIdentifier Source # putList :: [PackageIdentifier] -> Put Source # | |||||
| NFData PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Methods rnf :: PackageIdentifier -> () Source # | |||||
| Data PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageIdentifier -> c PackageIdentifier Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageIdentifier Source # toConstr :: PackageIdentifier -> Constr Source # dataTypeOf :: PackageIdentifier -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PackageIdentifier) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageIdentifier) Source # gmapT :: (forall b. Data b => b -> b) -> PackageIdentifier -> PackageIdentifier Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageIdentifier -> r Source # gmapQ :: (forall d. Data d => d -> u) -> PackageIdentifier -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageIdentifier -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageIdentifier -> m PackageIdentifier Source # | |||||
| Generic PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Associated Types
Methods from :: PackageIdentifier -> Rep PackageIdentifier x Source # to :: Rep PackageIdentifier x -> PackageIdentifier Source # | |||||
| Read PackageIdentifier | |||||
Defined in Distribution.Types.PackageId | |||||
| Show PackageIdentifier | |||||
Defined in Distribution.Types.PackageId | |||||
| Eq PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Methods (==) :: PackageIdentifier -> PackageIdentifier -> Bool Source # (/=) :: PackageIdentifier -> PackageIdentifier -> Bool Source # | |||||
| Ord PackageIdentifier | |||||
Defined in Distribution.Types.PackageId Methods compare :: PackageIdentifier -> PackageIdentifier -> Ordering Source # (<) :: PackageIdentifier -> PackageIdentifier -> Bool Source # (<=) :: PackageIdentifier -> PackageIdentifier -> Bool Source # (>) :: PackageIdentifier -> PackageIdentifier -> Bool Source # (>=) :: PackageIdentifier -> PackageIdentifier -> Bool Source # max :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier Source # min :: PackageIdentifier -> PackageIdentifier -> PackageIdentifier Source # | |||||
| IsCabalString PackageIdentifier | |||||
Defined in Pantry.Types Methods cabalStringName :: proxy PackageIdentifier -> String | |||||
| type Rep PackageIdentifier | |||||
Defined in Distribution.Types.PackageId type Rep PackageIdentifier = D1 ('MetaData "PackageIdentifier" "Distribution.Types.PackageId" "Cabal-syntax-3.12.1.0-inplace" 'False) (C1 ('MetaCons "PackageIdentifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkgName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageName) :*: S1 ('MetaSel ('Just "pkgVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) | |||||
Hpack types
Files
File size in bytes
Since: 0.1.0.0
Instances
| FromJSON FileSize | |||||
| ToJSON FileSize | |||||
| NFData FileSize | |||||
Defined in Pantry.Types | |||||
| Generic FileSize | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show FileSize | |||||
| Eq FileSize | |||||
| Ord FileSize | |||||
Defined in Pantry.Types | |||||
| Hashable FileSize | |||||
Defined in Pantry.Types | |||||
| PersistField FileSize | |||||
Defined in Pantry.Types Methods toPersistValue :: FileSize -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text FileSize Source # | |||||
| PersistFieldSql FileSize | |||||
| Display FileSize | |||||
Defined in Pantry.Types | |||||
| type Rep FileSize | |||||
Defined in Pantry.Types | |||||
newtype RelFilePath Source #
File path relative to the configuration file it was parsed from
Since: 0.1.0.0
Constructors
| RelFilePath Text |
Instances
| FromJSON RelFilePath | |||||
Defined in Pantry.Types Methods parseJSON :: Value -> Parser RelFilePath Source # parseJSONList :: Value -> Parser [RelFilePath] Source # | |||||
| ToJSON RelFilePath | |||||
Defined in Pantry.Types Methods toJSON :: RelFilePath -> Value Source # toEncoding :: RelFilePath -> Encoding Source # toJSONList :: [RelFilePath] -> Value Source # toEncodingList :: [RelFilePath] -> Encoding Source # omitField :: RelFilePath -> Bool Source # | |||||
| NFData RelFilePath | |||||
Defined in Pantry.Types Methods rnf :: RelFilePath -> () Source # | |||||
| Generic RelFilePath | |||||
Defined in Pantry.Types Associated Types
Methods from :: RelFilePath -> Rep RelFilePath x Source # to :: Rep RelFilePath x -> RelFilePath Source # | |||||
| Show RelFilePath | |||||
Defined in Pantry.Types | |||||
| Eq RelFilePath | |||||
Defined in Pantry.Types Methods (==) :: RelFilePath -> RelFilePath -> Bool Source # (/=) :: RelFilePath -> RelFilePath -> Bool Source # | |||||
| Ord RelFilePath | |||||
Defined in Pantry.Types Methods compare :: RelFilePath -> RelFilePath -> Ordering Source # (<) :: RelFilePath -> RelFilePath -> Bool Source # (<=) :: RelFilePath -> RelFilePath -> Bool Source # (>) :: RelFilePath -> RelFilePath -> Bool Source # (>=) :: RelFilePath -> RelFilePath -> Bool Source # max :: RelFilePath -> RelFilePath -> RelFilePath Source # min :: RelFilePath -> RelFilePath -> RelFilePath Source # | |||||
| Display RelFilePath | |||||
Defined in Pantry.Types | |||||
| type Rep RelFilePath | |||||
Defined in Pantry.Types type Rep RelFilePath = D1 ('MetaData "RelFilePath" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "RelFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
data ResolvedPath t Source #
A combination of the relative path provided in a config file, together with the resolved absolute path.
Since: 0.1.0.0
Constructors
| ResolvedPath | |
Fields
| |
Instances
| NFData (ResolvedPath t) | |||||
Defined in Pantry.Types Methods rnf :: ResolvedPath t -> () Source # | |||||
| Generic (ResolvedPath t) | |||||
Defined in Pantry.Types Associated Types
Methods from :: ResolvedPath t -> Rep (ResolvedPath t) x Source # to :: Rep (ResolvedPath t) x -> ResolvedPath t Source # | |||||
| Show (ResolvedPath t) | |||||
Defined in Pantry.Types | |||||
| Eq (ResolvedPath t) | |||||
Defined in Pantry.Types Methods (==) :: ResolvedPath t -> ResolvedPath t -> Bool Source # (/=) :: ResolvedPath t -> ResolvedPath t -> Bool Source # | |||||
| Ord (ResolvedPath t) | |||||
Defined in Pantry.Types Methods compare :: ResolvedPath t -> ResolvedPath t -> Ordering Source # (<) :: ResolvedPath t -> ResolvedPath t -> Bool Source # (<=) :: ResolvedPath t -> ResolvedPath t -> Bool Source # (>) :: ResolvedPath t -> ResolvedPath t -> Bool Source # (>=) :: ResolvedPath t -> ResolvedPath t -> Bool Source # max :: ResolvedPath t -> ResolvedPath t -> ResolvedPath t Source # min :: ResolvedPath t -> ResolvedPath t -> ResolvedPath t Source # | |||||
| type Rep (ResolvedPath t) | |||||
Defined in Pantry.Types type Rep (ResolvedPath t) = D1 ('MetaData "ResolvedPath" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "ResolvedPath" 'PrefixI 'True) (S1 ('MetaSel ('Just "resolvedRelative") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RelFilePath) :*: S1 ('MetaSel ('Just "resolvedAbsolute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Path Abs t)))) | |||||
data Unresolved a Source #
Wraps a value which potentially contains relative paths. Needs to be provided with a base directory to resolve these paths.
Unwrap this using resolvePaths.
Since: 0.1.0.0
Instances
| Applicative Unresolved | |
Defined in Pantry.Types Methods pure :: a -> Unresolved a Source # (<*>) :: Unresolved (a -> b) -> Unresolved a -> Unresolved b Source # liftA2 :: (a -> b -> c) -> Unresolved a -> Unresolved b -> Unresolved c Source # (*>) :: Unresolved a -> Unresolved b -> Unresolved b Source # (<*) :: Unresolved a -> Unresolved b -> Unresolved a Source # | |
| Functor Unresolved | |
Defined in Pantry.Types Methods fmap :: (a -> b) -> Unresolved a -> Unresolved b Source # (<$) :: a -> Unresolved b -> Unresolved a Source # | |
| FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) | |
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) Source # | |
| FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) | |
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) Source # | |
| FromJSON (WithJSONWarnings (Unresolved GlobalHintsLocation)) | |
Defined in Pantry.Types | |
| FromJSON (WithJSONWarnings (Unresolved PackageLocationImmutable)) | |
Defined in Pantry.Types | |
| FromJSON (WithJSONWarnings (Unresolved RawSnapshotLayer)) | |
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved RawSnapshotLayer)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved RawSnapshotLayer)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved RawSnapshotLayer)) Source # | |
| FromJSON (WithJSONWarnings (Unresolved RawSnapshotLocation)) | |
Defined in Pantry.Types | |
| FromJSON (WithJSONWarnings (Unresolved SnapshotLocation)) | |
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved SnapshotLocation)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved SnapshotLocation)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved SnapshotLocation)) Source # | |
data SafeFilePath Source #
Instances
| Show SafeFilePath | |
Defined in Pantry.Types | |
| Eq SafeFilePath | |
Defined in Pantry.Types Methods (==) :: SafeFilePath -> SafeFilePath -> Bool Source # (/=) :: SafeFilePath -> SafeFilePath -> Bool Source # | |
| Ord SafeFilePath | |
Defined in Pantry.Types Methods compare :: SafeFilePath -> SafeFilePath -> Ordering Source # (<) :: SafeFilePath -> SafeFilePath -> Bool Source # (<=) :: SafeFilePath -> SafeFilePath -> Bool Source # (>) :: SafeFilePath -> SafeFilePath -> Bool Source # (>=) :: SafeFilePath -> SafeFilePath -> Bool Source # max :: SafeFilePath -> SafeFilePath -> SafeFilePath Source # min :: SafeFilePath -> SafeFilePath -> SafeFilePath Source # | |
| PersistField SafeFilePath | |
Defined in Pantry.Types Methods toPersistValue :: SafeFilePath -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text SafeFilePath Source # | |
| PersistFieldSql SafeFilePath | |
Defined in Pantry.Types | |
| Display SafeFilePath | |
Defined in Pantry.Types | |
mkSafeFilePath :: Text -> Maybe SafeFilePath Source #
Cryptography
A SHA256 hash, stored in a static size for more efficient memory representation.
Since: 0.1.0.0
Instances
| FromJSON SHA256 | |||||
| ToJSON SHA256 | |||||
| NFData SHA256 | |||||
Defined in Pantry.SHA256 | |||||
| Data SHA256 | |||||
Defined in Pantry.SHA256 Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SHA256 -> c SHA256 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SHA256 Source # toConstr :: SHA256 -> Constr Source # dataTypeOf :: SHA256 -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SHA256) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SHA256) Source # gmapT :: (forall b. Data b => b -> b) -> SHA256 -> SHA256 Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SHA256 -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SHA256 -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SHA256 -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SHA256 -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SHA256 -> m SHA256 Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SHA256 -> m SHA256 Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SHA256 -> m SHA256 Source # | |||||
| Generic SHA256 | |||||
Defined in Pantry.SHA256 Associated Types
| |||||
| Show SHA256 | |||||
| Eq SHA256 | |||||
| Ord SHA256 | |||||
| Hashable SHA256 | |||||
Defined in Pantry.SHA256 | |||||
| PersistField SHA256 | |||||
Defined in Pantry.SHA256 Methods toPersistValue :: SHA256 -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text SHA256 Source # | |||||
| PersistFieldSql SHA256 | |||||
| Display SHA256 | |||||
Defined in Pantry.SHA256 | |||||
| type Rep SHA256 | |||||
Defined in Pantry.SHA256 | |||||
The hash of the binary representation of a Tree.
Since: 0.1.0.0
Instances
| FromJSON TreeKey | |||||
| ToJSON TreeKey | |||||
| NFData TreeKey | |||||
Defined in Pantry.Types | |||||
| Generic TreeKey | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show TreeKey | |||||
| Eq TreeKey | |||||
| Ord TreeKey | |||||
| Display TreeKey | |||||
Defined in Pantry.Types | |||||
| type Rep TreeKey | |||||
Defined in Pantry.Types | |||||
A key for looking up a blob, which combines the SHA256 hash of the contents and the file size.
The file size may seem redundant with the hash. However, it is necessary for safely downloading blobs from an untrusted source. See https://www.fpcomplete.com/blog/2018/07/pantry-part-2-trees-keys.
Since: 0.1.0.0
Instances
| FromJSON BlobKey | |||||
| ToJSON BlobKey | |||||
| NFData BlobKey | |||||
Defined in Pantry.Types | |||||
| Generic BlobKey | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show BlobKey | |||||
| Eq BlobKey | |||||
| Ord BlobKey | |||||
| Display BlobKey | |||||
Defined in Pantry.Types | |||||
| type Rep BlobKey | |||||
Defined in Pantry.Types type Rep BlobKey = D1 ('MetaData "BlobKey" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "BlobKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 FileSize))) | |||||
Packages
data RawPackageMetadata Source #
Metadata provided by a config file for archives and repos. This information can be used for optimized lookups of information like package identifiers, or for validating that the user configuration has the expected information.
Since: 0.1.0.0
Constructors
| RawPackageMetadata | |
Fields
| |
Instances
| NFData RawPackageMetadata | |||||
Defined in Pantry.Types Methods rnf :: RawPackageMetadata -> () Source # | |||||
| Generic RawPackageMetadata | |||||
Defined in Pantry.Types Associated Types
Methods from :: RawPackageMetadata -> Rep RawPackageMetadata x Source # to :: Rep RawPackageMetadata x -> RawPackageMetadata Source # | |||||
| Show RawPackageMetadata | |||||
Defined in Pantry.Types | |||||
| Eq RawPackageMetadata | |||||
Defined in Pantry.Types Methods (==) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source # (/=) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source # | |||||
| Ord RawPackageMetadata | |||||
Defined in Pantry.Types Methods compare :: RawPackageMetadata -> RawPackageMetadata -> Ordering Source # (<) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source # (<=) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source # (>) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source # (>=) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source # max :: RawPackageMetadata -> RawPackageMetadata -> RawPackageMetadata Source # min :: RawPackageMetadata -> RawPackageMetadata -> RawPackageMetadata Source # | |||||
| Display RawPackageMetadata | |||||
Defined in Pantry.Types Methods display :: RawPackageMetadata -> Utf8Builder Source # textDisplay :: RawPackageMetadata -> Text Source # | |||||
| type Rep RawPackageMetadata | |||||
Defined in Pantry.Types type Rep RawPackageMetadata = D1 ('MetaData "RawPackageMetadata" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "RawPackageMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "rpmName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe PackageName)) :*: (S1 ('MetaSel ('Just "rpmVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Version)) :*: S1 ('MetaSel ('Just "rpmTreeKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TreeKey))))) | |||||
data PackageMetadata Source #
Exact metadata specifying concrete package
Since: 0.1.0.0
Constructors
| PackageMetadata | |
Fields
| |
Instances
| NFData PackageMetadata | |||||
Defined in Pantry.Types Methods rnf :: PackageMetadata -> () Source # | |||||
| Generic PackageMetadata | |||||
Defined in Pantry.Types Associated Types
Methods from :: PackageMetadata -> Rep PackageMetadata x Source # to :: Rep PackageMetadata x -> PackageMetadata Source # | |||||
| Show PackageMetadata | |||||
Defined in Pantry.Types | |||||
| Eq PackageMetadata | |||||
Defined in Pantry.Types Methods (==) :: PackageMetadata -> PackageMetadata -> Bool Source # (/=) :: PackageMetadata -> PackageMetadata -> Bool Source # | |||||
| Ord PackageMetadata | |||||
Defined in Pantry.Types Methods compare :: PackageMetadata -> PackageMetadata -> Ordering Source # (<) :: PackageMetadata -> PackageMetadata -> Bool Source # (<=) :: PackageMetadata -> PackageMetadata -> Bool Source # (>) :: PackageMetadata -> PackageMetadata -> Bool Source # (>=) :: PackageMetadata -> PackageMetadata -> Bool Source # max :: PackageMetadata -> PackageMetadata -> PackageMetadata Source # min :: PackageMetadata -> PackageMetadata -> PackageMetadata Source # | |||||
| Display PackageMetadata | |||||
Defined in Pantry.Types Methods display :: PackageMetadata -> Utf8Builder Source # textDisplay :: PackageMetadata -> Text Source # | |||||
| type Rep PackageMetadata | |||||
Defined in Pantry.Types type Rep PackageMetadata = D1 ('MetaData "PackageMetadata" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "PackageMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "pmIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageIdentifier) :*: S1 ('MetaSel ('Just "pmTreeKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TreeKey))) | |||||
Parsed tree with more information on the Haskell package it contains.
Since: 0.1.0.0
Constructors
| Package | |
Fields
| |
Instances
| Show Package | |
| Eq Package | |
| Ord Package | |
Hackage
data CabalFileInfo Source #
How to choose a cabal file for a package from Hackage. This is to work with
Hackage cabal file revisions, which makes PackageIdentifier insufficient
for specifying a package from Hackage.
Since: 0.1.0.0
Constructors
| CFILatest | Take the latest revision of the cabal file available. This isn't reproducible at all, but the running assumption (not necessarily true) is that cabal file revisions do not change semantics of the build. Since: 0.1.0.0 |
| CFIHash !SHA256 !(Maybe FileSize) | Identify by contents of the cabal file itself. Only reason for
Since: 0.1.0.0 |
| CFIRevision !Revision | Identify by revision number, with 0 being the original and
counting upward. This relies on Hackage providing consistent
versioning. Since: 0.1.0.0 |
Instances
| NFData CabalFileInfo | |||||
Defined in Pantry.Types Methods rnf :: CabalFileInfo -> () Source # | |||||
| Generic CabalFileInfo | |||||
Defined in Pantry.Types Associated Types
Methods from :: CabalFileInfo -> Rep CabalFileInfo x Source # to :: Rep CabalFileInfo x -> CabalFileInfo Source # | |||||
| Show CabalFileInfo | |||||
Defined in Pantry.Types | |||||
| Eq CabalFileInfo | |||||
Defined in Pantry.Types Methods (==) :: CabalFileInfo -> CabalFileInfo -> Bool Source # (/=) :: CabalFileInfo -> CabalFileInfo -> Bool Source # | |||||
| Ord CabalFileInfo | |||||
Defined in Pantry.Types Methods compare :: CabalFileInfo -> CabalFileInfo -> Ordering Source # (<) :: CabalFileInfo -> CabalFileInfo -> Bool Source # (<=) :: CabalFileInfo -> CabalFileInfo -> Bool Source # (>) :: CabalFileInfo -> CabalFileInfo -> Bool Source # (>=) :: CabalFileInfo -> CabalFileInfo -> Bool Source # max :: CabalFileInfo -> CabalFileInfo -> CabalFileInfo Source # min :: CabalFileInfo -> CabalFileInfo -> CabalFileInfo Source # | |||||
| Hashable CabalFileInfo | |||||
Defined in Pantry.Types | |||||
| Display CabalFileInfo | |||||
Defined in Pantry.Types Methods display :: CabalFileInfo -> Utf8Builder Source # textDisplay :: CabalFileInfo -> Text Source # | |||||
| type Rep CabalFileInfo | |||||
Defined in Pantry.Types type Rep CabalFileInfo = D1 ('MetaData "CabalFileInfo" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "CFILatest" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CFIHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FileSize))) :+: C1 ('MetaCons "CFIRevision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Revision)))) | |||||
The revision number of a package from Hackage, counting upwards from 0 (the original cabal file).
See caveats on CFIRevision.
Since: 0.1.0.0
Instances
| NFData Revision | |||||
Defined in Pantry.Types | |||||
| Data Revision | |||||
Defined in Pantry.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Revision -> c Revision Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Revision Source # toConstr :: Revision -> Constr Source # dataTypeOf :: Revision -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Revision) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Revision) Source # gmapT :: (forall b. Data b => b -> b) -> Revision -> Revision Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Revision -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Revision -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Revision -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Revision -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Revision -> m Revision Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Revision -> m Revision Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Revision -> m Revision Source # | |||||
| Generic Revision | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show Revision | |||||
| Eq Revision | |||||
| Ord Revision | |||||
Defined in Pantry.Types | |||||
| Hashable Revision | |||||
Defined in Pantry.Types | |||||
| PersistField Revision | |||||
Defined in Pantry.Types Methods toPersistValue :: Revision -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text Revision Source # | |||||
| PersistFieldSql Revision | |||||
| Display Revision | |||||
Defined in Pantry.Types | |||||
| type Rep Revision | |||||
Defined in Pantry.Types | |||||
data PackageIdentifierRevision Source #
A full specification for a package from Hackage, including the package name, version, and how to load up the correct cabal file revision.
Since: 0.1.0.0
Constructors
| PackageIdentifierRevision !PackageName !Version !CabalFileInfo |
Instances
| FromJSON PackageIdentifierRevision | |||||
Defined in Pantry.Types | |||||
| ToJSON PackageIdentifierRevision | |||||
Defined in Pantry.Types Methods toJSON :: PackageIdentifierRevision -> Value Source # toEncoding :: PackageIdentifierRevision -> Encoding Source # toJSONList :: [PackageIdentifierRevision] -> Value Source # toEncodingList :: [PackageIdentifierRevision] -> Encoding Source # | |||||
| NFData PackageIdentifierRevision | |||||
Defined in Pantry.Types Methods rnf :: PackageIdentifierRevision -> () Source # | |||||
| Generic PackageIdentifierRevision | |||||
Defined in Pantry.Types Associated Types
Methods from :: PackageIdentifierRevision -> Rep PackageIdentifierRevision x Source # to :: Rep PackageIdentifierRevision x -> PackageIdentifierRevision Source # | |||||
| Show PackageIdentifierRevision | |||||
Defined in Pantry.Types | |||||
| Eq PackageIdentifierRevision | |||||
Defined in Pantry.Types Methods (==) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source # (/=) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source # | |||||
| Ord PackageIdentifierRevision | |||||
Defined in Pantry.Types Methods compare :: PackageIdentifierRevision -> PackageIdentifierRevision -> Ordering Source # (<) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source # (<=) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source # (>) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source # (>=) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source # max :: PackageIdentifierRevision -> PackageIdentifierRevision -> PackageIdentifierRevision Source # min :: PackageIdentifierRevision -> PackageIdentifierRevision -> PackageIdentifierRevision Source # | |||||
| Display PackageIdentifierRevision | |||||
Defined in Pantry.Types Methods display :: PackageIdentifierRevision -> Utf8Builder Source # | |||||
| type Rep PackageIdentifierRevision | |||||
Defined in Pantry.Types type Rep PackageIdentifierRevision = D1 ('MetaData "PackageIdentifierRevision" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "PackageIdentifierRevision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 PackageName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CabalFileInfo)))) | |||||
data UsePreferredVersions Source #
Should we pay attention to Hackage's preferred versions?
Since: 0.1.0.0
Constructors
| UsePreferredVersions | |
| IgnorePreferredVersions |
Instances
| Show UsePreferredVersions Source # | |
Defined in Pantry.Hackage | |
Archives
data RawArchive Source #
A raw package archive, specified by a user, could have no hash and file size information.
Since: 0.1.0.0
Constructors
| RawArchive | |
Fields
| |
Instances
| NFData RawArchive | |||||
Defined in Pantry.Types Methods rnf :: RawArchive -> () Source # | |||||
| Generic RawArchive | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show RawArchive | |||||
Defined in Pantry.Types | |||||
| Eq RawArchive | |||||
Defined in Pantry.Types Methods (==) :: RawArchive -> RawArchive -> Bool Source # (/=) :: RawArchive -> RawArchive -> Bool Source # | |||||
| Ord RawArchive | |||||
Defined in Pantry.Types Methods compare :: RawArchive -> RawArchive -> Ordering Source # (<) :: RawArchive -> RawArchive -> Bool Source # (<=) :: RawArchive -> RawArchive -> Bool Source # (>) :: RawArchive -> RawArchive -> Bool Source # (>=) :: RawArchive -> RawArchive -> Bool Source # max :: RawArchive -> RawArchive -> RawArchive Source # min :: RawArchive -> RawArchive -> RawArchive Source # | |||||
| type Rep RawArchive | |||||
Defined in Pantry.Types type Rep RawArchive = D1 ('MetaData "RawArchive" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "RawArchive" 'PrefixI 'True) ((S1 ('MetaSel ('Just "raLocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ArchiveLocation) :*: S1 ('MetaSel ('Just "raHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe SHA256))) :*: (S1 ('MetaSel ('Just "raSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FileSize)) :*: S1 ('MetaSel ('Just "raSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) | |||||
A package archive, could be from a URL or a local file path. Local file path archives are assumed to be unchanging over time, and so are allowed in custom snapshots.
Since: 0.1.0.0
Constructors
| Archive | |
Fields
| |
Instances
| NFData Archive | |||||
Defined in Pantry.Types | |||||
| Generic Archive | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show Archive | |||||
| Eq Archive | |||||
| Ord Archive | |||||
| type Rep Archive | |||||
Defined in Pantry.Types type Rep Archive = D1 ('MetaData "Archive" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "Archive" 'PrefixI 'True) ((S1 ('MetaSel ('Just "archiveLocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ArchiveLocation) :*: S1 ('MetaSel ('Just "archiveHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256)) :*: (S1 ('MetaSel ('Just "archiveSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 FileSize) :*: S1 ('MetaSel ('Just "archiveSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) | |||||
data ArchiveLocation Source #
Location that an archive is stored at
Since: 0.1.0.0
Constructors
| ALUrl !Text | Archive stored at an HTTP(S) URL Since: 0.1.0.0 |
| ALFilePath !(ResolvedPath File) | Archive stored at a local file path Since: 0.1.0.0 |
Instances
| NFData ArchiveLocation | |||||
Defined in Pantry.Types Methods rnf :: ArchiveLocation -> () Source # | |||||
| Generic ArchiveLocation | |||||
Defined in Pantry.Types Associated Types
Methods from :: ArchiveLocation -> Rep ArchiveLocation x Source # to :: Rep ArchiveLocation x -> ArchiveLocation Source # | |||||
| Show ArchiveLocation | |||||
Defined in Pantry.Types | |||||
| Eq ArchiveLocation | |||||
Defined in Pantry.Types Methods (==) :: ArchiveLocation -> ArchiveLocation -> Bool Source # (/=) :: ArchiveLocation -> ArchiveLocation -> Bool Source # | |||||
| Ord ArchiveLocation | |||||
Defined in Pantry.Types Methods compare :: ArchiveLocation -> ArchiveLocation -> Ordering Source # (<) :: ArchiveLocation -> ArchiveLocation -> Bool Source # (<=) :: ArchiveLocation -> ArchiveLocation -> Bool Source # (>) :: ArchiveLocation -> ArchiveLocation -> Bool Source # (>=) :: ArchiveLocation -> ArchiveLocation -> Bool Source # max :: ArchiveLocation -> ArchiveLocation -> ArchiveLocation Source # min :: ArchiveLocation -> ArchiveLocation -> ArchiveLocation Source # | |||||
| Display ArchiveLocation | |||||
Defined in Pantry.Types Methods display :: ArchiveLocation -> Utf8Builder Source # textDisplay :: ArchiveLocation -> Text Source # | |||||
| Pretty ArchiveLocation | |||||
Defined in Pantry.Types Methods pretty :: ArchiveLocation -> StyleDoc Source # | |||||
| type Rep ArchiveLocation | |||||
Defined in Pantry.Types type Rep ArchiveLocation = D1 ('MetaData "ArchiveLocation" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "ALUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "ALFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File)))) | |||||
Repos
Information on packages stored in a source control repository.
Since: 0.1.0.0
Constructors
| Repo | |
Fields
| |
Instances
| NFData Repo | |||||
Defined in Pantry.Types | |||||
| Generic Repo | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show Repo | |||||
| Eq Repo | |||||
| Ord Repo | |||||
| Display Repo | |||||
Defined in Pantry.Types | |||||
| type Rep Repo | |||||
Defined in Pantry.Types type Rep Repo = D1 ('MetaData "Repo" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "Repo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "repoUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "repoCommit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "repoType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RepoType) :*: S1 ('MetaSel ('Just "repoSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) | |||||
The type of a source control repository.
Since: 0.1.0.0
Instances
| NFData RepoType | |
Defined in Pantry.Types | |
| Generic RepoType | |
Defined in Pantry.Types | |
| Show RepoType | |
| Eq RepoType | |
| Ord RepoType | |
Defined in Pantry.Types | |
| PersistField RepoType | |
Defined in Pantry.Types Methods toPersistValue :: RepoType -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text RepoType Source # | |
| PersistFieldSql RepoType | |
| type Rep RepoType | |
data SimpleRepo Source #
Repository without subdirectory information.
Since: 0.5.3
Constructors
| SimpleRepo | |
Instances
| Generic SimpleRepo | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show SimpleRepo | |||||
Defined in Pantry.Types | |||||
| Eq SimpleRepo | |||||
Defined in Pantry.Types Methods (==) :: SimpleRepo -> SimpleRepo -> Bool Source # (/=) :: SimpleRepo -> SimpleRepo -> Bool Source # | |||||
| Ord SimpleRepo | |||||
Defined in Pantry.Types Methods compare :: SimpleRepo -> SimpleRepo -> Ordering Source # (<) :: SimpleRepo -> SimpleRepo -> Bool Source # (<=) :: SimpleRepo -> SimpleRepo -> Bool Source # (>) :: SimpleRepo -> SimpleRepo -> Bool Source # (>=) :: SimpleRepo -> SimpleRepo -> Bool Source # max :: SimpleRepo -> SimpleRepo -> SimpleRepo Source # min :: SimpleRepo -> SimpleRepo -> SimpleRepo Source # | |||||
| Display SimpleRepo | |||||
Defined in Pantry.Types | |||||
| type Rep SimpleRepo | |||||
Defined in Pantry.Types type Rep SimpleRepo = D1 ('MetaData "SimpleRepo" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "SimpleRepo" 'PrefixI 'True) (S1 ('MetaSel ('Just "sRepoUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sRepoCommit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sRepoType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RepoType)))) | |||||
withRepo :: (HasLogFunc env, HasProcessContext env) => SimpleRepo -> RIO env a -> RIO env a Source #
Clone the repository (and, in the case of Git and if necessary, fetch the specific commit) and execute the action with the working directory set to the repository root.
Since: 0.1.0.0
fetchRepos :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, PackageMetadata)] -> RIO env () Source #
Fetch the given repositories at once and populate the pantry database.
Since: 0.5.3
fetchReposRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, RawPackageMetadata)] -> RIO env () Source #
Like fetchRepos, except with RawPackageMetadata instead of
PackageMetadata.
Since: 0.5.3
Package location
data RawPackageLocation Source #
Location to load a package from. Can either be immutable (see
PackageLocationImmutable) or a local directory which is expected to change
over time. Raw version doesn't include exact package version (e.g. could
refer to the latest revision on Hackage)
Since: 0.1.0.0
Constructors
| RPLImmutable !RawPackageLocationImmutable | |
| RPLMutable !(ResolvedPath Dir) |
Instances
| ToJSON RawPackageLocation | |||||
Defined in Pantry.Types Methods toJSON :: RawPackageLocation -> Value Source # toEncoding :: RawPackageLocation -> Encoding Source # toJSONList :: [RawPackageLocation] -> Value Source # toEncodingList :: [RawPackageLocation] -> Encoding Source # omitField :: RawPackageLocation -> Bool Source # | |||||
| NFData RawPackageLocation | |||||
Defined in Pantry.Types Methods rnf :: RawPackageLocation -> () Source # | |||||
| Generic RawPackageLocation | |||||
Defined in Pantry.Types Associated Types
Methods from :: RawPackageLocation -> Rep RawPackageLocation x Source # to :: Rep RawPackageLocation x -> RawPackageLocation Source # | |||||
| Show RawPackageLocation | |||||
Defined in Pantry.Types | |||||
| Eq RawPackageLocation | |||||
Defined in Pantry.Types Methods (==) :: RawPackageLocation -> RawPackageLocation -> Bool Source # (/=) :: RawPackageLocation -> RawPackageLocation -> Bool Source # | |||||
| FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) | |||||
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) Source # | |||||
| type Rep RawPackageLocation | |||||
Defined in Pantry.Types type Rep RawPackageLocation = D1 ('MetaData "RawPackageLocation" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "RPLImmutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawPackageLocationImmutable)) :+: C1 ('MetaCons "RPLMutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath Dir)))) | |||||
data PackageLocation Source #
Location to load a package from. Can either be immutable (see
PackageLocationImmutable) or a local directory which is expected to change
over time.
Since: 0.1.0.0
Constructors
| PLImmutable !PackageLocationImmutable | |
| PLMutable !(ResolvedPath Dir) |
Instances
| NFData PackageLocation | |||||
Defined in Pantry.Types Methods rnf :: PackageLocation -> () Source # | |||||
| Generic PackageLocation | |||||
Defined in Pantry.Types Associated Types
Methods from :: PackageLocation -> Rep PackageLocation x Source # to :: Rep PackageLocation x -> PackageLocation Source # | |||||
| Show PackageLocation | |||||
Defined in Pantry.Types | |||||
| Eq PackageLocation | |||||
Defined in Pantry.Types Methods (==) :: PackageLocation -> PackageLocation -> Bool Source # (/=) :: PackageLocation -> PackageLocation -> Bool Source # | |||||
| Display PackageLocation | |||||
Defined in Pantry.Types Methods display :: PackageLocation -> Utf8Builder Source # textDisplay :: PackageLocation -> Text Source # | |||||
| type Rep PackageLocation | |||||
Defined in Pantry.Types type Rep PackageLocation = D1 ('MetaData "PackageLocation" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "PLImmutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageLocationImmutable)) :+: C1 ('MetaCons "PLMutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath Dir)))) | |||||
toRawPL :: PackageLocation -> RawPackageLocation Source #
Convert PackageLocation to its "raw" equivalent
Since: 0.1.0.0
data RawPackageLocationImmutable Source #
Location for remote packages or archives assumed to be immutable. as user specifies it i.e. not an exact location
Since: 0.1.0.0
Constructors
| RPLIHackage !PackageIdentifierRevision !(Maybe TreeKey) | |
| RPLIArchive !RawArchive !RawPackageMetadata | |
| RPLIRepo !Repo !RawPackageMetadata |
Instances
| ToJSON RawPackageLocationImmutable | |||||
Defined in Pantry.Types Methods toJSON :: RawPackageLocationImmutable -> Value Source # toEncoding :: RawPackageLocationImmutable -> Encoding Source # toJSONList :: [RawPackageLocationImmutable] -> Value Source # toEncodingList :: [RawPackageLocationImmutable] -> Encoding Source # | |||||
| NFData RawPackageLocationImmutable | |||||
Defined in Pantry.Types Methods rnf :: RawPackageLocationImmutable -> () Source # | |||||
| Generic RawPackageLocationImmutable | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show RawPackageLocationImmutable | |||||
Defined in Pantry.Types | |||||
| Eq RawPackageLocationImmutable | |||||
Defined in Pantry.Types Methods (==) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source # (/=) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source # | |||||
| Ord RawPackageLocationImmutable | |||||
Defined in Pantry.Types Methods compare :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Ordering Source # (<) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source # (<=) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source # (>) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source # (>=) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source # max :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> RawPackageLocationImmutable Source # min :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> RawPackageLocationImmutable Source # | |||||
| Display RawPackageLocationImmutable | |||||
Defined in Pantry.Types Methods display :: RawPackageLocationImmutable -> Utf8Builder Source # | |||||
| Pretty RawPackageLocationImmutable | |||||
Defined in Pantry.Types Methods | |||||
| FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) | |||||
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) Source # | |||||
| type Rep RawPackageLocationImmutable | |||||
Defined in Pantry.Types type Rep RawPackageLocationImmutable = D1 ('MetaData "RawPackageLocationImmutable" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "RPLIHackage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageIdentifierRevision) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TreeKey))) :+: (C1 ('MetaCons "RPLIArchive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawArchive) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawPackageMetadata)) :+: C1 ('MetaCons "RPLIRepo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Repo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawPackageMetadata)))) | |||||
data PackageLocationImmutable Source #
Location for remote packages or archives assumed to be immutable.
Since: 0.1.0.0
Constructors
| PLIHackage !PackageIdentifier !BlobKey !TreeKey | |
| PLIArchive !Archive !PackageMetadata | |
| PLIRepo !Repo !PackageMetadata |
Instances
| ToJSON PackageLocationImmutable | |||||
Defined in Pantry.Types Methods toJSON :: PackageLocationImmutable -> Value Source # toEncoding :: PackageLocationImmutable -> Encoding Source # toJSONList :: [PackageLocationImmutable] -> Value Source # toEncodingList :: [PackageLocationImmutable] -> Encoding Source # | |||||
| NFData PackageLocationImmutable | |||||
Defined in Pantry.Types Methods rnf :: PackageLocationImmutable -> () Source # | |||||
| Generic PackageLocationImmutable | |||||
Defined in Pantry.Types Associated Types
Methods from :: PackageLocationImmutable -> Rep PackageLocationImmutable x Source # to :: Rep PackageLocationImmutable x -> PackageLocationImmutable Source # | |||||
| Show PackageLocationImmutable | |||||
Defined in Pantry.Types | |||||
| Eq PackageLocationImmutable | |||||
Defined in Pantry.Types Methods (==) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source # (/=) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source # | |||||
| Ord PackageLocationImmutable | |||||
Defined in Pantry.Types Methods compare :: PackageLocationImmutable -> PackageLocationImmutable -> Ordering Source # (<) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source # (<=) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source # (>) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source # (>=) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source # max :: PackageLocationImmutable -> PackageLocationImmutable -> PackageLocationImmutable Source # min :: PackageLocationImmutable -> PackageLocationImmutable -> PackageLocationImmutable Source # | |||||
| Display PackageLocationImmutable | |||||
Defined in Pantry.Types Methods | |||||
| FromJSON (WithJSONWarnings (Unresolved PackageLocationImmutable)) | |||||
Defined in Pantry.Types | |||||
| type Rep PackageLocationImmutable | |||||
Defined in Pantry.Types type Rep PackageLocationImmutable = D1 ('MetaData "PackageLocationImmutable" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "PLIHackage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageIdentifier) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlobKey) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TreeKey))) :+: (C1 ('MetaCons "PLIArchive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Archive) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageMetadata)) :+: C1 ('MetaCons "PLIRepo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Repo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageMetadata)))) | |||||
Snapshots
data RawSnapshotLocation Source #
Where to load a snapshot from in raw form (RSUrl could have a missing BlobKey)
Since: 0.1.0.0
Constructors
| RSLCompiler !WantedCompiler | Don't use an actual snapshot, just a version of the compiler with its shipped packages. Since: 0.1.0.0 |
| RSLUrl !Text !(Maybe BlobKey) | Download the snapshot from the given URL. The optional Since: 0.1.0.0 |
| RSLFilePath !(ResolvedPath File) | Snapshot at a local file path. Since: 0.1.0.0 |
| RSLSynonym !SnapName | Snapshot synonym (LTS/Nightly). Since: 0.5.0.0 |
Instances
| ToJSON RawSnapshotLocation | |||||
Defined in Pantry.Types Methods toJSON :: RawSnapshotLocation -> Value Source # toEncoding :: RawSnapshotLocation -> Encoding Source # toJSONList :: [RawSnapshotLocation] -> Value Source # toEncodingList :: [RawSnapshotLocation] -> Encoding Source # omitField :: RawSnapshotLocation -> Bool Source # | |||||
| NFData RawSnapshotLocation | |||||
Defined in Pantry.Types Methods rnf :: RawSnapshotLocation -> () Source # | |||||
| Generic RawSnapshotLocation | |||||
Defined in Pantry.Types Associated Types
Methods from :: RawSnapshotLocation -> Rep RawSnapshotLocation x Source # to :: Rep RawSnapshotLocation x -> RawSnapshotLocation Source # | |||||
| Show RawSnapshotLocation | |||||
Defined in Pantry.Types | |||||
| Eq RawSnapshotLocation | |||||
Defined in Pantry.Types Methods (==) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source # (/=) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source # | |||||
| Ord RawSnapshotLocation | |||||
Defined in Pantry.Types Methods compare :: RawSnapshotLocation -> RawSnapshotLocation -> Ordering Source # (<) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source # (<=) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source # (>) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source # (>=) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source # max :: RawSnapshotLocation -> RawSnapshotLocation -> RawSnapshotLocation Source # min :: RawSnapshotLocation -> RawSnapshotLocation -> RawSnapshotLocation Source # | |||||
| Display RawSnapshotLocation | |||||
Defined in Pantry.Types Methods | |||||
| Pretty RawSnapshotLocation | |||||
Defined in Pantry.Types Methods pretty :: RawSnapshotLocation -> StyleDoc Source # | |||||
| FromJSON (WithJSONWarnings (Unresolved RawSnapshotLocation)) | |||||
Defined in Pantry.Types | |||||
| type Rep RawSnapshotLocation | |||||
Defined in Pantry.Types type Rep RawSnapshotLocation = D1 ('MetaData "RawSnapshotLocation" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) ((C1 ('MetaCons "RSLCompiler" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WantedCompiler)) :+: C1 ('MetaCons "RSLUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe BlobKey)))) :+: (C1 ('MetaCons "RSLFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File))) :+: C1 ('MetaCons "RSLSynonym" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapName)))) | |||||
data SnapshotLocation Source #
Where to load a snapshot from.
Since: 0.1.0.0
Constructors
| SLCompiler !WantedCompiler | Don't use an actual snapshot, just a version of the compiler with its shipped packages. Since: 0.1.0.0 |
| SLUrl !Text !BlobKey | Download the snapshot from the given URL. The optional
Since: 0.1.0.0 |
| SLFilePath !(ResolvedPath File) | Snapshot at a local file path. Since: 0.1.0.0 |
Instances
| ToJSON SnapshotLocation | |||||
Defined in Pantry.Types Methods toJSON :: SnapshotLocation -> Value Source # toEncoding :: SnapshotLocation -> Encoding Source # toJSONList :: [SnapshotLocation] -> Value Source # toEncodingList :: [SnapshotLocation] -> Encoding Source # omitField :: SnapshotLocation -> Bool Source # | |||||
| NFData SnapshotLocation | |||||
Defined in Pantry.Types Methods rnf :: SnapshotLocation -> () Source # | |||||
| Generic SnapshotLocation | |||||
Defined in Pantry.Types Associated Types
Methods from :: SnapshotLocation -> Rep SnapshotLocation x Source # to :: Rep SnapshotLocation x -> SnapshotLocation Source # | |||||
| Show SnapshotLocation | |||||
Defined in Pantry.Types | |||||
| Eq SnapshotLocation | |||||
Defined in Pantry.Types Methods (==) :: SnapshotLocation -> SnapshotLocation -> Bool Source # (/=) :: SnapshotLocation -> SnapshotLocation -> Bool Source # | |||||
| Ord SnapshotLocation | |||||
Defined in Pantry.Types Methods compare :: SnapshotLocation -> SnapshotLocation -> Ordering Source # (<) :: SnapshotLocation -> SnapshotLocation -> Bool Source # (<=) :: SnapshotLocation -> SnapshotLocation -> Bool Source # (>) :: SnapshotLocation -> SnapshotLocation -> Bool Source # (>=) :: SnapshotLocation -> SnapshotLocation -> Bool Source # max :: SnapshotLocation -> SnapshotLocation -> SnapshotLocation Source # min :: SnapshotLocation -> SnapshotLocation -> SnapshotLocation Source # | |||||
| Display SnapshotLocation | |||||
Defined in Pantry.Types Methods display :: SnapshotLocation -> Utf8Builder Source # textDisplay :: SnapshotLocation -> Text Source # | |||||
| FromJSON (WithJSONWarnings (Unresolved SnapshotLocation)) | |||||
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved SnapshotLocation)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved SnapshotLocation)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved SnapshotLocation)) Source # | |||||
| type Rep SnapshotLocation | |||||
Defined in Pantry.Types type Rep SnapshotLocation = D1 ('MetaData "SnapshotLocation" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "SLCompiler" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WantedCompiler)) :+: (C1 ('MetaCons "SLUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlobKey)) :+: C1 ('MetaCons "SLFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File))))) | |||||
toRawSL :: SnapshotLocation -> RawSnapshotLocation Source #
Convert snapshot location to its "raw" equivalent.
Since: 0.1.0.0
data RawSnapshot Source #
A flattened representation of all the layers in a snapshot.
Since: 0.1.0.0
Constructors
| RawSnapshot | |
Fields
| |
A flattened representation of all the layers in a snapshot.
Since: 0.1.0.0
Constructors
| Snapshot | |
Fields
| |
data RawSnapshotPackage Source #
Settings for a package found in a snapshot.
Since: 0.1.0.0
Constructors
| RawSnapshotPackage | |
Fields
| |
data SnapshotPackage Source #
Settings for a package found in a snapshot.
Since: 0.1.0.0
Constructors
| SnapshotPackage | |
Fields
| |
Instances
| Show SnapshotPackage | |
Defined in Pantry.Types | |
data RawSnapshotLayer Source #
A single layer of a snapshot, i.e. a specific YAML configuration file.
Since: 0.1.0.0
Constructors
| RawSnapshotLayer | |
Fields
| |
Instances
| ToJSON RawSnapshotLayer | |||||
Defined in Pantry.Types Methods toJSON :: RawSnapshotLayer -> Value Source # toEncoding :: RawSnapshotLayer -> Encoding Source # toJSONList :: [RawSnapshotLayer] -> Value Source # toEncodingList :: [RawSnapshotLayer] -> Encoding Source # omitField :: RawSnapshotLayer -> Bool Source # | |||||
| NFData RawSnapshotLayer | |||||
Defined in Pantry.Types Methods rnf :: RawSnapshotLayer -> () Source # | |||||
| Generic RawSnapshotLayer | |||||
Defined in Pantry.Types Associated Types
Methods from :: RawSnapshotLayer -> Rep RawSnapshotLayer x Source # to :: Rep RawSnapshotLayer x -> RawSnapshotLayer Source # | |||||
| Show RawSnapshotLayer | |||||
Defined in Pantry.Types | |||||
| Eq RawSnapshotLayer | |||||
Defined in Pantry.Types Methods (==) :: RawSnapshotLayer -> RawSnapshotLayer -> Bool Source # (/=) :: RawSnapshotLayer -> RawSnapshotLayer -> Bool Source # | |||||
| FromJSON (WithJSONWarnings (Unresolved RawSnapshotLayer)) | |||||
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved RawSnapshotLayer)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved RawSnapshotLayer)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved RawSnapshotLayer)) Source # | |||||
| type Rep RawSnapshotLayer | |||||
Defined in Pantry.Types type Rep RawSnapshotLayer = D1 ('MetaData "RawSnapshotLayer" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "RawSnapshotLayer" 'PrefixI 'True) (((S1 ('MetaSel ('Just "rslParent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawSnapshotLocation) :*: S1 ('MetaSel ('Just "rslCompiler") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe WantedCompiler))) :*: (S1 ('MetaSel ('Just "rslLocations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [RawPackageLocationImmutable]) :*: S1 ('MetaSel ('Just "rslDropPackages") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set PackageName)))) :*: ((S1 ('MetaSel ('Just "rslFlags") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName (Map FlagName Bool))) :*: S1 ('MetaSel ('Just "rslHidden") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName Bool))) :*: (S1 ('MetaSel ('Just "rslGhcOptions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName [Text])) :*: S1 ('MetaSel ('Just "rslPublishTime") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe UTCTime)))))) | |||||
data SnapshotLayer Source #
A single layer of a snapshot, i.e. a specific YAML configuration file.
Since: 0.1.0.0
Constructors
| SnapshotLayer | |
Fields
| |
Instances
| ToJSON SnapshotLayer | |||||
Defined in Pantry.Types Methods toJSON :: SnapshotLayer -> Value Source # toEncoding :: SnapshotLayer -> Encoding Source # toJSONList :: [SnapshotLayer] -> Value Source # toEncodingList :: [SnapshotLayer] -> Encoding Source # omitField :: SnapshotLayer -> Bool Source # | |||||
| Generic SnapshotLayer | |||||
Defined in Pantry.Types Associated Types
Methods from :: SnapshotLayer -> Rep SnapshotLayer x Source # to :: Rep SnapshotLayer x -> SnapshotLayer Source # | |||||
| Show SnapshotLayer | |||||
Defined in Pantry.Types | |||||
| Eq SnapshotLayer | |||||
Defined in Pantry.Types Methods (==) :: SnapshotLayer -> SnapshotLayer -> Bool Source # (/=) :: SnapshotLayer -> SnapshotLayer -> Bool Source # | |||||
| type Rep SnapshotLayer | |||||
Defined in Pantry.Types type Rep SnapshotLayer = D1 ('MetaData "SnapshotLayer" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "SnapshotLayer" 'PrefixI 'True) (((S1 ('MetaSel ('Just "slParent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapshotLocation) :*: S1 ('MetaSel ('Just "slCompiler") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe WantedCompiler))) :*: (S1 ('MetaSel ('Just "slLocations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [PackageLocationImmutable]) :*: S1 ('MetaSel ('Just "slDropPackages") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set PackageName)))) :*: ((S1 ('MetaSel ('Just "slFlags") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName (Map FlagName Bool))) :*: S1 ('MetaSel ('Just "slHidden") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName Bool))) :*: (S1 ('MetaSel ('Just "slGhcOptions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName [Text])) :*: S1 ('MetaSel ('Just "slPublishTime") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe UTCTime)))))) | |||||
toRawSnapshotLayer :: SnapshotLayer -> RawSnapshotLayer Source #
Convert snapshot layer into its "raw" equivalent.
Since: 0.1.0.0
data WantedCompiler Source #
Which compiler a snapshot wants to use. The build tool may elect to do some fuzzy matching of versions (e.g., allowing different patch versions).
Since: 0.1.0.0
Constructors
| WCGhc !Version | |
| WCGhcGit !Text !Text | |
| WCGhcjs !Version !Version | GHCJS version followed by GHC version |
Instances
| FromJSON WantedCompiler | |||||
Defined in Pantry.Types Methods parseJSON :: Value -> Parser WantedCompiler Source # parseJSONList :: Value -> Parser [WantedCompiler] Source # | |||||
| FromJSONKey WantedCompiler | |||||
Defined in Pantry.Types | |||||
| ToJSON WantedCompiler | |||||
Defined in Pantry.Types Methods toJSON :: WantedCompiler -> Value Source # toEncoding :: WantedCompiler -> Encoding Source # toJSONList :: [WantedCompiler] -> Value Source # toEncodingList :: [WantedCompiler] -> Encoding Source # omitField :: WantedCompiler -> Bool Source # | |||||
| NFData WantedCompiler | |||||
Defined in Pantry.Types Methods rnf :: WantedCompiler -> () Source # | |||||
| Generic WantedCompiler | |||||
Defined in Pantry.Types Associated Types
Methods from :: WantedCompiler -> Rep WantedCompiler x Source # to :: Rep WantedCompiler x -> WantedCompiler Source # | |||||
| Show WantedCompiler | |||||
Defined in Pantry.Types | |||||
| Eq WantedCompiler | |||||
Defined in Pantry.Types Methods (==) :: WantedCompiler -> WantedCompiler -> Bool Source # (/=) :: WantedCompiler -> WantedCompiler -> Bool Source # | |||||
| Ord WantedCompiler | |||||
Defined in Pantry.Types Methods compare :: WantedCompiler -> WantedCompiler -> Ordering Source # (<) :: WantedCompiler -> WantedCompiler -> Bool Source # (<=) :: WantedCompiler -> WantedCompiler -> Bool Source # (>) :: WantedCompiler -> WantedCompiler -> Bool Source # (>=) :: WantedCompiler -> WantedCompiler -> Bool Source # max :: WantedCompiler -> WantedCompiler -> WantedCompiler Source # min :: WantedCompiler -> WantedCompiler -> WantedCompiler Source # | |||||
| Display WantedCompiler | |||||
Defined in Pantry.Types Methods display :: WantedCompiler -> Utf8Builder Source # textDisplay :: WantedCompiler -> Text Source # | |||||
| type Rep WantedCompiler | |||||
Defined in Pantry.Types type Rep WantedCompiler = D1 ('MetaData "WantedCompiler" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "WCGhc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version)) :+: (C1 ('MetaCons "WCGhcGit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "WCGhcjs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version)))) | |||||
A snapshot synonym. It is expanded according to the field
snapshotLocation of a PantryConfig.
@ since 0.5.0.0
Constructors
| LTS | |
| Nightly !Day | Stackage Nightly snapshot, displayed as Since: 0.5.0.0 |
Instances
| ToJSON SnapName | |||||
| NFData SnapName | |||||
Defined in Pantry.Types | |||||
| Generic SnapName | |||||
Defined in Pantry.Types Associated Types
| |||||
| Show SnapName | |||||
| Eq SnapName | |||||
| Ord SnapName | |||||
Defined in Pantry.Types | |||||
| Display SnapName | |||||
Defined in Pantry.Types | |||||
| type Rep SnapName | |||||
Defined in Pantry.Types type Rep SnapName = D1 ('MetaData "SnapName" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "LTS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)) :+: C1 ('MetaCons "Nightly" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Day))) | |||||
snapshotLocation :: HasPantryConfig env => SnapName -> RIO env RawSnapshotLocation Source #
Get the location of a snapshot synonym from the PantryConfig.
Since: 0.5.0.0
Global hints
data GlobalHintsLocation Source #
Where to load global hints from.
Since: 0.9.4
Constructors
| GHLUrl !Text | Download the global hints from the given URL. |
| GHLFilePath !(ResolvedPath File) | Global hints at a local file path. |
Instances
| ToJSON GlobalHintsLocation | |||||
Defined in Pantry.Types Methods toJSON :: GlobalHintsLocation -> Value Source # toEncoding :: GlobalHintsLocation -> Encoding Source # toJSONList :: [GlobalHintsLocation] -> Value Source # toEncodingList :: [GlobalHintsLocation] -> Encoding Source # omitField :: GlobalHintsLocation -> Bool Source # | |||||
| NFData GlobalHintsLocation | |||||
Defined in Pantry.Types Methods rnf :: GlobalHintsLocation -> () Source # | |||||
| Generic GlobalHintsLocation | |||||
Defined in Pantry.Types Associated Types
Methods from :: GlobalHintsLocation -> Rep GlobalHintsLocation x Source # to :: Rep GlobalHintsLocation x -> GlobalHintsLocation Source # | |||||
| Show GlobalHintsLocation | |||||
Defined in Pantry.Types | |||||
| Eq GlobalHintsLocation | |||||
Defined in Pantry.Types Methods (==) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source # (/=) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source # | |||||
| Ord GlobalHintsLocation | |||||
Defined in Pantry.Types Methods compare :: GlobalHintsLocation -> GlobalHintsLocation -> Ordering Source # (<) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source # (<=) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source # (>) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source # (>=) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source # max :: GlobalHintsLocation -> GlobalHintsLocation -> GlobalHintsLocation Source # min :: GlobalHintsLocation -> GlobalHintsLocation -> GlobalHintsLocation Source # | |||||
| Display GlobalHintsLocation | |||||
Defined in Pantry.Types Methods | |||||
| Pretty GlobalHintsLocation | |||||
Defined in Pantry.Types Methods pretty :: GlobalHintsLocation -> StyleDoc Source # | |||||
| FromJSON (WithJSONWarnings (Unresolved GlobalHintsLocation)) | |||||
Defined in Pantry.Types | |||||
| type Rep GlobalHintsLocation | |||||
Defined in Pantry.Types type Rep GlobalHintsLocation = D1 ('MetaData "GlobalHintsLocation" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "GHLUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "GHLFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File)))) | |||||
Loading values
Arguments
| :: MonadIO m | |
| => Maybe (Path Abs Dir) | directory to use for relative paths |
| -> Unresolved a | |
| -> m a |
Resolve all of the file paths in an Unresolved relative to the given
directory.
Since: 0.1.0.0
loadPackageRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env Package Source #
Load a Package from a RawPackageLocationImmutable.
Load the package either from the local DB, Casa, or as a last resort, the third party (hackage, archive or repo).
Since: 0.1.0.0
tryLoadPackageRawViaCasa :: (HasLogFunc env, HasPantryConfig env, HasProcessContext env) => RawPackageLocationImmutable -> TreeKey -> RIO env (Maybe Package) Source #
Maybe load the package from Casa.
loadPackage :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env Package Source #
Load a Package from a PackageLocationImmutable.
Since: 0.1.0.0
loadRawSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env (Either WantedCompiler (RawSnapshotLayer, CompletedSL)) Source #
Parse a SnapshotLayer value from a SnapshotLocation.
Returns a Left value if provided an SLCompiler constructor. Otherwise,
returns a Right value providing both the Snapshot and a hash of the input
configuration file.
Since: 0.1.0.0
loadSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => SnapshotLocation -> RIO env (Either WantedCompiler RawSnapshotLayer) Source #
Parse a SnapshotLayer value from a SnapshotLocation.
Returns a Left value if provided an SLCompiler constructor. Otherwise,
returns a Right value providing both the Snapshot and a hash of the input
configuration file.
Since: 0.1.0.0
loadSnapshot :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => SnapshotLocation -> RIO env RawSnapshot Source #
Parse a RawSnapshot (all layers) from a SnapshotLocation.
Since: 0.1.0.0
loadAndCompleteSnapshot Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => SnapshotLocation | |
| -> Map RawSnapshotLocation SnapshotLocation | Cached snapshot locations from lock file |
| -> Map RawPackageLocationImmutable PackageLocationImmutable | Cached locations from lock file |
| -> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) |
Parse a Snapshot (all layers) from a SnapshotLocation noting any
incomplete package locations. Debug output will include the raw snapshot
layer.
Since: 0.1.0.0
loadAndCompleteSnapshot' Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Bool | Debug output includes the raw snapshot layer |
| -> SnapshotLocation | |
| -> Map RawSnapshotLocation SnapshotLocation | Cached snapshot locations from lock file |
| -> Map RawPackageLocationImmutable PackageLocationImmutable | Cached locations from lock file |
| -> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) |
As for loadAndCompleteSnapshot but allows toggling of the debug output of
the raw snapshot layer.
Since: 0.5.7
loadAndCompleteSnapshotRaw Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => RawSnapshotLocation | |
| -> Map RawSnapshotLocation SnapshotLocation | Cached snapshot locations from lock file |
| -> Map RawPackageLocationImmutable PackageLocationImmutable | Cached locations from lock file |
| -> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) |
Parse a Snapshot (all layers) from a RawSnapshotLocation completing
any incomplete package locations. Debug output will include the raw snapshot
layer.
Since: 0.1.0.0
loadAndCompleteSnapshotRaw' Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Bool | Debug output includes the raw snapshot layer |
| -> RawSnapshotLocation | |
| -> Map RawSnapshotLocation SnapshotLocation | Cached snapshot locations from lock file |
| -> Map RawPackageLocationImmutable PackageLocationImmutable | Cached locations from lock file |
| -> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) |
As for loadAndCompleteSnapshotRaw but allows toggling of the debug output
of the raw snapshot layer.
Since: 0.5.7
data CompletedSL Source #
A completed snapshot location, including the original raw and completed information.
Since: 0.1.0.0
Constructors
| CompletedSL !RawSnapshotLocation !SnapshotLocation |
data CompletedPLI Source #
A completed package location, including the original raw and completed information.
Since: 0.1.0.0
Constructors
| CompletedPLI !RawPackageLocationImmutable !PackageLocationImmutable |
addPackagesToSnapshot Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Utf8Builder | Text description of where these new packages are coming from, for error messages only |
| -> [RawPackageLocationImmutable] | new packages |
| -> AddPackagesConfig | |
| -> Map PackageName RawSnapshotPackage | packages from parent |
| -> RIO env (Map PackageName RawSnapshotPackage, AddPackagesConfig) |
Add more packages to a snapshot
Note that any settings on a parent flag which is being replaced will be
ignored. For example, if package foo is in the parent and has flag bar
set, and foo also appears in new packages, then bar will no longer be
set.
Returns any of the AddPackagesConfig values not used.
Since: 0.1.0.0
data AddPackagesConfig Source #
Package settings to be passed to addPackagesToSnapshot.
Since: 0.1.0.0
Constructors
| AddPackagesConfig | |
Fields
| |
Completion functions
data CompletePackageLocation Source #
Complete package location, plus whether the package has a cabal file. This is relevant to reproducibility, see https://tech.fpcomplete.com/blog/storing-generated-cabal-files
Since: 0.4.0.0
Constructors
| CompletePackageLocation | |
Fields | |
completePackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env CompletePackageLocation Source #
Fill in optional fields in a PackageLocationImmutable for more reproducible builds.
Since: 0.1.0.0
completeSnapshotLocation :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env SnapshotLocation Source #
Add in hashes to make a SnapshotLocation reproducible.
Since: 0.1.0.0
warnMissingCabalFile :: HasLogFunc env => RawPackageLocationImmutable -> RIO env () Source #
Warn if the package uses PCHpack.
Since: 0.4.0.0
Parsers
parseWantedCompiler :: Text -> Either PantryException WantedCompiler Source #
Parse a Text into a WantedCompiler value.
Since: 0.1.0.0
parseSnapName :: MonadThrow m => Text -> m SnapName Source #
Parse the short representation of a SnapName.
Since: 0.5.0.0
parseRawSnapshotLocation :: Text -> Unresolved RawSnapshotLocation Source #
Parse a Text into an Unresolved RawSnapshotLocation.
Since: 0.1.0.0
parsePackageIdentifierRevision :: Text -> Either PantryException PackageIdentifierRevision Source #
Parse a PackageIdentifierRevision
Since: 0.1.0.0
parseRawPackageLocationImmutables Source #
Arguments
| :: Text | A YAML value. |
| -> Either PantryException (Unresolved (NonEmpty RawPackageLocationImmutable)) |
Parse, Unresolved, one or more RawPackageLocationImmutable from a valid
YAML value. Alternatively, yields an exception if the given text cannot be
decoded as a YAML value or it is decoded but with warnings.
Since: 0.10.1
parseHackageText :: Text -> Either PantryException (PackageIdentifier, BlobKey) Source #
Parse a hackage text.
Since: 0.1.0.0
Cabal values
parsePackageIdentifier :: String -> Maybe PackageIdentifier Source #
This is almost a copy of Cabal's parser for package identifiers, the main difference is in the fact that Stack requires version to be present while Cabal uses "null version" as a default value
Since: 0.1.0.0
parsePackageName :: String -> Maybe PackageName Source #
Parse a package name from a String.
Since: 0.1.0.0
parsePackageNameThrowing :: MonadThrow m => String -> m PackageName Source #
Parse a package name from a String throwing on failure
Since: 0.1.0.0
parseVersionThrowing :: MonadThrow m => String -> m Version Source #
Parse a package version from a String throwing on failure
Since: 0.1.0.0
Cabal helpers
packageIdentifierString :: PackageIdentifier -> String Source #
Render a package identifier as a String.
Since: 0.1.0.0
packageNameString :: PackageName -> String Source #
Render a package name as a String.
Since: 0.1.0.0
moduleNameString :: ModuleName -> String Source #
Render a module name as a String.
Since: 0.1.0.0
newtype CabalString a Source #
Newtype wrapper for easier JSON integration with Cabal types.
Since: 0.1.0.0
Constructors
| CabalString | |
Fields
| |
Instances
| IsCabalString a => FromJSON (CabalString a) | |
Defined in Pantry.Types Methods parseJSON :: Value -> Parser (CabalString a) Source # parseJSONList :: Value -> Parser [CabalString a] Source # omittedField :: Maybe (CabalString a) Source # | |
| IsCabalString a => FromJSONKey (CabalString a) | |
Defined in Pantry.Types Methods fromJSONKey :: FromJSONKeyFunction (CabalString a) Source # fromJSONKeyList :: FromJSONKeyFunction [CabalString a] Source # | |
| Pretty a => ToJSON (CabalString a) | |
Defined in Pantry.Types Methods toJSON :: CabalString a -> Value Source # toEncoding :: CabalString a -> Encoding Source # toJSONList :: [CabalString a] -> Value Source # toEncodingList :: [CabalString a] -> Encoding Source # omitField :: CabalString a -> Bool Source # | |
| Pretty a => ToJSONKey (CabalString a) | |
Defined in Pantry.Types Methods toJSONKey :: ToJSONKeyFunction (CabalString a) Source # | |
| Show a => Show (CabalString a) | |
Defined in Pantry.Types | |
| Eq a => Eq (CabalString a) | |
Defined in Pantry.Types Methods (==) :: CabalString a -> CabalString a -> Bool Source # (/=) :: CabalString a -> CabalString a -> Bool Source # | |
| Ord a => Ord (CabalString a) | |
Defined in Pantry.Types Methods compare :: CabalString a -> CabalString a -> Ordering Source # (<) :: CabalString a -> CabalString a -> Bool Source # (<=) :: CabalString a -> CabalString a -> Bool Source # (>) :: CabalString a -> CabalString a -> Bool Source # (>=) :: CabalString a -> CabalString a -> Bool Source # max :: CabalString a -> CabalString a -> CabalString a Source # min :: CabalString a -> CabalString a -> CabalString a Source # | |
toCabalStringMap :: Map a v -> Map (CabalString a) v Source #
Wrap the keys in a Map with a CabalString to get a ToJSON
instance.
Since: 0.1.0.0
unCabalStringMap :: Map (CabalString a) v -> Map a v Source #
Unwrap the CabalString from the keys in a Map to use a
FromJSON instance.
Since: 0.1.0.0
gpdPackageIdentifier :: GenericPackageDescription -> PackageIdentifier Source #
Get the PackageIdentifier from a GenericPackageDescription.
Since: 0.1.0.0
gpdPackageName :: GenericPackageDescription -> PackageName Source #
Get the PackageName from a GenericPackageDescription.
Since: 0.1.0.0
gpdVersion :: GenericPackageDescription -> Version Source #
Get the Version from a GenericPackageDescription.
Since: 0.1.0.0
Package location
fetchPackages :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env, Foldable f) => f PackageLocationImmutable -> RIO env () Source #
Download all of the packages provided into the local cache without performing any unpacking. Can be useful for build tools wanting to prefetch or provide an offline mode.
Since: 0.1.0.0
unpackPackageLocationRaw Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Path Abs Dir | unpack directory |
| -> RawPackageLocationImmutable | |
| -> RIO env () |
Unpack a given RawPackageLocationImmutable into the given directory. Does
not generate any extra subdirectories.
Since: 0.1.0.0
unpackPackageLocation Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Path Abs Dir | unpack directory |
| -> PackageLocationImmutable | |
| -> RIO env () |
Unpack a given PackageLocationImmutable into the given directory. Does
not generate any extra subdirectories.
Since: 0.1.0.0
getPackageLocationName :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageName Source #
Get the PackageName of the package at the given location.
Since: 0.1.0.0
getRawPackageLocationIdent :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageIdentifier Source #
Get the PackageIdentifier of the package at the given location.
Since: 0.1.0.0
packageLocationIdent :: PackageLocationImmutable -> PackageIdentifier Source #
Get the PackageIdentifier of the package at the given location.
Since: 0.1.0.0
packageLocationVersion :: PackageLocationImmutable -> Version Source #
Get version of the package at the given location.
Since: 0.1.0.0
getRawPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env TreeKey Source #
Get the TreeKey of the package at the given location.
Since: 0.1.0.0
getPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env TreeKey Source #
Get the TreeKey of the package at the given location.
Since: 0.1.0.0
Cabal files
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Maybe Text | The program name used by Hpack (the library), defaults to "hpack". |
| -> RawPackageLocation | |
| -> RIO env GenericPackageDescription |
Same as loadCabalFileRawImmutable, but takes a RawPackageLocation.
Never prints warnings, see loadCabalFilePath for that.
Since: 0.8.0
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Maybe Text | The program name used by Hpack (the library), defaults to "hpack". |
| -> PackageLocation | |
| -> RIO env GenericPackageDescription |
Same as loadCabalFileImmutable, but takes a PackageLocation. Never
prints warnings, see loadCabalFilePath for that.
Since: 0.8.0
loadCabalFileRawImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env GenericPackageDescription Source #
Load the cabal file for the given RawPackageLocationImmutable.
This function ignores all warnings.
Note that, for now, this will not allow support for hpack files in these
package locations. Instead, all PackageLocationImmutables will require a
.cabal file. This may be relaxed in the future.
Since: 0.1.0.0
loadCabalFileImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env GenericPackageDescription Source #
Load the cabal file for the given PackageLocationImmutable.
This function ignores all warnings.
Since: 0.1.0.0
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Maybe Text | The program name used by Hpack (the library), defaults to "hpack". |
| -> Path Abs Dir | project directory, with a cabal file or hpack file |
| -> RIO env (PrintWarnings -> IO GenericPackageDescription, PackageName, Path Abs File) |
Parse the Cabal file for the package inside the given directory. Performs various sanity checks, such as the file name being correct and having only a single Cabal file.
Since: 0.8.0
findOrGenerateCabalFile Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => Maybe Text | The program name used by Hpack (the library), defaults to "hpack". |
| -> Path Abs Dir | package directory |
| -> RIO env (PackageName, Path Abs File) |
Get the file name for the Cabal file in the given directory.
If no Cabal file is present, or more than one is present, an exception is
thrown via throwM.
If the directory contains a file named package.yaml, Hpack is used to generate a Cabal file from it.
Since: 0.8.0
data PrintWarnings Source #
Should we print warnings when loading a cabal file?
Since: 0.1.0.0
Constructors
| YesPrintWarnings | |
| NoPrintWarnings |
Hackage index
Arguments
| :: (HasPantryConfig env, HasLogFunc env) | |
| => Maybe Utf8Builder | reason for updating, if any |
| -> RIO env DidUpdateOccur |
Download the most recent 01-index.tar file from Hackage and update the database tables.
This function will only perform an update once per PantryConfig for user
sanity. See the return value to find out if it happened.
Since: 0.1.0.0
data DidUpdateOccur Source #
Did an update occur when running updateHackageIndex?
Since: 0.1.0.0
Constructors
| UpdateOccurred | |
| NoUpdateOccurred |
data RequireHackageIndex Source #
Require that the Hackage index is populated.
Since: 0.1.0.0
Constructors
| YesRequireHackageIndex | If there is nothing in the Hackage index, then perform an update |
| NoRequireHackageIndex | Do not perform an update |
Instances
| Show RequireHackageIndex Source # | |
Defined in Pantry.Hackage | |
hackageIndexTarballL :: HasPantryConfig env => SimpleGetter env (Path Abs File) Source #
Where does pantry download its 01-index.tar file from Hackage?
Since: 0.1.0.0
getHackagePackageVersions Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env) | |
| => RequireHackageIndex | |
| -> UsePreferredVersions | |
| -> PackageName | package name |
| -> RIO env (Map Version (Map Revision BlobKey)) |
Returns the versions of the package available on Hackage.
Since: 0.1.0.0
getLatestHackageVersion Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env) | |
| => RequireHackageIndex | |
| -> PackageName | package name |
| -> UsePreferredVersions | |
| -> RIO env (Maybe PackageIdentifierRevision) |
Returns the latest version of the given package available from Hackage.
Since: 0.1.0.0
getLatestHackageLocation Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => RequireHackageIndex | |
| -> PackageName | package name |
| -> UsePreferredVersions | |
| -> RIO env (Maybe PackageLocationImmutable) |
Returns location of the latest version of the given package available from Hackage.
Since: 0.1.0.0
getLatestHackageRevision Source #
Arguments
| :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
| => RequireHackageIndex | |
| -> PackageName | package name |
| -> Version | |
| -> RIO env (Maybe (Revision, BlobKey, TreeKey)) |
Returns the latest revision of the given package version available from Hackage.
Since: 0.1.0.0
getHackageTypoCorrections :: (HasPantryConfig env, HasLogFunc env) => PackageName -> RIO env [PackageName] Source #
Try to come up with typo corrections for given package identifier using Hackage package names. This can provide more user-friendly information in error messages.
Since: 0.1.0.0
loadGlobalHints :: (HasTerm env, HasPantryConfig env) => WantedCompiler -> RIO env (Maybe (Map PackageName Version)) Source #
Load the global hints.
Since: 9.4.0
partitionReplacedDependencies Source #
Arguments
| :: Ord id | |
| => Map PackageName a | global packages |
| -> (a -> PackageName) | package name getter |
| -> (a -> id) | returns unique package id used for dependency pruning |
| -> (a -> [id]) | returns unique package ids of direct package dependencies |
| -> Set PackageName | overrides which global dependencies should get pruned |
| -> (Map PackageName [PackageName], Map PackageName a) |
Partition a map of global packages with its versions into a Set of replaced packages and its dependencies and a map of remaining (untouched) packages.
Since: 0.1.0.0
Snapshot cache
newtype SnapshotCacheHash Source #
An arbitrary hash for a snapshot, used for finding module names in a snapshot. Mostly intended for Stack's usage.
Since: 0.1.0.0
Constructors
| SnapshotCacheHash | |
Fields | |
Instances
| Show SnapshotCacheHash | |
Defined in Pantry.Types | |
withSnapshotCache :: (HasPantryConfig env, HasLogFunc env) => SnapshotCacheHash -> RIO env (Map PackageName (Set ModuleName)) -> ((ModuleName -> RIO env [PackageName]) -> RIO env a) -> RIO env a Source #
Use a snapshot cache, which caches which modules are in which packages in a given snapshot. This is mostly intended for usage by Stack.
Since: 0.1.0.0