pantry-0.10.1: Content addressable Haskell package management

Safe Haskell | None
Language | Haskell2010

Pantry.Types

Synopsis

- data PantryConfig = PantryConfig {
  - pcPackageIndex :: !PackageIndexConfig
  - pcHpackExecutable :: !HpackExecutable
  - pcHpackForce :: !Force
  - pcRootDir :: !(Path Abs Dir)
  - pcStorage :: !Storage
  - pcUpdateRef :: !(MVar Bool)
  - pcParsedCabalFilesRawImmutable :: !(IORef (Map RawPackageLocationImmutable GenericPackageDescription))
  - pcParsedCabalFilesMutable :: !(IORef (Map (Path Abs Dir) (PrintWarnings -> IO GenericPackageDescription, PackageName, Path Abs File)))
  - pcConnectionCount :: !Int
  - pcCasaConfig :: !(Maybe (CasaRepoPrefix, Int))
  - pcSnapshotLocation :: SnapName -> RawSnapshotLocation
  - pcGlobalHintsLocation :: WantedCompiler -> GlobalHintsLocation
  }
- data PackageIndexConfig = PackageIndexConfig {
  - picDownloadPrefix :: !Text
  - picHackageSecurityConfig :: !HackageSecurityConfig
  }
- data HackageSecurityConfig = HackageSecurityConfig {
  - hscKeyIds :: ![Text]
  - hscKeyThreshold :: !Int
  - hscIgnoreExpiry :: !Bool
  }
- defaultHackageSecurityConfig :: HackageSecurityConfig
- data Storage = Storage {
  - withStorage_ :: forall env a. HasLogFunc env => ReaderT SqlBackend (RIO env) a -> RIO env a
  - withWriteLock_ :: forall env a. HasLogFunc env => RIO env a -> RIO env a
  }
- class HasPantryConfig env where
  - pantryConfigL :: Lens' env PantryConfig
- data BlobKey = BlobKey !SHA256 !FileSize
- data PackageName
- data Version
- data PackageIdentifier = PackageIdentifier {
  - pkgName :: PackageName
  - pkgVersion :: Version
  }
- newtype Revision = Revision Word
- data ModuleName
- data CabalFileInfo
  - = CFILatest
  - | CFIHash !SHA256 !(Maybe FileSize)
  - | CFIRevision !Revision
- data PrintWarnings
  - = YesPrintWarnings
  - | NoPrintWarnings
- newtype PackageNameP = PackageNameP {
  - unPackageNameP :: PackageName
  }
- newtype VersionP = VersionP {
  - unVersionP :: Version
  }
- newtype ModuleNameP = ModuleNameP {
  - unModuleNameP :: ModuleName
  }
- data PackageIdentifierRevision = PackageIdentifierRevision !PackageName !Version !CabalFileInfo
- pirForHash :: PackageIdentifier -> BlobKey -> PackageIdentifierRevision
- data FileType
  - = FTNormal
  - | FTExecutable
- data BuildFile
  - = BFCabal !SafeFilePath !TreeEntry
  - | BFHpack !TreeEntry
- newtype FileSize = FileSize Word
- data TreeEntry = TreeEntry {
  - teBlob :: !BlobKey
  - teType :: !FileType
  }
- data SafeFilePath
- unSafeFilePath :: SafeFilePath -> Text
- mkSafeFilePath :: Text -> Maybe SafeFilePath
- safeFilePathToPath :: MonadThrow m => Path Abs Dir -> SafeFilePath -> m (Path Abs File)
- hpackSafeFilePath :: SafeFilePath
- newtype TreeKey = TreeKey BlobKey
- newtype Tree = TreeMap (Map SafeFilePath TreeEntry)
- renderTree :: Tree -> ByteString
- parseTree :: ByteString -> Maybe Tree
- parseTreeM :: MonadThrow m => (BlobKey, ByteString) -> m (TreeKey, Tree)
- data SHA256
- data Unresolved a
- resolvePaths :: MonadIO m => Maybe (Path Abs Dir) -> Unresolved a -> m a
- data Package = Package {
  - packageTreeKey :: !TreeKey
  - packageTree :: !Tree
  - packageCabalEntry :: !PackageCabal
  - packageIdent :: !PackageIdentifier
  }
- data PackageCabal
  - = PCCabalFile !TreeEntry
  - | PCHpack !PHpack
- data PHpack = PHpack {
  - phOriginal :: !TreeEntry
  - phGenerated :: !TreeEntry
  - phVersion :: !Version
  }
- data RawPackageLocation
  - = RPLImmutable !RawPackageLocationImmutable
  - | RPLMutable !(ResolvedPath Dir)
- data PackageLocation
  - = PLImmutable !PackageLocationImmutable
  - | PLMutable !(ResolvedPath Dir)
- toRawPL :: PackageLocation -> RawPackageLocation
- data RawPackageLocationImmutable
  - = RPLIHackage !PackageIdentifierRevision !(Maybe TreeKey)
  - | RPLIArchive !RawArchive !RawPackageMetadata
  - | RPLIRepo !Repo !RawPackageMetadata
- data PackageLocationImmutable
  - = PLIHackage !PackageIdentifier !BlobKey !TreeKey
  - | PLIArchive !Archive !PackageMetadata
  - | PLIRepo !Repo !PackageMetadata
- toRawPLI :: PackageLocationImmutable -> RawPackageLocationImmutable
- data RawArchive = RawArchive {
  - raLocation :: !ArchiveLocation
  - raHash :: !(Maybe SHA256)
  - raSize :: !(Maybe FileSize)
  - raSubdir :: !Text
  }
- data Archive = Archive {
  - archiveLocation :: !ArchiveLocation
  - archiveHash :: !SHA256
  - archiveSize :: !FileSize
  - archiveSubdir :: !Text
  }
- toRawArchive :: Archive -> RawArchive
- data Repo = Repo {
  - repoUrl :: !Text
  - repoCommit :: !Text
  - repoType :: !RepoType
  - repoSubdir :: !Text
  }
- data AggregateRepo = AggregateRepo {
  - aRepo :: !SimpleRepo
  - aRepoSubdirs :: [(Text, RawPackageMetadata)]
  }
- data SimpleRepo = SimpleRepo {
  - sRepoUrl :: !Text
  - sRepoCommit :: !Text
  - sRepoType :: !RepoType
  }
- toAggregateRepos :: [(Repo, RawPackageMetadata)] -> [AggregateRepo]
- rToSimpleRepo :: Repo -> SimpleRepo
- arToSimpleRepo :: AggregateRepo -> SimpleRepo
- data RepoType
  - = RepoGit
  - | RepoHg
- 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
- data OptionalSubdirs
  - = OSSubdirs !(NonEmpty Text)
  - | OSPackageMetadata !Text !RawPackageMetadata
- data ArchiveLocation
  - = ALUrl !Text
  - | ALFilePath !(ResolvedPath File)
- newtype RelFilePath = RelFilePath Text
- newtype CabalString a = CabalString {
  - unCabalString :: a
  }
- toCabalStringMap :: Map a v -> Map (CabalString a) v
- unCabalStringMap :: Map (CabalString a) v -> Map a v
- parsePackageIdentifierRevision :: Text -> Either PantryException PackageIdentifierRevision
- parseRawPackageLocationImmutables :: Text -> Either PantryException (Unresolved (NonEmpty RawPackageLocationImmutable))
- data Mismatch a = Mismatch {
  - mismatchExpected :: !a
  - mismatchActual :: !a
  }
- 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 FuzzyResults
  - = FRNameNotFound ![PackageName]
  - | FRVersionNotFound !(NonEmpty PackageIdentifierRevision)
  - | FRRevisionNotFound !(NonEmpty PackageIdentifierRevision)
- data ResolvedPath t = ResolvedPath {
  - resolvedRelative :: !RelFilePath
  - resolvedAbsolute :: !(Path Abs t)
  }
- data HpackExecutable
  - = HpackBundled
  - | HpackCommand !FilePath
- data WantedCompiler
  - = WCGhc !Version
  - | WCGhcGit !Text !Text
  - | WCGhcjs !Version !Version
- snapshotLocation :: HasPantryConfig env => SnapName -> RIO env RawSnapshotLocation
- defaultSnapshotLocation :: SnapName -> RawSnapshotLocation
- globalHintsLocation :: HasPantryConfig env => WantedCompiler -> RIO env GlobalHintsLocation
- defaultGlobalHintsLocation :: WantedCompiler -> GlobalHintsLocation
- data SnapName
  - = LTS !Int !Int
  - | Nightly !Day
- parseSnapName :: MonadThrow m => Text -> m SnapName
- 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
- parseHackageText :: Text -> Either PantryException (PackageIdentifier, BlobKey)
- parseRawSnapshotLocation :: Text -> Unresolved RawSnapshotLocation
- 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 RawSnapshot = RawSnapshot {
  - rsCompiler :: !WantedCompiler
  - rsPackages :: !(Map PackageName RawSnapshotPackage)
  - rsDrop :: !(Set PackageName)
  }
- data Snapshot = Snapshot {
  - snapshotCompiler :: !WantedCompiler
  - snapshotPackages :: !(Map PackageName SnapshotPackage)
  - snapshotDrop :: !(Set PackageName)
  }
- 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 GlobalHintsLocation
  - = GHLUrl !Text
  - | GHLFilePath !(ResolvedPath File)
- parseGlobalHintsLocation :: Text -> Unresolved GlobalHintsLocation
- parseWantedCompiler :: Text -> Either PantryException WantedCompiler
- data RawPackageMetadata = RawPackageMetadata {
  - rpmName :: !(Maybe PackageName)
  - rpmVersion :: !(Maybe Version)
  - rpmTreeKey :: !(Maybe TreeKey)
  }
- data PackageMetadata = PackageMetadata {
  - pmIdent :: !PackageIdentifier
  - pmTreeKey :: !TreeKey
  }
- toRawPM :: PackageMetadata -> RawPackageMetadata
- cabalFileName :: PackageName -> SafeFilePath
- newtype SnapshotCacheHash = SnapshotCacheHash {
  - unSnapshotCacheHash :: SHA256
  }
- getGlobalHintsFile :: HasPantryConfig env => RIO env (Path Abs File)
- bsToBlobKey :: ByteString -> BlobKey
- warnMissingCabalFile :: HasLogFunc env => RawPackageLocationImmutable -> RIO env ()
- connRDBMS :: SqlBackend -> Text

# Documentation

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

Constructors

PantryConfig |

Fields

- pcPackageIndex :: !PackageIndexConfig
- pcHpackExecutable :: !HpackExecutable
- pcHpackForce :: !Force
- pcRootDir :: !(Path Abs Dir)
- pcStorage :: !Storage
- pcUpdateRef :: !(MVar Bool)

  Want to try updating the index once during a single run for missing package identifiers. We also want to ensure we only update once at a time. Start at `True`.

- pcParsedCabalFilesRawImmutable :: !(IORef (Map RawPackageLocationImmutable GenericPackageDescription))

  Cache of previously parsed cabal files, to save on slow parsing time.

- pcParsedCabalFilesMutable :: !(IORef (Map (Path Abs Dir) (PrintWarnings -> IO GenericPackageDescription, PackageName, Path Abs File)))

  Cache for mutable packages. We want to allow for an optimization: deferring parsing of the `GenericPackageDescription` until its actually needed. Therefore, we keep the filepath and the `PackageName` derived from that filepath. When the `IO GenericPackageDescription` is run, it will ensure that the `PackageName` matches the value inside the cabal file, and print out any warnings that still need to be printed.

- pcConnectionCount :: !Int

  concurrently open downloads

- pcCasaConfig :: !(Maybe (CasaRepoPrefix, Int))

  Optionally, the Casa pull URL e.g. `https://casa.stackage.org` and the maximum number of Casa keys to pull per request.

- pcSnapshotLocation :: SnapName -> RawSnapshotLocation

  The location of snapshot synonyms

- pcGlobalHintsLocation :: WantedCompiler -> GlobalHintsLocation

  The location of global hints

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

- picDownloadPrefix :: !Text
- picHackageSecurityConfig :: !HackageSecurityConfig

#### Instances

Instances details

Show PackageIndexConfig Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PackageIndexConfig -> ShowS Source # show :: PackageIndexConfig -> String Source # showList :: [PackageIndexConfig] -> ShowS Source #
FromJSON (WithJSONWarnings PackageIndexConfig) Source # | If the `hackage-security` key is absent from the JSON object, assigns default value `defaultHackageSecurityConfig`. Since: 0.6.0
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings PackageIndexConfig) Source # parseJSONList :: Value -> Parser [WithJSONWarnings PackageIndexConfig] Source # omittedField :: Maybe (WithJSONWarnings PackageIndexConfig) Source #

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

- hscKeyIds :: ![Text]
- hscKeyThreshold :: !Int
- hscIgnoreExpiry :: !Bool

#### Instances

Instances details

Show HackageSecurityConfig Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> HackageSecurityConfig -> ShowS Source # show :: HackageSecurityConfig -> String Source # showList :: [HackageSecurityConfig] -> ShowS Source #
FromJSON (WithJSONWarnings HackageSecurityConfig) Source # | If the `ignore-expiry` key is absent from the JSON object, assigns default value `True`. Since: 0.1.1.0
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings HackageSecurityConfig) Source # parseJSONList :: Value -> Parser [WithJSONWarnings HackageSecurityConfig] Source # omittedField :: Maybe (WithJSONWarnings HackageSecurityConfig) Source #

defaultHackageSecurityConfig :: HackageSecurityConfig Source #

Default `HackageSecurityConfig` value using the official Hackage server. The value of the `hscIgnoreExpiry` field is `True`.

Since: 0.7.0

data Storage Source #

Represents a SQL database connection.

Constructors

Storage |

Fields

- withStorage_ :: forall env a. HasLogFunc env => ReaderT SqlBackend (RIO env) a -> RIO env a
- withWriteLock_ :: forall env a. HasLogFunc env => RIO env a -> RIO env a

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

data BlobKey Source #

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

Constructors

BlobKey !SHA256 !FileSize |

#### Instances

Instances details

FromJSON BlobKey Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser BlobKey Source # parseJSONList :: Value -> Parser [BlobKey] Source # omittedField :: Maybe BlobKey Source #
ToJSON BlobKey Source # |
Instance details Defined in Pantry.Types Methods toJSON :: BlobKey -> Value Source # toEncoding :: BlobKey -> Encoding Source # toJSONList :: [BlobKey] -> Value Source # toEncodingList :: [BlobKey] -> Encoding Source # omitField :: BlobKey -> Bool Source #
NFData BlobKey Source # |
Instance details Defined in Pantry.Types Methods rnf :: BlobKey -> () Source #
Generic BlobKey Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep BlobKey |

Instance details

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 'DecidedStrict) (Rec0 FileSize)))

Methods

from :: BlobKey -> Rep BlobKey x Source #

to :: Rep BlobKey x -> BlobKey Source #

Show BlobKey Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> BlobKey -> ShowS Source # show :: BlobKey -> String Source # showList :: [BlobKey] -> ShowS Source #
Eq BlobKey Source # |
Instance details Defined in Pantry.Types Methods (==) :: BlobKey -> BlobKey -> Bool Source # (/=) :: BlobKey -> BlobKey -> Bool Source #
Ord BlobKey Source # |
Instance details Defined in Pantry.Types Methods compare :: BlobKey -> BlobKey -> Ordering Source # (<) :: BlobKey -> BlobKey -> Bool Source # (<=) :: BlobKey -> BlobKey -> Bool Source # (>) :: BlobKey -> BlobKey -> Bool Source # (>=) :: BlobKey -> BlobKey -> Bool Source # max :: BlobKey -> BlobKey -> BlobKey Source # min :: BlobKey -> BlobKey -> BlobKey Source #
Display BlobKey Source # |
Instance details Defined in Pantry.Types Methods display :: BlobKey -> Utf8Builder Source # textDisplay :: BlobKey -> Text Source #
type Rep BlobKey Source # |

Instance details

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 'DecidedStrict) (Rec0 FileSize)))

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

Instances details

Parsec PackageName |
Instance details Defined in Distribution.Types.PackageName Methods parsec :: CabalParsing m => m PackageName Source #
Pretty PackageName |
Instance details Defined in Distribution.Types.PackageName Methods pretty :: PackageName -> Doc Source # prettyVersioned :: CabalSpecVersion -> PackageName -> Doc Source #
Structured PackageName |
Instance details Defined in Distribution.Types.PackageName Methods structure :: Proxy PackageName -> Structure Source # structureHash' :: Tagged PackageName MD5
Binary PackageName |
Instance details Defined in Distribution.Types.PackageName Methods put :: PackageName -> Put Source # get :: Get PackageName Source # putList :: [PackageName] -> Put Source #
NFData PackageName |
Instance details Defined in Distribution.Types.PackageName Methods rnf :: PackageName -> () Source #
Data PackageName |

Instance details

Defined in Distribution.Types.PackageName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageName -> c PackageName Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageName Source #

toConstr :: PackageName -> Constr Source #

dataTypeOf :: PackageName -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PackageName) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageName) Source #

gmapT :: (forall b. Data b => b -> b) -> PackageName -> PackageName Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> PackageName -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageName -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName Source #

IsString PackageName | `mkPackageName` Since: Cabal-syntax-2.0.0.2
Instance details Defined in Distribution.Types.PackageName Methods fromString :: String -> PackageName Source #
Generic PackageName |

Instance details

Defined in Distribution.Types.PackageName

Associated Types

type Rep PackageName |
Instance details Defined in Distribution.Types.PackageName type Rep PackageName = D1 ('MetaData "PackageName" "Distribution.Types.PackageName" "Cabal-syntax-3.12.1.0-inplace" 'True) (C1 ('MetaCons "PackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

Methods

from :: PackageName -> Rep PackageName x Source #

to :: Rep PackageName x -> PackageName Source #

Read PackageName |
Instance details Defined in Distribution.Types.PackageName Methods readsPrec :: Int -> ReadS PackageName Source # readList :: ReadS [PackageName] Source # readPrec :: ReadPrec PackageName Source # readListPrec :: ReadPrec [PackageName] Source #
Show PackageName |
Instance details Defined in Distribution.Types.PackageName Methods showsPrec :: Int -> PackageName -> ShowS Source # show :: PackageName -> String Source # showList :: [PackageName] -> ShowS Source #
Eq PackageName |
Instance details Defined in Distribution.Types.PackageName Methods (==) :: PackageName -> PackageName -> Bool Source # (/=) :: PackageName -> PackageName -> Bool Source #
Ord PackageName |

Instance details

Defined in Distribution.Types.PackageName

Methods

compare :: PackageName -> PackageName -> Ordering Source #

(<) :: PackageName -> PackageName -> Bool Source #

(<=) :: PackageName -> PackageName -> Bool Source #

(>) :: PackageName -> PackageName -> Bool Source #

(>=) :: PackageName -> PackageName -> Bool Source #

max :: PackageName -> PackageName -> PackageName Source #

min :: PackageName -> PackageName -> PackageName Source #

type Rep PackageName |
Instance details Defined in Distribution.Types.PackageName type Rep PackageName = D1 ('MetaData "PackageName" "Distribution.Types.PackageName" "Cabal-syntax-3.12.1.0-inplace" 'True) (C1 ('MetaCons "PackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

data Version Source #

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

Instances details

Parsec Version |
Instance details Defined in Distribution.Types.Version Methods parsec :: CabalParsing m => m Version Source #
Pretty Version |
Instance details Defined in Distribution.Types.Version Methods pretty :: Version -> Doc Source # prettyVersioned :: CabalSpecVersion -> Version -> Doc Source #
Structured Version |
Instance details Defined in Distribution.Types.Version Methods structure :: Proxy Version -> Structure Source # structureHash' :: Tagged Version MD5
Binary Version |
Instance details Defined in Distribution.Types.Version Methods put :: Version -> Put Source # get :: Get Version Source # putList :: [Version] -> Put Source #
NFData Version |
Instance details Defined in Distribution.Types.Version Methods rnf :: Version -> () Source #
Data Version |

Instance details

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 |

Instance details

Defined in Distribution.Types.Version

Associated Types

type Rep Version |

Instance details

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])))

Methods

from :: Version -> Rep Version x Source #

to :: Rep Version x -> Version Source #

Read Version |
Instance details Defined in Distribution.Types.Version Methods readsPrec :: Int -> ReadS Version Source # readList :: ReadS [Version] Source # readPrec :: ReadPrec Version Source # readListPrec :: ReadPrec [Version] Source #
Show Version |
Instance details Defined in Distribution.Types.Version Methods showsPrec :: Int -> Version -> ShowS Source # show :: Version -> String Source # showList :: [Version] -> ShowS Source #
Eq Version |
Instance details Defined in Distribution.Types.Version Methods (==) :: Version -> Version -> Bool Source # (/=) :: Version -> Version -> Bool Source #
Ord Version |
Instance details Defined in Distribution.Types.Version Methods compare :: Version -> Version -> Ordering Source # (<) :: Version -> Version -> Bool Source # (<=) :: Version -> Version -> Bool Source # (>) :: Version -> Version -> Bool Source # (>=) :: Version -> Version -> Bool Source # max :: Version -> Version -> Version Source # min :: Version -> Version -> Version Source #
type Rep Version |

Instance details

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])))

data PackageIdentifier Source #

The name and version of a package.

Constructors

PackageIdentifier |

Fields

- pkgName :: PackageName

  The name of this package, eg. foo

- pkgVersion :: Version

  the version of this package, eg 1.2

#### Instances

Instances details

Package PackageIdentifier |
Instance details Defined in Distribution.Package Methods packageId :: PackageIdentifier -> PackageIdentifier Source #

Parsec PackageIdentifier

    >>> simpleParsec "foo-bar-0" :: Maybe PackageIdentifier
    Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion [0]})

    >>> simpleParsec "foo-bar" :: Maybe PackageIdentifier
    Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion []})

Note: Stricter than `Text` instance

    >>> simpleParsec "foo-bar-0-0" :: Maybe PackageIdentifier
    Nothing

    >>> simpleParsec "foo-bar.0" :: Maybe PackageIdentifier
    Nothing

    >>> simpleParsec "foo-bar.4-2" :: Maybe PackageIdentifier
    Nothing

    >>> simpleParsec "1.2.3" :: Maybe PackageIdentifier
    Nothing

Instance details Defined in Distribution.Types.PackageId Methods parsec :: CabalParsing m => m PackageIdentifier Source #
Pretty PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods pretty :: PackageIdentifier -> Doc Source # prettyVersioned :: CabalSpecVersion -> PackageIdentifier -> Doc Source #
Structured PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods structure :: Proxy PackageIdentifier -> Structure Source # structureHash' :: Tagged PackageIdentifier MD5
Binary PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods put :: PackageIdentifier -> Put Source # get :: Get PackageIdentifier Source # putList :: [PackageIdentifier] -> Put Source #
NFData PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods rnf :: PackageIdentifier -> () Source #
Data PackageIdentifier |

Instance details

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 |

Instance details

Defined in Distribution.Types.PackageId

Associated Types

type Rep PackageIdentifier |

Instance details

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)))

Methods

from :: PackageIdentifier -> Rep PackageIdentifier x Source #

to :: Rep PackageIdentifier x -> PackageIdentifier Source #

Read PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods readsPrec :: Int -> ReadS PackageIdentifier Source # readList :: ReadS [PackageIdentifier] Source # readPrec :: ReadPrec PackageIdentifier Source # readListPrec :: ReadPrec [PackageIdentifier] Source #
Show PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods showsPrec :: Int -> PackageIdentifier -> ShowS Source # show :: PackageIdentifier -> String Source # showList :: [PackageIdentifier] -> ShowS Source #
Eq PackageIdentifier |
Instance details Defined in Distribution.Types.PackageId Methods (==) :: PackageIdentifier -> PackageIdentifier -> Bool Source # (/=) :: PackageIdentifier -> PackageIdentifier -> Bool Source #
Ord PackageIdentifier |

Instance details

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 #

type Rep PackageIdentifier |

Instance details

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)))

newtype Revision Source #

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

Constructors

Revision Word |

#### Instances

Instances details

NFData Revision Source # |
Instance details Defined in Pantry.Types Methods rnf :: Revision -> () Source #
Data Revision Source # |

Instance details

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 Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep Revision |
Instance details Defined in Pantry.Types type Rep Revision = D1 ('MetaData "Revision" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "Revision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

Methods

from :: Revision -> Rep Revision x Source #

to :: Rep Revision x -> Revision Source #

Show Revision Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> Revision -> ShowS Source # show :: Revision -> String Source # showList :: [Revision] -> ShowS Source #
Eq Revision Source # |
Instance details Defined in Pantry.Types Methods (==) :: Revision -> Revision -> Bool Source # (/=) :: Revision -> Revision -> Bool Source #
Ord Revision Source # |
Instance details Defined in Pantry.Types Methods compare :: Revision -> Revision -> Ordering Source # (<) :: Revision -> Revision -> Bool Source # (<=) :: Revision -> Revision -> Bool Source # (>) :: Revision -> Revision -> Bool Source # (>=) :: Revision -> Revision -> Bool Source # max :: Revision -> Revision -> Revision Source # min :: Revision -> Revision -> Revision Source #
Hashable Revision Source # |
Instance details Defined in Pantry.Types Methods hashWithSalt :: Int -> Revision -> Int hash :: Revision -> Int
PersistField Revision Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: Revision -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text Revision Source #
PersistFieldSql Revision Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy Revision -> SqlType Source #
Display Revision Source # |
Instance details Defined in Pantry.Types Methods display :: Revision -> Utf8Builder Source # textDisplay :: Revision -> Text Source #
type Rep Revision Source # |
Instance details Defined in Pantry.Types type Rep Revision = D1 ('MetaData "Revision" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "Revision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

data ModuleName Source #

A valid Haskell module name.

#### Instances

Instances details

Parsec ModuleName |
Instance details Defined in Distribution.ModuleName Methods parsec :: CabalParsing m => m ModuleName Source #
Pretty ModuleName |
Instance details Defined in Distribution.ModuleName Methods pretty :: ModuleName -> Doc Source # prettyVersioned :: CabalSpecVersion -> ModuleName -> Doc Source #
Structured ModuleName |
Instance details Defined in Distribution.ModuleName Methods structure :: Proxy ModuleName -> Structure Source # structureHash' :: Tagged ModuleName MD5
Binary ModuleName |
Instance details Defined in Distribution.ModuleName Methods put :: ModuleName -> Put Source # get :: Get ModuleName Source # putList :: [ModuleName] -> Put Source #
NFData ModuleName |
Instance details Defined in Distribution.ModuleName Methods rnf :: ModuleName -> () Source #
Data ModuleName |

Instance details

Defined in Distribution.ModuleName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleName -> c ModuleName Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleName Source #

toConstr :: ModuleName -> Constr Source #

dataTypeOf :: ModuleName -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModuleName) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleName) Source #

gmapT :: (forall b. Data b => b -> b) -> ModuleName -> ModuleName Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ModuleName -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleName -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName Source #

IsString ModuleName | Construct a `ModuleName` from a valid module name `String`. This is just a convenience function intended for valid module strings. It is an error if it is used with a string that is not a valid module name. If you are parsing user input then use `simpleParse` instead.
Instance details Defined in Distribution.ModuleName Methods fromString :: String -> ModuleName Source #
Generic ModuleName |

Instance details

Defined in Distribution.ModuleName

Associated Types

type Rep ModuleName |
Instance details Defined in Distribution.ModuleName type Rep ModuleName = D1 ('MetaData "ModuleName" "Distribution.ModuleName" "Cabal-syntax-3.12.1.0-inplace" 'True) (C1 ('MetaCons "ModuleName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

Methods

from :: ModuleName -> Rep ModuleName x Source #

to :: Rep ModuleName x -> ModuleName Source #

Read ModuleName |
Instance details Defined in Distribution.ModuleName Methods readsPrec :: Int -> ReadS ModuleName Source # readList :: ReadS [ModuleName] Source # readPrec :: ReadPrec ModuleName Source # readListPrec :: ReadPrec [ModuleName] Source #
Show ModuleName |
Instance details Defined in Distribution.ModuleName Methods showsPrec :: Int -> ModuleName -> ShowS Source # show :: ModuleName -> String Source # showList :: [ModuleName] -> ShowS Source #
Eq ModuleName |
Instance details Defined in Distribution.ModuleName Methods (==) :: ModuleName -> ModuleName -> Bool Source # (/=) :: ModuleName -> ModuleName -> Bool Source #
Ord ModuleName |

Instance details

Defined in Distribution.ModuleName

Methods

compare :: ModuleName -> ModuleName -> Ordering Source #

(<) :: ModuleName -> ModuleName -> Bool Source #

(<=) :: ModuleName -> ModuleName -> Bool Source #

(>) :: ModuleName -> ModuleName -> Bool Source #

(>=) :: ModuleName -> ModuleName -> Bool Source #

max :: ModuleName -> ModuleName -> ModuleName Source #

min :: ModuleName -> ModuleName -> ModuleName Source #

Pretty ModuleName |
Instance details Defined in Text.PrettyPrint.Leijen.Extended Methods pretty :: ModuleName -> StyleDoc Source #
ModSubst (Set ModuleName) |
Instance details Defined in Distribution.Backpack.ModSubst Methods modSubst :: OpenModuleSubst -> Set ModuleName -> Set ModuleName Source #
Newtype [(ModuleName, OpenModule)] InstWith |
Instance details Defined in Distribution.Types.InstalledPackageInfo.FieldGrammar Methods pack :: [(ModuleName, OpenModule)] -> InstWith Source # unpack :: InstWith -> [(ModuleName, OpenModule)] Source #
type Rep ModuleName |
Instance details Defined in Distribution.ModuleName type Rep ModuleName = D1 ('MetaData "ModuleName" "Distribution.ModuleName" "Cabal-syntax-3.12.1.0-inplace" 'True) (C1 ('MetaCons "ModuleName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

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 `Maybe` on `FileSize` is for compatibility with input that doesn't include the file size. 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. `CFIHash` should be preferred wherever possible for reproducibility. Since: 0.1.0.0

#### Instances

Instances details

NFData CabalFileInfo Source # |
Instance details Defined in Pantry.Types Methods rnf :: CabalFileInfo -> () Source #
Generic CabalFileInfo Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep CabalFileInfo |

Instance details

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 'DecidedStrict) (Rec0 Revision))))

Methods

from :: CabalFileInfo -> Rep CabalFileInfo x Source #

to :: Rep CabalFileInfo x -> CabalFileInfo Source #

Show CabalFileInfo Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> CabalFileInfo -> ShowS Source # show :: CabalFileInfo -> String Source # showList :: [CabalFileInfo] -> ShowS Source #
Eq CabalFileInfo Source # |
Instance details Defined in Pantry.Types Methods (==) :: CabalFileInfo -> CabalFileInfo -> Bool Source # (/=) :: CabalFileInfo -> CabalFileInfo -> Bool Source #
Ord CabalFileInfo Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods hashWithSalt :: Int -> CabalFileInfo -> Int hash :: CabalFileInfo -> Int
Display CabalFileInfo Source # |
Instance details Defined in Pantry.Types Methods display :: CabalFileInfo -> Utf8Builder Source # textDisplay :: CabalFileInfo -> Text Source #
type Rep CabalFileInfo Source # |

Instance details

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 'DecidedStrict) (Rec0 Revision))))

data PrintWarnings Source #

Should we print warnings when loading a cabal file?

Since: 0.1.0.0

Constructors

YesPrintWarnings |
NoPrintWarnings |

newtype PackageNameP Source #

Constructors

PackageNameP |

Fields

- unPackageNameP :: PackageName

#### Instances

Instances details

FromJSON PackageNameP Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser PackageNameP Source # parseJSONList :: Value -> Parser [PackageNameP] Source # omittedField :: Maybe PackageNameP Source #
FromJSONKey PackageNameP Source # |
Instance details Defined in Pantry.Types Methods fromJSONKey :: FromJSONKeyFunction PackageNameP Source # fromJSONKeyList :: FromJSONKeyFunction [PackageNameP] Source #
ToJSON PackageNameP Source # |
Instance details Defined in Pantry.Types Methods toJSON :: PackageNameP -> Value Source # toEncoding :: PackageNameP -> Encoding Source # toJSONList :: [PackageNameP] -> Value Source # toEncodingList :: [PackageNameP] -> Encoding Source # omitField :: PackageNameP -> Bool Source #
ToJSONKey PackageNameP Source # |
Instance details Defined in Pantry.Types Methods toJSONKey :: ToJSONKeyFunction PackageNameP Source # toJSONKeyList :: ToJSONKeyFunction [PackageNameP] Source #
NFData PackageNameP Source # |
Instance details Defined in Pantry.Types Methods rnf :: PackageNameP -> () Source #
Read PackageNameP Source # |
Instance details Defined in Pantry.Types Methods readsPrec :: Int -> ReadS PackageNameP Source # readList :: ReadS [PackageNameP] Source # readPrec :: ReadPrec PackageNameP Source # readListPrec :: ReadPrec [PackageNameP] Source #
Show PackageNameP Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PackageNameP -> ShowS Source # show :: PackageNameP -> String Source # showList :: [PackageNameP] -> ShowS Source #
Eq PackageNameP Source # |
Instance details Defined in Pantry.Types Methods (==) :: PackageNameP -> PackageNameP -> Bool Source # (/=) :: PackageNameP -> PackageNameP -> Bool Source #
Ord PackageNameP Source # |

Instance details

Defined in Pantry.Types

Methods

compare :: PackageNameP -> PackageNameP -> Ordering Source #

(<) :: PackageNameP -> PackageNameP -> Bool Source #

(<=) :: PackageNameP -> PackageNameP -> Bool Source #

(>) :: PackageNameP -> PackageNameP -> Bool Source #

(>=) :: PackageNameP -> PackageNameP -> Bool Source #

max :: PackageNameP -> PackageNameP -> PackageNameP Source #

min :: PackageNameP -> PackageNameP -> PackageNameP Source #

PersistField PackageNameP Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: PackageNameP -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text PackageNameP Source #
PersistFieldSql PackageNameP Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy PackageNameP -> SqlType Source #
Display PackageNameP Source # |
Instance details Defined in Pantry.Types Methods display :: PackageNameP -> Utf8Builder Source # textDisplay :: PackageNameP -> Text Source #

newtype VersionP Source #

Constructors

VersionP |

Fields

- unVersionP :: Version

#### Instances

Instances details

FromJSON VersionP Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser VersionP Source # parseJSONList :: Value -> Parser [VersionP] Source # omittedField :: Maybe VersionP Source #
ToJSON VersionP Source # |
Instance details Defined in Pantry.Types Methods toJSON :: VersionP -> Value Source # toEncoding :: VersionP -> Encoding Source # toJSONList :: [VersionP] -> Value Source # toEncodingList :: [VersionP] -> Encoding Source # omitField :: VersionP -> Bool Source #
NFData VersionP Source # |
Instance details Defined in Pantry.Types Methods rnf :: VersionP -> () Source #
Read VersionP Source # |
Instance details Defined in Pantry.Types Methods readsPrec :: Int -> ReadS VersionP Source # readList :: ReadS [VersionP] Source # readPrec :: ReadPrec VersionP Source # readListPrec :: ReadPrec [VersionP] Source #
Show VersionP Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> VersionP -> ShowS Source # show :: VersionP -> String Source # showList :: [VersionP] -> ShowS Source #
Eq VersionP Source # |
Instance details Defined in Pantry.Types Methods (==) :: VersionP -> VersionP -> Bool Source # (/=) :: VersionP -> VersionP -> Bool Source #
Ord VersionP Source # |
Instance details Defined in Pantry.Types Methods compare :: VersionP -> VersionP -> Ordering Source # (<) :: VersionP -> VersionP -> Bool Source # (<=) :: VersionP -> VersionP -> Bool Source # (>) :: VersionP -> VersionP -> Bool Source # (>=) :: VersionP -> VersionP -> Bool Source # max :: VersionP -> VersionP -> VersionP Source # min :: VersionP -> VersionP -> VersionP Source #
PersistField VersionP Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: VersionP -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text VersionP Source #
PersistFieldSql VersionP Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy VersionP -> SqlType Source #
Display VersionP Source # |
Instance details Defined in Pantry.Types Methods display :: VersionP -> Utf8Builder Source # textDisplay :: VersionP -> Text Source #

newtype ModuleNameP Source #

Constructors

ModuleNameP |

Fields

- unModuleNameP :: ModuleName

#### Instances

Instances details

NFData ModuleNameP Source # |
Instance details Defined in Pantry.Types Methods rnf :: ModuleNameP -> () Source #
Show ModuleNameP Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> ModuleNameP -> ShowS Source # show :: ModuleNameP -> String Source # showList :: [ModuleNameP] -> ShowS Source #
Eq ModuleNameP Source # |
Instance details Defined in Pantry.Types Methods (==) :: ModuleNameP -> ModuleNameP -> Bool Source # (/=) :: ModuleNameP -> ModuleNameP -> Bool Source #
Ord ModuleNameP Source # |

Instance details

Defined in Pantry.Types

Methods

compare :: ModuleNameP -> ModuleNameP -> Ordering Source #

(<) :: ModuleNameP -> ModuleNameP -> Bool Source #

(<=) :: ModuleNameP -> ModuleNameP -> Bool Source #

(>) :: ModuleNameP -> ModuleNameP -> Bool Source #

(>=) :: ModuleNameP -> ModuleNameP -> Bool Source #

max :: ModuleNameP -> ModuleNameP -> ModuleNameP Source #

min :: ModuleNameP -> ModuleNameP -> ModuleNameP Source #

PersistField ModuleNameP Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: ModuleNameP -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text ModuleNameP Source #
PersistFieldSql ModuleNameP Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy ModuleNameP -> SqlType Source #
Display ModuleNameP Source # |
Instance details Defined in Pantry.Types Methods display :: ModuleNameP -> Utf8Builder Source # textDisplay :: ModuleNameP -> Text Source #

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

Instances details

FromJSON PackageIdentifierRevision Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser PackageIdentifierRevision Source # parseJSONList :: Value -> Parser [PackageIdentifierRevision] Source # omittedField :: Maybe PackageIdentifierRevision Source #
ToJSON PackageIdentifierRevision Source # |
Instance details Defined in Pantry.Types Methods toJSON :: PackageIdentifierRevision -> Value Source # toEncoding :: PackageIdentifierRevision -> Encoding Source # toJSONList :: [PackageIdentifierRevision] -> Value Source # toEncodingList :: [PackageIdentifierRevision] -> Encoding Source # omitField :: PackageIdentifierRevision -> Bool Source #
NFData PackageIdentifierRevision Source # |
Instance details Defined in Pantry.Types Methods rnf :: PackageIdentifierRevision -> () Source #
Generic PackageIdentifierRevision Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep PackageIdentifierRevision |

Instance details

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 'DecidedStrict) (Rec0 PackageName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CabalFileInfo))))

Methods

from :: PackageIdentifierRevision -> Rep PackageIdentifierRevision x Source #

to :: Rep PackageIdentifierRevision x -> PackageIdentifierRevision Source #

Show PackageIdentifierRevision Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PackageIdentifierRevision -> ShowS Source # show :: PackageIdentifierRevision -> String Source # showList :: [PackageIdentifierRevision] -> ShowS Source #
Eq PackageIdentifierRevision Source # |
Instance details Defined in Pantry.Types Methods (==) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source # (/=) :: PackageIdentifierRevision -> PackageIdentifierRevision -> Bool Source #
Ord PackageIdentifierRevision Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: PackageIdentifierRevision -> Utf8Builder Source # textDisplay :: PackageIdentifierRevision -> Text Source #
type Rep PackageIdentifierRevision Source # |

Instance details

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 'DecidedStrict) (Rec0 PackageName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CabalFileInfo))))

pirForHash :: PackageIdentifier -> BlobKey -> PackageIdentifierRevision Source #

Package identifier and revision with a specified cabal file hash

Since: 0.1.0.0

data FileType Source #

Constructors

FTNormal |
FTExecutable |

#### Instances

Instances details

Bounded FileType Source # |
Instance details Defined in Pantry.Types Methods minBound :: FileType Source # maxBound :: FileType Source #
Enum FileType Source # |

Instance details

Defined in Pantry.Types

Methods

succ :: FileType -> FileType Source #

pred :: FileType -> FileType Source #

toEnum :: Int -> FileType Source #

fromEnum :: FileType -> Int Source #

enumFrom :: FileType -> [FileType] Source #

enumFromThen :: FileType -> FileType -> [FileType] Source #

enumFromTo :: FileType -> FileType -> [FileType] Source #

enumFromThenTo :: FileType -> FileType -> FileType -> [FileType] Source #

Show FileType Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> FileType -> ShowS Source # show :: FileType -> String Source # showList :: [FileType] -> ShowS Source #
Eq FileType Source # |
Instance details Defined in Pantry.Types Methods (==) :: FileType -> FileType -> Bool Source # (/=) :: FileType -> FileType -> Bool Source #
Ord FileType Source # |
Instance details Defined in Pantry.Types Methods compare :: FileType -> FileType -> Ordering Source # (<) :: FileType -> FileType -> Bool Source # (<=) :: FileType -> FileType -> Bool Source # (>) :: FileType -> FileType -> Bool Source # (>=) :: FileType -> FileType -> Bool Source # max :: FileType -> FileType -> FileType Source # min :: FileType -> FileType -> FileType Source #
PersistField FileType Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: FileType -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text FileType Source #
PersistFieldSql FileType Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy FileType -> SqlType Source #

data BuildFile Source #

Constructors

BFCabal !SafeFilePath !TreeEntry |
BFHpack !TreeEntry |

#### Instances

Instances details

Show BuildFile Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> BuildFile -> ShowS Source # show :: BuildFile -> String Source # showList :: [BuildFile] -> ShowS Source #
Eq BuildFile Source # |
Instance details Defined in Pantry.Types Methods (==) :: BuildFile -> BuildFile -> Bool Source # (/=) :: BuildFile -> BuildFile -> Bool Source #

newtype FileSize Source #

File size in bytes

Since: 0.1.0.0

Constructors

FileSize Word |

#### Instances

Instances details

FromJSON FileSize Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser FileSize Source # parseJSONList :: Value -> Parser [FileSize] Source # omittedField :: Maybe FileSize Source #
ToJSON FileSize Source # |
Instance details Defined in Pantry.Types Methods toJSON :: FileSize -> Value Source # toEncoding :: FileSize -> Encoding Source # toJSONList :: [FileSize] -> Value Source # toEncodingList :: [FileSize] -> Encoding Source # omitField :: FileSize -> Bool Source #
NFData FileSize Source # |
Instance details Defined in Pantry.Types Methods rnf :: FileSize -> () Source #
Generic FileSize Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep FileSize |
Instance details Defined in Pantry.Types type Rep FileSize = D1 ('MetaData "FileSize" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "FileSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

Methods

from :: FileSize -> Rep FileSize x Source #

to :: Rep FileSize x -> FileSize Source #

Show FileSize Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> FileSize -> ShowS Source # show :: FileSize -> String Source # showList :: [FileSize] -> ShowS Source #
Eq FileSize Source # |
Instance details Defined in Pantry.Types Methods (==) :: FileSize -> FileSize -> Bool Source # (/=) :: FileSize -> FileSize -> Bool Source #
Ord FileSize Source # |
Instance details Defined in Pantry.Types Methods compare :: FileSize -> FileSize -> Ordering Source # (<) :: FileSize -> FileSize -> Bool Source # (<=) :: FileSize -> FileSize -> Bool Source # (>) :: FileSize -> FileSize -> Bool Source # (>=) :: FileSize -> FileSize -> Bool Source # max :: FileSize -> FileSize -> FileSize Source # min :: FileSize -> FileSize -> FileSize Source #
Hashable FileSize Source # |
Instance details Defined in Pantry.Types Methods hashWithSalt :: Int -> FileSize -> Int hash :: FileSize -> Int
PersistField FileSize Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: FileSize -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text FileSize Source #
PersistFieldSql FileSize Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy FileSize -> SqlType Source #
Display FileSize Source # |
Instance details Defined in Pantry.Types Methods display :: FileSize -> Utf8Builder Source # textDisplay :: FileSize -> Text Source #
type Rep FileSize Source # |
Instance details Defined in Pantry.Types type Rep FileSize = D1 ('MetaData "FileSize" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "FileSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

data TreeEntry Source #

Constructors

TreeEntry |

Fields

- teBlob :: !BlobKey
- teType :: !FileType

#### Instances

Instances details

Show TreeEntry Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> TreeEntry -> ShowS Source # show :: TreeEntry -> String Source # showList :: [TreeEntry] -> ShowS Source #
Eq TreeEntry Source # |
Instance details Defined in Pantry.Types Methods (==) :: TreeEntry -> TreeEntry -> Bool Source # (/=) :: TreeEntry -> TreeEntry -> Bool Source #
Ord TreeEntry Source # |
Instance details Defined in Pantry.Types Methods compare :: TreeEntry -> TreeEntry -> Ordering Source # (<) :: TreeEntry -> TreeEntry -> Bool Source # (<=) :: TreeEntry -> TreeEntry -> Bool Source # (>) :: TreeEntry -> TreeEntry -> Bool Source # (>=) :: TreeEntry -> TreeEntry -> Bool Source # max :: TreeEntry -> TreeEntry -> TreeEntry Source # min :: TreeEntry -> TreeEntry -> TreeEntry Source #

data SafeFilePath Source #

#### Instances

Instances details

Show SafeFilePath Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> SafeFilePath -> ShowS Source # show :: SafeFilePath -> String Source # showList :: [SafeFilePath] -> ShowS Source #
Eq SafeFilePath Source # |
Instance details Defined in Pantry.Types Methods (==) :: SafeFilePath -> SafeFilePath -> Bool Source # (/=) :: SafeFilePath -> SafeFilePath -> Bool Source #
Ord SafeFilePath Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: SafeFilePath -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text SafeFilePath Source #
PersistFieldSql SafeFilePath Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy SafeFilePath -> SqlType Source #
Display SafeFilePath Source # |
Instance details Defined in Pantry.Types Methods display :: SafeFilePath -> Utf8Builder Source # textDisplay :: SafeFilePath -> Text Source #

unSafeFilePath :: SafeFilePath -> Text Source #

mkSafeFilePath :: Text -> Maybe SafeFilePath Source #

safeFilePathToPath :: MonadThrow m => Path Abs Dir -> SafeFilePath -> m (Path Abs File) Source #

hpackSafeFilePath :: SafeFilePath Source #

SafeFilePath for `package.yaml` file.

newtype TreeKey Source #

The hash of the binary representation of a `Tree`.

Since: 0.1.0.0

Constructors

TreeKey BlobKey |

#### Instances

Instances details

FromJSON TreeKey Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser TreeKey Source # parseJSONList :: Value -> Parser [TreeKey] Source # omittedField :: Maybe TreeKey Source #
ToJSON TreeKey Source # |
Instance details Defined in Pantry.Types Methods toJSON :: TreeKey -> Value Source # toEncoding :: TreeKey -> Encoding Source # toJSONList :: [TreeKey] -> Value Source # toEncodingList :: [TreeKey] -> Encoding Source # omitField :: TreeKey -> Bool Source #
NFData TreeKey Source # |
Instance details Defined in Pantry.Types Methods rnf :: TreeKey -> () Source #
Generic TreeKey Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep TreeKey |
Instance details Defined in Pantry.Types type Rep TreeKey = D1 ('MetaData "TreeKey" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "TreeKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlobKey)))

Methods

from :: TreeKey -> Rep TreeKey x Source #

to :: Rep TreeKey x -> TreeKey Source #

Show TreeKey Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> TreeKey -> ShowS Source # show :: TreeKey -> String Source # showList :: [TreeKey] -> ShowS Source #
Eq TreeKey Source # |
Instance details Defined in Pantry.Types Methods (==) :: TreeKey -> TreeKey -> Bool Source # (/=) :: TreeKey -> TreeKey -> Bool Source #
Ord TreeKey Source # |
Instance details Defined in Pantry.Types Methods compare :: TreeKey -> TreeKey -> Ordering Source # (<) :: TreeKey -> TreeKey -> Bool Source # (<=) :: TreeKey -> TreeKey -> Bool Source # (>) :: TreeKey -> TreeKey -> Bool Source # (>=) :: TreeKey -> TreeKey -> Bool Source # max :: TreeKey -> TreeKey -> TreeKey Source # min :: TreeKey -> TreeKey -> TreeKey Source #
Display TreeKey Source # |
Instance details Defined in Pantry.Types Methods display :: TreeKey -> Utf8Builder Source # textDisplay :: TreeKey -> Text Source #
type Rep TreeKey Source # |
Instance details Defined in Pantry.Types type Rep TreeKey = D1 ('MetaData "TreeKey" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "TreeKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlobKey)))

newtype Tree Source #

Represents the contents of a tree, which is a mapping from relative file paths to `TreeEntry`s.

Since: 0.1.0.0

Constructors

TreeMap (Map SafeFilePath TreeEntry) |

#### Instances

Instances details

Show Tree Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> Tree -> ShowS Source # show :: Tree -> String Source # showList :: [Tree] -> ShowS Source #
Eq Tree Source # |
Instance details Defined in Pantry.Types Methods (==) :: Tree -> Tree -> Bool Source # (/=) :: Tree -> Tree -> Bool Source #
Ord Tree Source # |
Instance details Defined in Pantry.Types Methods compare :: Tree -> Tree -> Ordering Source # (<) :: Tree -> Tree -> Bool Source # (<=) :: Tree -> Tree -> Bool Source # (>) :: Tree -> Tree -> Bool Source # (>=) :: Tree -> Tree -> Bool Source # max :: Tree -> Tree -> Tree Source # min :: Tree -> Tree -> Tree Source #

renderTree :: Tree -> ByteString Source #

parseTree :: ByteString -> Maybe Tree Source #

parseTreeM :: MonadThrow m => (BlobKey, ByteString) -> m (TreeKey, Tree) Source #

data SHA256 Source #

A SHA256 hash, stored in a static size for more efficient memory representation.

Since: 0.1.0.0

#### Instances

Instances details

FromJSON SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods parseJSON :: Value -> Parser SHA256 Source # parseJSONList :: Value -> Parser [SHA256] Source # omittedField :: Maybe SHA256 Source #
ToJSON SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods toJSON :: SHA256 -> Value Source # toEncoding :: SHA256 -> Encoding Source # toJSONList :: [SHA256] -> Value Source # toEncodingList :: [SHA256] -> Encoding Source # omitField :: SHA256 -> Bool Source #
NFData SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods rnf :: SHA256 -> () Source #
Data SHA256 Source # |

Instance details

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 Source # |

Instance details

Defined in Pantry.SHA256

Associated Types

type Rep SHA256 |
Instance details Defined in Pantry.SHA256 type Rep SHA256 = D1 ('MetaData "SHA256" "Pantry.SHA256" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "SHA256" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bytes32)))

Methods

from :: SHA256 -> Rep SHA256 x Source #

to :: Rep SHA256 x -> SHA256 Source #

Show SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods showsPrec :: Int -> SHA256 -> ShowS Source # show :: SHA256 -> String Source # showList :: [SHA256] -> ShowS Source #
Eq SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods (==) :: SHA256 -> SHA256 -> Bool Source # (/=) :: SHA256 -> SHA256 -> Bool Source #
Ord SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods compare :: SHA256 -> SHA256 -> Ordering Source # (<) :: SHA256 -> SHA256 -> Bool Source # (<=) :: SHA256 -> SHA256 -> Bool Source # (>) :: SHA256 -> SHA256 -> Bool Source # (>=) :: SHA256 -> SHA256 -> Bool Source # max :: SHA256 -> SHA256 -> SHA256 Source # min :: SHA256 -> SHA256 -> SHA256 Source #
Hashable SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods hashWithSalt :: Int -> SHA256 -> Int hash :: SHA256 -> Int
PersistField SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods toPersistValue :: SHA256 -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text SHA256 Source #
PersistFieldSql SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods sqlType :: Proxy SHA256 -> SqlType Source #
Display SHA256 Source # |
Instance details Defined in Pantry.SHA256 Methods display :: SHA256 -> Utf8Builder Source # textDisplay :: SHA256 -> Text Source #
type Rep SHA256 Source # |
Instance details Defined in Pantry.SHA256 type Rep SHA256 = D1 ('MetaData "SHA256" "Pantry.SHA256" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'True) (C1 ('MetaCons "SHA256" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bytes32)))

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

Instances details

Applicative Unresolved Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods fmap :: (a -> b) -> Unresolved a -> Unresolved b Source # (<$) :: a -> Unresolved b -> Unresolved a Source #
FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) Source # |
Instance details 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))) Source # |
Instance details 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)) Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved GlobalHintsLocation)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved GlobalHintsLocation)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved GlobalHintsLocation)) Source #
FromJSON (WithJSONWarnings (Unresolved PackageLocationImmutable)) Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved PackageLocationImmutable)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved PackageLocationImmutable)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved PackageLocationImmutable)) Source #
FromJSON (WithJSONWarnings (Unresolved RawSnapshotLayer)) Source # |
Instance details 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)) Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved RawSnapshotLocation)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved RawSnapshotLocation)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved RawSnapshotLocation)) Source #
FromJSON (WithJSONWarnings (Unresolved SnapshotLocation)) Source # |
Instance details 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 #

resolvePaths Source #

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

data Package Source #

Parsed tree with more information on the Haskell package it contains.

Since: 0.1.0.0

Constructors

Package |

Fields

- packageTreeKey :: !TreeKey

  The `TreeKey` containing this package.

  This is a hash of the binary representation of `packageTree`.

  Since: 0.1.0.0

- packageTree :: !Tree

  The `Tree` containing this package.

  Since: 0.1.0.0

- packageCabalEntry :: !PackageCabal

  Information on the cabal file inside this package.

  Since: 0.1.0.0

- packageIdent :: !PackageIdentifier

  The package name and version in this package.

  Since: 0.1.0.0

#### Instances

Instances details

Show Package Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> Package -> ShowS Source # show :: Package -> String Source # showList :: [Package] -> ShowS Source #
Eq Package Source # |
Instance details Defined in Pantry.Types Methods (==) :: Package -> Package -> Bool Source # (/=) :: Package -> Package -> Bool Source #
Ord Package Source # |
Instance details Defined in Pantry.Types Methods compare :: Package -> Package -> Ordering Source # (<) :: Package -> Package -> Bool Source # (<=) :: Package -> Package -> Bool Source # (>) :: Package -> Package -> Bool Source # (>=) :: Package -> Package -> Bool Source # max :: Package -> Package -> Package Source # min :: Package -> Package -> Package Source #

data PackageCabal Source #

Constructors

PCCabalFile !TreeEntry | TreeEntry of Cabal file
PCHpack !PHpack |

#### Instances

Instances details

Show PackageCabal Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PackageCabal -> ShowS Source # show :: PackageCabal -> String Source # showList :: [PackageCabal] -> ShowS Source #
Eq PackageCabal Source # |
Instance details Defined in Pantry.Types Methods (==) :: PackageCabal -> PackageCabal -> Bool Source # (/=) :: PackageCabal -> PackageCabal -> Bool Source #
Ord PackageCabal Source # |

Instance details

Defined in Pantry.Types

Methods

compare :: PackageCabal -> PackageCabal -> Ordering Source #

(<) :: PackageCabal -> PackageCabal -> Bool Source #

(<=) :: PackageCabal -> PackageCabal -> Bool Source #

(>) :: PackageCabal -> PackageCabal -> Bool Source #

(>=) :: PackageCabal -> PackageCabal -> Bool Source #

max :: PackageCabal -> PackageCabal -> PackageCabal Source #

min :: PackageCabal -> PackageCabal -> PackageCabal Source #

data PHpack Source #

Constructors

PHpack |

Fields

- phOriginal :: !TreeEntry

  Original hpack file

- phGenerated :: !TreeEntry

  Generated Cabal file

- phVersion :: !Version

  Version of Hpack used

#### Instances

Instances details

Show PHpack Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PHpack -> ShowS Source # show :: PHpack -> String Source # showList :: [PHpack] -> ShowS Source #
Eq PHpack Source # |
Instance details Defined in Pantry.Types Methods (==) :: PHpack -> PHpack -> Bool Source # (/=) :: PHpack -> PHpack -> Bool Source #
Ord PHpack Source # |
Instance details Defined in Pantry.Types Methods compare :: PHpack -> PHpack -> Ordering Source # (<) :: PHpack -> PHpack -> Bool Source # (<=) :: PHpack -> PHpack -> Bool Source # (>) :: PHpack -> PHpack -> Bool Source # (>=) :: PHpack -> PHpack -> Bool Source # max :: PHpack -> PHpack -> PHpack Source # min :: PHpack -> PHpack -> PHpack Source #

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

Instances details

ToJSON RawPackageLocation Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods rnf :: RawPackageLocation -> () Source #
Generic RawPackageLocation Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RawPackageLocation |

Instance details

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))))

Methods

from :: RawPackageLocation -> Rep RawPackageLocation x Source #

to :: Rep RawPackageLocation x -> RawPackageLocation Source #

Show RawPackageLocation Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RawPackageLocation -> ShowS Source # show :: RawPackageLocation -> String Source # showList :: [RawPackageLocation] -> ShowS Source #
Eq RawPackageLocation Source # |
Instance details Defined in Pantry.Types Methods (==) :: RawPackageLocation -> RawPackageLocation -> Bool Source # (/=) :: RawPackageLocation -> RawPackageLocation -> Bool Source #
FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) Source # |
Instance details 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 Source # |

Instance details

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

Instances details

NFData PackageLocation Source # |
Instance details Defined in Pantry.Types Methods rnf :: PackageLocation -> () Source #
Generic PackageLocation Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep PackageLocation |

Instance details

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))))

Methods

from :: PackageLocation -> Rep PackageLocation x Source #

to :: Rep PackageLocation x -> PackageLocation Source #

Show PackageLocation Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PackageLocation -> ShowS Source # show :: PackageLocation -> String Source # showList :: [PackageLocation] -> ShowS Source #
Eq PackageLocation Source # |
Instance details Defined in Pantry.Types Methods (==) :: PackageLocation -> PackageLocation -> Bool Source # (/=) :: PackageLocation -> PackageLocation -> Bool Source #
Display PackageLocation Source # |
Instance details Defined in Pantry.Types Methods display :: PackageLocation -> Utf8Builder Source # textDisplay :: PackageLocation -> Text Source #
type Rep PackageLocation Source # |

Instance details

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

Instances details

ToJSON RawPackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods toJSON :: RawPackageLocationImmutable -> Value Source # toEncoding :: RawPackageLocationImmutable -> Encoding Source # toJSONList :: [RawPackageLocationImmutable] -> Value Source # toEncodingList :: [RawPackageLocationImmutable] -> Encoding Source # omitField :: RawPackageLocationImmutable -> Bool Source #
NFData RawPackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods rnf :: RawPackageLocationImmutable -> () Source #
Generic RawPackageLocationImmutable Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RawPackageLocationImmutable |

Instance details

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))))

Methods

from :: RawPackageLocationImmutable -> Rep RawPackageLocationImmutable x Source #

to :: Rep RawPackageLocationImmutable x -> RawPackageLocationImmutable Source #

Show RawPackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RawPackageLocationImmutable -> ShowS Source # show :: RawPackageLocationImmutable -> String Source # showList :: [RawPackageLocationImmutable] -> ShowS Source #
Eq RawPackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods (==) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source # (/=) :: RawPackageLocationImmutable -> RawPackageLocationImmutable -> Bool Source #
Ord RawPackageLocationImmutable Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: RawPackageLocationImmutable -> Utf8Builder Source # textDisplay :: RawPackageLocationImmutable -> Text Source #
Pretty RawPackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods pretty :: RawPackageLocationImmutable -> StyleDoc Source #
FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) Source # |
Instance details 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 Source # |

Instance details

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

Instances details

ToJSON PackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods toJSON :: PackageLocationImmutable -> Value Source # toEncoding :: PackageLocationImmutable -> Encoding Source # toJSONList :: [PackageLocationImmutable] -> Value Source # toEncodingList :: [PackageLocationImmutable] -> Encoding Source # omitField :: PackageLocationImmutable -> Bool Source #
NFData PackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods rnf :: PackageLocationImmutable -> () Source #
Generic PackageLocationImmutable Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep PackageLocationImmutable |

Instance details

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))))

Methods

from :: PackageLocationImmutable -> Rep PackageLocationImmutable x Source #

to :: Rep PackageLocationImmutable x -> PackageLocationImmutable Source #

Show PackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PackageLocationImmutable -> ShowS Source # show :: PackageLocationImmutable -> String Source # showList :: [PackageLocationImmutable] -> ShowS Source #
Eq PackageLocationImmutable Source # |
Instance details Defined in Pantry.Types Methods (==) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source # (/=) :: PackageLocationImmutable -> PackageLocationImmutable -> Bool Source #
Ord PackageLocationImmutable Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: PackageLocationImmutable -> Utf8Builder Source # textDisplay :: PackageLocationImmutable -> Text Source #
FromJSON (WithJSONWarnings (Unresolved PackageLocationImmutable)) Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved PackageLocationImmutable)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved PackageLocationImmutable)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved PackageLocationImmutable)) Source #
type Rep PackageLocationImmutable Source # |

Instance details

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))))

toRawPLI :: PackageLocationImmutable -> RawPackageLocationImmutable Source #

Convert `PackageLocationImmutable` to its "raw" equivalent

Since: 0.1.0.0

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

- raLocation :: !ArchiveLocation

  Location of the archive

  Since: 0.1.0.0

- raHash :: !(Maybe SHA256)

  Cryptographic hash of the archive file

  Since: 0.1.0.0

- raSize :: !(Maybe FileSize)

  Size of the archive file

  Since: 0.1.0.0

- raSubdir :: !Text

  Subdirectory within the archive to get the package from.

  Since: 0.1.0.0

#### Instances

Instances details

NFData RawArchive Source # |
Instance details Defined in Pantry.Types Methods rnf :: RawArchive -> () Source #
Generic RawArchive Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RawArchive |

Instance details

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))))

Methods

from :: RawArchive -> Rep RawArchive x Source #

to :: Rep RawArchive x -> RawArchive Source #

Show RawArchive Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RawArchive -> ShowS Source # show :: RawArchive -> String Source # showList :: [RawArchive] -> ShowS Source #
Eq RawArchive Source # |
Instance details Defined in Pantry.Types Methods (==) :: RawArchive -> RawArchive -> Bool Source # (/=) :: RawArchive -> RawArchive -> Bool Source #
Ord RawArchive Source # |

Instance details

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 Source # |

Instance details

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))))

data Archive Source #

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

- archiveLocation :: !ArchiveLocation

  Location of the archive

  Since: 0.1.0.0

- archiveHash :: !SHA256

  Cryptographic hash of the archive file

  Since: 0.1.0.0

- archiveSize :: !FileSize

  Size of the archive file

  Since: 0.1.0.0

- archiveSubdir :: !Text

  Subdirectory within the archive to get the package from.

  Since: 0.1.0.0

#### Instances

Instances details

NFData Archive Source # |
Instance details Defined in Pantry.Types Methods rnf :: Archive -> () Source #
Generic Archive Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep Archive |

Instance details

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 'DecidedStrict) (Rec0 FileSize) :*: S1 ('MetaSel ('Just "archiveSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

Methods

from :: Archive -> Rep Archive x Source #

to :: Rep Archive x -> Archive Source #

Show Archive Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> Archive -> ShowS Source # show :: Archive -> String Source # showList :: [Archive] -> ShowS Source #
Eq Archive Source # |
Instance details Defined in Pantry.Types Methods (==) :: Archive -> Archive -> Bool Source # (/=) :: Archive -> Archive -> Bool Source #
Ord Archive Source # |
Instance details Defined in Pantry.Types Methods compare :: Archive -> Archive -> Ordering Source # (<) :: Archive -> Archive -> Bool Source # (<=) :: Archive -> Archive -> Bool Source # (>) :: Archive -> Archive -> Bool Source # (>=) :: Archive -> Archive -> Bool Source # max :: Archive -> Archive -> Archive Source # min :: Archive -> Archive -> Archive Source #
type Rep Archive Source # |

Instance details

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 'DecidedStrict) (Rec0 FileSize) :*: S1 ('MetaSel ('Just "archiveSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

toRawArchive :: Archive -> RawArchive Source #

Convert archive to its "raw" equivalent.

Since: 0.1.0.0

data Repo Source #

Information on packages stored in a source control repository.

Since: 0.1.0.0

Constructors

Repo |

Fields

- repoUrl :: !Text

  Location of the repo

  Since: 0.1.0.0

- repoCommit :: !Text

  Commit to use from the repo. It's strongly recommended to use a hash instead of a tag or branch name.

  Since: 0.1.0.0

- repoType :: !RepoType

  The type of the repo

  Since: 0.1.0.0

- repoSubdir :: !Text

  Subdirectory within the archive to get the package from.

  Since: 0.1.0.0

#### Instances

Instances details

NFData Repo Source # |
Instance details Defined in Pantry.Types Methods rnf :: Repo -> () Source #
Generic Repo Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep Repo |

Instance details

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))))

Methods

from :: Repo -> Rep Repo x Source #

to :: Rep Repo x -> Repo Source #

Show Repo Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> Repo -> ShowS Source # show :: Repo -> String Source # showList :: [Repo] -> ShowS Source #
Eq Repo Source # |
Instance details Defined in Pantry.Types Methods (==) :: Repo -> Repo -> Bool Source # (/=) :: Repo -> Repo -> Bool Source #
Ord Repo Source # |
Instance details Defined in Pantry.Types Methods compare :: Repo -> Repo -> Ordering Source # (<) :: Repo -> Repo -> Bool Source # (<=) :: Repo -> Repo -> Bool Source # (>) :: Repo -> Repo -> Bool Source # (>=) :: Repo -> Repo -> Bool Source # max :: Repo -> Repo -> Repo Source # min :: Repo -> Repo -> Repo Source #
Display Repo Source # |
Instance details Defined in Pantry.Types Methods display :: Repo -> Utf8Builder Source # textDisplay :: Repo -> Text Source #
type Rep Repo Source # |

Instance details

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))))

data AggregateRepo Source #

Constructors

AggregateRepo |

Fields

- aRepo :: !SimpleRepo
- aRepoSubdirs :: [(Text, RawPackageMetadata)]

#### Instances

Instances details

Generic AggregateRepo Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep AggregateRepo |

Instance details

Defined in Pantry.Types

type Rep AggregateRepo = D1 ('MetaData "AggregateRepo" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "AggregateRepo" 'PrefixI 'True) (S1 ('MetaSel ('Just "aRepo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SimpleRepo) :*: S1 ('MetaSel ('Just "aRepoSubdirs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, RawPackageMetadata)])))

Methods

from :: AggregateRepo -> Rep AggregateRepo x Source #

to :: Rep AggregateRepo x -> AggregateRepo Source #

Show AggregateRepo Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> AggregateRepo -> ShowS Source # show :: AggregateRepo -> String Source # showList :: [AggregateRepo] -> ShowS Source #
Eq AggregateRepo Source # |
Instance details Defined in Pantry.Types Methods (==) :: AggregateRepo -> AggregateRepo -> Bool Source # (/=) :: AggregateRepo -> AggregateRepo -> Bool Source #
Ord AggregateRepo Source # |

Instance details

Defined in Pantry.Types

Methods

compare :: AggregateRepo -> AggregateRepo -> Ordering Source #

(<) :: AggregateRepo -> AggregateRepo -> Bool Source #

(<=) :: AggregateRepo -> AggregateRepo -> Bool Source #

(>) :: AggregateRepo -> AggregateRepo -> Bool Source #

(>=) :: AggregateRepo -> AggregateRepo -> Bool Source #

max :: AggregateRepo -> AggregateRepo -> AggregateRepo Source #

min :: AggregateRepo -> AggregateRepo -> AggregateRepo Source #

type Rep AggregateRepo Source # |

Instance details

Defined in Pantry.Types

type Rep AggregateRepo = D1 ('MetaData "AggregateRepo" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "AggregateRepo" 'PrefixI 'True) (S1 ('MetaSel ('Just "aRepo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SimpleRepo) :*: S1 ('MetaSel ('Just "aRepoSubdirs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, RawPackageMetadata)])))

data SimpleRepo Source #

Repository without subdirectory information.

Since: 0.5.3

Constructors

SimpleRepo |

Fields

- sRepoUrl :: !Text
- sRepoCommit :: !Text
- sRepoType :: !RepoType

#### Instances

Instances details

Generic SimpleRepo Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep SimpleRepo |

Instance details

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))))

Methods

from :: SimpleRepo -> Rep SimpleRepo x Source #

to :: Rep SimpleRepo x -> SimpleRepo Source #

Show SimpleRepo Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> SimpleRepo -> ShowS Source # show :: SimpleRepo -> String Source # showList :: [SimpleRepo] -> ShowS Source #
Eq SimpleRepo Source # |
Instance details Defined in Pantry.Types Methods (==) :: SimpleRepo -> SimpleRepo -> Bool Source # (/=) :: SimpleRepo -> SimpleRepo -> Bool Source #
Ord SimpleRepo Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: SimpleRepo -> Utf8Builder Source # textDisplay :: SimpleRepo -> Text Source #
type Rep SimpleRepo Source # |

Instance details

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))))

toAggregateRepos :: [(Repo, RawPackageMetadata)] -> [AggregateRepo] Source #

Group input repositories by non-subdir values.

rToSimpleRepo :: Repo -> SimpleRepo Source #

arToSimpleRepo :: AggregateRepo -> SimpleRepo Source #

data RepoType Source #

The type of a source control repository.

Since: 0.1.0.0

Constructors

RepoGit |
RepoHg |

#### Instances

Instances details

NFData RepoType Source # |
Instance details Defined in Pantry.Types Methods rnf :: RepoType -> () Source #
Generic RepoType Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RepoType |
Instance details Defined in Pantry.Types type Rep RepoType = D1 ('MetaData "RepoType" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "RepoGit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RepoHg" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: RepoType -> Rep RepoType x Source #

to :: Rep RepoType x -> RepoType Source #

Show RepoType Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RepoType -> ShowS Source # show :: RepoType -> String Source # showList :: [RepoType] -> ShowS Source #
Eq RepoType Source # |
Instance details Defined in Pantry.Types Methods (==) :: RepoType -> RepoType -> Bool Source # (/=) :: RepoType -> RepoType -> Bool Source #
Ord RepoType Source # |
Instance details Defined in Pantry.Types Methods compare :: RepoType -> RepoType -> Ordering Source # (<) :: RepoType -> RepoType -> Bool Source # (<=) :: RepoType -> RepoType -> Bool Source # (>) :: RepoType -> RepoType -> Bool Source # (>=) :: RepoType -> RepoType -> Bool Source # max :: RepoType -> RepoType -> RepoType Source # min :: RepoType -> RepoType -> RepoType Source #
PersistField RepoType Source # |
Instance details Defined in Pantry.Types Methods toPersistValue :: RepoType -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text RepoType Source #
PersistFieldSql RepoType Source # |
Instance details Defined in Pantry.Types Methods sqlType :: Proxy RepoType -> SqlType Source #
type Rep RepoType Source # |
Instance details Defined in Pantry.Types type Rep RepoType = D1 ('MetaData "RepoType" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "RepoGit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RepoHg" 'PrefixI 'False) (U1 :: Type -> Type))

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

parseFlagName :: String -> Maybe FlagName Source #

Parse a flag name from a `String`.

Since: 0.1.0.0

parseVersion :: String -> Maybe Version Source #

Parse a version from a `String`.

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

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

flagNameString :: FlagName -> String Source #

Render a flag name as a `String`.

Since: 0.1.0.0

versionString :: Version -> String Source #

Render a version as a `String`.

Since: 0.1.0.0

moduleNameString :: ModuleName -> String Source #

Render a module name as a `String`.

Since: 0.1.0.0

data OptionalSubdirs Source #

Constructors

OSSubdirs !(NonEmpty Text) |
OSPackageMetadata !Text !RawPackageMetadata | subdirectory and package metadata

#### Instances

Instances details

NFData OptionalSubdirs Source # |
Instance details Defined in Pantry.Types Methods rnf :: OptionalSubdirs -> () Source #
Generic OptionalSubdirs Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep OptionalSubdirs |

Instance details

Defined in Pantry.Types

type Rep OptionalSubdirs = D1 ('MetaData "OptionalSubdirs" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "OSSubdirs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty Text))) :+: C1 ('MetaCons "OSPackageMetadata" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawPackageMetadata)))

Methods

from :: OptionalSubdirs -> Rep OptionalSubdirs x Source #

to :: Rep OptionalSubdirs x -> OptionalSubdirs Source #

Show OptionalSubdirs Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> OptionalSubdirs -> ShowS Source # show :: OptionalSubdirs -> String Source # showList :: [OptionalSubdirs] -> ShowS Source #
Eq OptionalSubdirs Source # |
Instance details Defined in Pantry.Types Methods (==) :: OptionalSubdirs -> OptionalSubdirs -> Bool Source # (/=) :: OptionalSubdirs -> OptionalSubdirs -> Bool Source #
type Rep OptionalSubdirs Source # |

Instance details

Defined in Pantry.Types

type Rep OptionalSubdirs = D1 ('MetaData "OptionalSubdirs" "Pantry.Types" "pantry-0.10.1-2ik2JKkudjPJlArEHhlOvR-internal" 'False) (C1 ('MetaCons "OSSubdirs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty Text))) :+: C1 ('MetaCons "OSPackageMetadata" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawPackageMetadata)))

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

Instances details

NFData ArchiveLocation Source # |
Instance details Defined in Pantry.Types Methods rnf :: ArchiveLocation -> () Source #
Generic ArchiveLocation Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep ArchiveLocation |

Instance details

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))))

Methods

from :: ArchiveLocation -> Rep ArchiveLocation x Source #

to :: Rep ArchiveLocation x -> ArchiveLocation Source #

Show ArchiveLocation Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> ArchiveLocation -> ShowS Source # show :: ArchiveLocation -> String Source # showList :: [ArchiveLocation] -> ShowS Source #
Eq ArchiveLocation Source # |
Instance details Defined in Pantry.Types Methods (==) :: ArchiveLocation -> ArchiveLocation -> Bool Source # (/=) :: ArchiveLocation -> ArchiveLocation -> Bool Source #
Ord ArchiveLocation Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: ArchiveLocation -> Utf8Builder Source # textDisplay :: ArchiveLocation -> Text Source #
Pretty ArchiveLocation Source # |
Instance details Defined in Pantry.Types Methods pretty :: ArchiveLocation -> StyleDoc Source #
type Rep ArchiveLocation Source # |

Instance details

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))))

newtype RelFilePath Source #

File path relative to the configuration file it was parsed from

Since: 0.1.0.0

Constructors

RelFilePath Text |

#### Instances

Instances details

FromJSON RelFilePath Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser RelFilePath Source # parseJSONList :: Value -> Parser [RelFilePath] Source # omittedField :: Maybe RelFilePath Source #
ToJSON RelFilePath Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods rnf :: RelFilePath -> () Source #
Generic RelFilePath Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RelFilePath |
Instance details 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)))

Methods

from :: RelFilePath -> Rep RelFilePath x Source #

to :: Rep RelFilePath x -> RelFilePath Source #

Show RelFilePath Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RelFilePath -> ShowS Source # show :: RelFilePath -> String Source # showList :: [RelFilePath] -> ShowS Source #
Eq RelFilePath Source # |
Instance details Defined in Pantry.Types Methods (==) :: RelFilePath -> RelFilePath -> Bool Source # (/=) :: RelFilePath -> RelFilePath -> Bool Source #
Ord RelFilePath Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: RelFilePath -> Utf8Builder Source # textDisplay :: RelFilePath -> Text Source #
type Rep RelFilePath Source # |
Instance details 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)))

newtype CabalString a Source #

Newtype wrapper for easier JSON integration with Cabal types.

Since: 0.1.0.0

Constructors

CabalString |

Fields

- unCabalString :: a

#### Instances

Instances details

IsCabalString a => FromJSON (CabalString a) Source # |
Instance details 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) Source # |
Instance details Defined in Pantry.Types Methods fromJSONKey :: FromJSONKeyFunction (CabalString a) Source # fromJSONKeyList :: FromJSONKeyFunction [CabalString a] Source #
Pretty a => ToJSON (CabalString a) Source # |
Instance details 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) Source # |
Instance details Defined in Pantry.Types Methods toJSONKey :: ToJSONKeyFunction (CabalString a) Source # toJSONKeyList :: ToJSONKeyFunction [CabalString a] Source #
Show a => Show (CabalString a) Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> CabalString a -> ShowS Source # show :: CabalString a -> String Source # showList :: [CabalString a] -> ShowS Source #
Eq a => Eq (CabalString a) Source # |
Instance details Defined in Pantry.Types Methods (==) :: CabalString a -> CabalString a -> Bool Source # (/=) :: CabalString a -> CabalString a -> Bool Source #
Ord a => Ord (CabalString a) Source # |

Instance details

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

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

data Mismatch a Source #

Constructors

Mismatch |

Fields

- mismatchExpected :: !a
- mismatchActual :: !a

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

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) | Different from `DownloadInvalidSize` since `mismatchActual` is a lower bound on the size from the server.
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 |

#### Instances

Instances details

Exception PantryException Source # |
Instance details Defined in Pantry.Types Methods toException :: PantryException -> SomeException Source # fromException :: SomeException -> Maybe PantryException Source # displayException :: PantryException -> String Source # backtraceDesired :: PantryException -> Bool Source #
Show PantryException Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PantryException -> ShowS Source # show :: PantryException -> String Source # showList :: [PantryException] -> ShowS Source #
Display PantryException Source # |
Instance details Defined in Pantry.Types Methods display :: PantryException -> Utf8Builder Source # textDisplay :: PantryException -> Text Source #
Pretty PantryException Source # |
Instance details Defined in Pantry.Types Methods pretty :: PantryException -> StyleDoc Source #

data FuzzyResults Source #

Constructors

FRNameNotFound ![PackageName] |
FRVersionNotFound !(NonEmpty PackageIdentifierRevision) |
FRRevisionNotFound !(NonEmpty PackageIdentifierRevision) |

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

- resolvedRelative :: !RelFilePath

  Original value parsed from a config file.

- resolvedAbsolute :: !(Path Abs t)

  Absolute path resolved against base directory loaded from.

#### Instances

Instances details

NFData (ResolvedPath t) Source # |
Instance details Defined in Pantry.Types Methods rnf :: ResolvedPath t -> () Source #
Generic (ResolvedPath t) Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep (ResolvedPath t) |

Instance details

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))))

Methods

from :: ResolvedPath t -> Rep (ResolvedPath t) x Source #

to :: Rep (ResolvedPath t) x -> ResolvedPath t Source #

Show (ResolvedPath t) Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> ResolvedPath t -> ShowS Source # show :: ResolvedPath t -> String Source # showList :: [ResolvedPath t] -> ShowS Source #
Eq (ResolvedPath t) Source # |
Instance details Defined in Pantry.Types Methods (==) :: ResolvedPath t -> ResolvedPath t -> Bool Source # (/=) :: ResolvedPath t -> ResolvedPath t -> Bool Source #
Ord (ResolvedPath t) Source # |

Instance details

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) Source # |

Instance details

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 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

Instances details

Read HpackExecutable Source # |
Instance details Defined in Pantry.Types Methods readsPrec :: Int -> ReadS HpackExecutable Source # readList :: ReadS [HpackExecutable] Source # readPrec :: ReadPrec HpackExecutable Source # readListPrec :: ReadPrec [HpackExecutable] Source #
Show HpackExecutable Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> HpackExecutable -> ShowS Source # show :: HpackExecutable -> String Source # showList :: [HpackExecutable] -> ShowS Source #
Eq HpackExecutable Source # |
Instance details Defined in Pantry.Types Methods (==) :: HpackExecutable -> HpackExecutable -> Bool Source # (/=) :: HpackExecutable -> HpackExecutable -> Bool Source #
Ord HpackExecutable Source # |

Instance details

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 #

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

Instances details

FromJSON WantedCompiler Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser WantedCompiler Source # parseJSONList :: Value -> Parser [WantedCompiler] Source # omittedField :: Maybe WantedCompiler Source #
FromJSONKey WantedCompiler Source # |
Instance details Defined in Pantry.Types Methods fromJSONKey :: FromJSONKeyFunction WantedCompiler Source # fromJSONKeyList :: FromJSONKeyFunction [WantedCompiler] Source #
ToJSON WantedCompiler Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods rnf :: WantedCompiler -> () Source #
Generic WantedCompiler Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep WantedCompiler |

Instance details

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))))

Methods

from :: WantedCompiler -> Rep WantedCompiler x Source #

to :: Rep WantedCompiler x -> WantedCompiler Source #

Show WantedCompiler Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> WantedCompiler -> ShowS Source # show :: WantedCompiler -> String Source # showList :: [WantedCompiler] -> ShowS Source #
Eq WantedCompiler Source # |
Instance details Defined in Pantry.Types Methods (==) :: WantedCompiler -> WantedCompiler -> Bool Source # (/=) :: WantedCompiler -> WantedCompiler -> Bool Source #
Ord WantedCompiler Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: WantedCompiler -> Utf8Builder Source # textDisplay :: WantedCompiler -> Text Source #
type Rep WantedCompiler Source # |

Instance details

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))))

snapshotLocation :: HasPantryConfig env => SnapName -> RIO env RawSnapshotLocation Source #

Get the location of a snapshot synonym from the `PantryConfig`.

Since: 0.5.0.0

defaultSnapshotLocation :: SnapName -> RawSnapshotLocation Source #

Default location of snapshot synonyms, i.e. commercialhaskell's GitHub repository.

Since: 0.5.0.0

globalHintsLocation :: HasPantryConfig env => WantedCompiler -> RIO env GlobalHintsLocation Source #

Get the location of global hints from the `PantryConfig`.

Since: 0.9.4

defaultGlobalHintsLocation :: WantedCompiler -> GlobalHintsLocation Source #

Default location of global hints, i.e. commercialhaskell's GitHub repository.

Since: 0.9.4

data SnapName Source #

A snapshot synonym. It is expanded according to the field `snapshotLocation` of a `PantryConfig`.

@ since 0.5.0.0

Constructors

LTS |

Fields

- !Int

  Major version

- !Int

  Minor version ^ LTS Haskell snapshot, displayed as `"lts-maj.min"`.

  Since: 0.5.0.0

Nightly !Day | Stackage Nightly snapshot, displayed as `"nighly-YYYY-MM-DD"`. Since: 0.5.0.0

#### Instances

Instances details

ToJSON SnapName Source # |
Instance details Defined in Pantry.Types Methods toJSON :: SnapName -> Value Source # toEncoding :: SnapName -> Encoding Source # toJSONList :: [SnapName] -> Value Source # toEncodingList :: [SnapName] -> Encoding Source # omitField :: SnapName -> Bool Source #
NFData SnapName Source # |
Instance details Defined in Pantry.Types Methods rnf :: SnapName -> () Source #
Generic SnapName Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep SnapName |

Instance details

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 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "Nightly" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Day)))

Methods

from :: SnapName -> Rep SnapName x Source #

to :: Rep SnapName x -> SnapName Source #

Show SnapName Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> SnapName -> ShowS Source # show :: SnapName -> String Source # showList :: [SnapName] -> ShowS Source #
Eq SnapName Source # |
Instance details Defined in Pantry.Types Methods (==) :: SnapName -> SnapName -> Bool Source # (/=) :: SnapName -> SnapName -> Bool Source #
Ord SnapName Source # |
Instance details Defined in Pantry.Types Methods compare :: SnapName -> SnapName -> Ordering Source # (<) :: SnapName -> SnapName -> Bool Source # (<=) :: SnapName -> SnapName -> Bool Source # (>) :: SnapName -> SnapName -> Bool Source # (>=) :: SnapName -> SnapName -> Bool Source # max :: SnapName -> SnapName -> SnapName Source # min :: SnapName -> SnapName -> SnapName Source #
Display SnapName Source # |
Instance details Defined in Pantry.Types Methods display :: SnapName -> Utf8Builder Source # textDisplay :: SnapName -> Text Source #
type Rep SnapName Source # |

Instance details

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 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "Nightly" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Day)))

parseSnapName :: MonadThrow m => Text -> m SnapName Source #

Parse the short representation of a `SnapName`.

Since: 0.5.0.0

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 `BlobKey` is used for reproducibility. 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

Instances details

ToJSON RawSnapshotLocation Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods rnf :: RawSnapshotLocation -> () Source #
Generic RawSnapshotLocation Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RawSnapshotLocation |

Instance details

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))))

Methods

from :: RawSnapshotLocation -> Rep RawSnapshotLocation x Source #

to :: Rep RawSnapshotLocation x -> RawSnapshotLocation Source #

Show RawSnapshotLocation Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RawSnapshotLocation -> ShowS Source # show :: RawSnapshotLocation -> String Source # showList :: [RawSnapshotLocation] -> ShowS Source #
Eq RawSnapshotLocation Source # |
Instance details Defined in Pantry.Types Methods (==) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source # (/=) :: RawSnapshotLocation -> RawSnapshotLocation -> Bool Source #
Ord RawSnapshotLocation Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: RawSnapshotLocation -> Utf8Builder Source # textDisplay :: RawSnapshotLocation -> Text Source #
Pretty RawSnapshotLocation Source # |
Instance details Defined in Pantry.Types Methods pretty :: RawSnapshotLocation -> StyleDoc Source #
FromJSON (WithJSONWarnings (Unresolved RawSnapshotLocation)) Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved RawSnapshotLocation)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved RawSnapshotLocation)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved RawSnapshotLocation)) Source #
type Rep RawSnapshotLocation Source # |

Instance details

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 `BlobKey` is used for reproducibility. Since: 0.1.0.0
SLFilePath !(ResolvedPath File) | Snapshot at a local file path. Since: 0.1.0.0

#### Instances

Instances details

ToJSON SnapshotLocation Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods rnf :: SnapshotLocation -> () Source #
Generic SnapshotLocation Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep SnapshotLocation |

Instance details

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)))))

Methods

from :: SnapshotLocation -> Rep SnapshotLocation x Source #

to :: Rep SnapshotLocation x -> SnapshotLocation Source #

Show SnapshotLocation Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> SnapshotLocation -> ShowS Source # show :: SnapshotLocation -> String Source # showList :: [SnapshotLocation] -> ShowS Source #
Eq SnapshotLocation Source # |
Instance details Defined in Pantry.Types Methods (==) :: SnapshotLocation -> SnapshotLocation -> Bool Source # (/=) :: SnapshotLocation -> SnapshotLocation -> Bool Source #
Ord SnapshotLocation Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: SnapshotLocation -> Utf8Builder Source # textDisplay :: SnapshotLocation -> Text Source #
FromJSON (WithJSONWarnings (Unresolved SnapshotLocation)) Source # |
Instance details 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 Source # |

Instance details

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

parseHackageText :: Text -> Either PantryException (PackageIdentifier, BlobKey) Source #

Parse a hackage text.

Since: 0.1.0.0

parseRawSnapshotLocation :: Text -> Unresolved RawSnapshotLocation Source #

Parse a `Text` into an `Unresolved` `RawSnapshotLocation`.

Since: 0.1.0.0

data RawSnapshotLayer Source #

A single layer of a snapshot, i.e. a specific YAML configuration file.

Since: 0.1.0.0

Constructors

RawSnapshotLayer |

Fields

- rslParent :: !RawSnapshotLocation

  The sl to extend from. This is either a specific compiler, or a `SnapshotLocation` which gives us more information (like packages). Ultimately, we'll end up with a `CompilerVersion`.

  Since: 0.1.0.0

- rslCompiler :: !(Maybe WantedCompiler)

  Override the compiler specified in `slParent`. Must be `Nothing` if using `SLCompiler`.

  Since: 0.1.0.0

- rslLocations :: ![RawPackageLocationImmutable]

  Where to grab all of the packages from.

  Since: 0.1.0.0

- rslDropPackages :: !(Set PackageName)

  Packages present in the parent which should not be included here.

  Since: 0.1.0.0

- rslFlags :: !(Map PackageName (Map FlagName Bool))

  Flag values to override from the defaults

  Since: 0.1.0.0

- rslHidden :: !(Map PackageName Bool)

  Packages which should be hidden when registering. This will affect, for example, the import parser in the script command. We use a `Map` instead of just a `Set` to allow overriding the hidden settings in a parent sl.

  Since: 0.1.0.0

- rslGhcOptions :: !(Map PackageName [Text])

  GHC options per package

  Since: 0.1.0.0

- rslPublishTime :: !(Maybe UTCTime)

  See `slPublishTime`

  Since: 0.1.0.0

#### Instances

Instances details

ToJSON RawSnapshotLayer Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods rnf :: RawSnapshotLayer -> () Source #
Generic RawSnapshotLayer Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RawSnapshotLayer |

Instance details

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))))))

Methods

from :: RawSnapshotLayer -> Rep RawSnapshotLayer x Source #

to :: Rep RawSnapshotLayer x -> RawSnapshotLayer Source #

Show RawSnapshotLayer Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RawSnapshotLayer -> ShowS Source # show :: RawSnapshotLayer -> String Source # showList :: [RawSnapshotLayer] -> ShowS Source #
Eq RawSnapshotLayer Source # |
Instance details Defined in Pantry.Types Methods (==) :: RawSnapshotLayer -> RawSnapshotLayer -> Bool Source # (/=) :: RawSnapshotLayer -> RawSnapshotLayer -> Bool Source #
FromJSON (WithJSONWarnings (Unresolved RawSnapshotLayer)) Source # |
Instance details 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 Source # |

Instance details

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

- slParent :: !SnapshotLocation

  The sl to extend from. This is either a specific compiler, or a `SnapshotLocation` which gives us more information (like packages). Ultimately, we'll end up with a `CompilerVersion`.

  Since: 0.1.0.0

- slCompiler :: !(Maybe WantedCompiler)

  Override the compiler specified in `slParent`. Must be `Nothing` if using `SLCompiler`.

  Since: 0.1.0.0

- slLocations :: ![PackageLocationImmutable]

  Where to grab all of the packages from.

  Since: 0.1.0.0

- slDropPackages :: !(Set PackageName)

  Packages present in the parent which should not be included here.

  Since: 0.1.0.0

- slFlags :: !(Map PackageName (Map FlagName Bool))

  Flag values to override from the defaults

  Since: 0.1.0.0

- slHidden :: !(Map PackageName Bool)

  Packages which should be hidden when registering. This will affect, for example, the import parser in the script command. We use a `Map` instead of just a `Set` to allow overriding the hidden settings in a parent sl.

  Since: 0.1.0.0

- slGhcOptions :: !(Map PackageName [Text])

  GHC options per package

  Since: 0.1.0.0

- slPublishTime :: !(Maybe UTCTime)

  Publication timestamp for this snapshot. This field is optional, and is for informational purposes only.

  Since: 0.1.0.0

#### Instances

Instances details

ToJSON SnapshotLayer Source # |
Instance details 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 Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep SnapshotLayer |

Instance details

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))))))

Methods

from :: SnapshotLayer -> Rep SnapshotLayer x Source #

to :: Rep SnapshotLayer x -> SnapshotLayer Source #

Show SnapshotLayer Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> SnapshotLayer -> ShowS Source # show :: SnapshotLayer -> String Source # showList :: [SnapshotLayer] -> ShowS Source #
Eq SnapshotLayer Source # |
Instance details Defined in Pantry.Types Methods (==) :: SnapshotLayer -> SnapshotLayer -> Bool Source # (/=) :: SnapshotLayer -> SnapshotLayer -> Bool Source #
type Rep SnapshotLayer Source # |

Instance details

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 RawSnapshot Source #

A flattened representation of all the layers in a snapshot.

Since: 0.1.0.0

Constructors

RawSnapshot |

Fields

- rsCompiler :: !WantedCompiler

  The compiler wanted for this snapshot.

- rsPackages :: !(Map PackageName RawSnapshotPackage)

  Packages available in this snapshot for installation. This will be applied on top of any globally available packages.

- rsDrop :: !(Set PackageName)

  Global packages that should be dropped/ignored.

data Snapshot Source #

A flattened representation of all the layers in a snapshot.

Since: 0.1.0.0

Constructors

Snapshot |

Fields

- snapshotCompiler :: !WantedCompiler

  The compiler wanted for this snapshot.

- snapshotPackages :: !(Map PackageName SnapshotPackage)

  Packages available in this snapshot for installation. This will be applied on top of any globally available packages.

- snapshotDrop :: !(Set PackageName)

  Global packages that should be dropped/ignored.

data RawSnapshotPackage Source #

Settings for a package found in a snapshot.

Since: 0.1.0.0

Constructors

RawSnapshotPackage |

Fields

- rspLocation :: !RawPackageLocationImmutable

  Where to get the package from

- rspFlags :: !(Map FlagName Bool)

  Same as `slFlags`

- rspHidden :: !Bool

  Same as `slHidden`

- rspGhcOptions :: ![Text]

  Same as `slGhcOptions`

data SnapshotPackage Source #

Settings for a package found in a snapshot.

Since: 0.1.0.0

Constructors

SnapshotPackage |

Fields

- spLocation :: !PackageLocationImmutable

  Where to get the package from

- spFlags :: !(Map FlagName Bool)

  Same as `slFlags`

- spHidden :: !Bool

  Same as `slHidden`

- spGhcOptions :: ![Text]

  Same as `slGhcOptions`

#### Instances

Instances details

Show SnapshotPackage Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> SnapshotPackage -> ShowS Source # show :: SnapshotPackage -> String Source # showList :: [SnapshotPackage] -> ShowS Source #

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

Instances details

ToJSON GlobalHintsLocation Source # |
Instance details 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 Source # |
Instance details Defined in Pantry.Types Methods rnf :: GlobalHintsLocation -> () Source #
Generic GlobalHintsLocation Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep GlobalHintsLocation |

Instance details

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))))

Methods

from :: GlobalHintsLocation -> Rep GlobalHintsLocation x Source #

to :: Rep GlobalHintsLocation x -> GlobalHintsLocation Source #

Show GlobalHintsLocation Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> GlobalHintsLocation -> ShowS Source # show :: GlobalHintsLocation -> String Source # showList :: [GlobalHintsLocation] -> ShowS Source #
Eq GlobalHintsLocation Source # |
Instance details Defined in Pantry.Types Methods (==) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source # (/=) :: GlobalHintsLocation -> GlobalHintsLocation -> Bool Source #
Ord GlobalHintsLocation Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: GlobalHintsLocation -> Utf8Builder Source # textDisplay :: GlobalHintsLocation -> Text Source #
Pretty GlobalHintsLocation Source # |
Instance details Defined in Pantry.Types Methods pretty :: GlobalHintsLocation -> StyleDoc Source #
FromJSON (WithJSONWarnings (Unresolved GlobalHintsLocation)) Source # |
Instance details Defined in Pantry.Types Methods parseJSON :: Value -> Parser (WithJSONWarnings (Unresolved GlobalHintsLocation)) Source # parseJSONList :: Value -> Parser [WithJSONWarnings (Unresolved GlobalHintsLocation)] Source # omittedField :: Maybe (WithJSONWarnings (Unresolved GlobalHintsLocation)) Source #
type Rep GlobalHintsLocation Source # |

Instance details

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))))

parseGlobalHintsLocation :: Text -> Unresolved GlobalHintsLocation Source #

Parse a `Text` into an `Unresolved` `GlobalHintsLocation`.

Since: 0.9.4

parseWantedCompiler :: Text -> Either PantryException WantedCompiler Source #

Parse a `Text` into a `WantedCompiler` value.

Since: 0.1.0.0

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

- rpmName :: !(Maybe PackageName)

  Package name in the cabal file

  Since: 0.1.0.0

- rpmVersion :: !(Maybe Version)

  Package version in the cabal file

  Since: 0.1.0.0

- rpmTreeKey :: !(Maybe TreeKey)

  Tree key of the loaded up package

  Since: 0.1.0.0

#### Instances

Instances details

NFData RawPackageMetadata Source # |
Instance details Defined in Pantry.Types Methods rnf :: RawPackageMetadata -> () Source #
Generic RawPackageMetadata Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep RawPackageMetadata |

Instance details

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)))))

Methods

from :: RawPackageMetadata -> Rep RawPackageMetadata x Source #

to :: Rep RawPackageMetadata x -> RawPackageMetadata Source #

Show RawPackageMetadata Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> RawPackageMetadata -> ShowS Source # show :: RawPackageMetadata -> String Source # showList :: [RawPackageMetadata] -> ShowS Source #
Eq RawPackageMetadata Source # |
Instance details Defined in Pantry.Types Methods (==) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source # (/=) :: RawPackageMetadata -> RawPackageMetadata -> Bool Source #
Ord RawPackageMetadata Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: RawPackageMetadata -> Utf8Builder Source # textDisplay :: RawPackageMetadata -> Text Source #
type Rep RawPackageMetadata Source # |

Instance details

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

- pmIdent :: !PackageIdentifier

  Package identifier in the cabal file

  Since: 0.1.0.0

- pmTreeKey :: !TreeKey

  Tree key of the loaded up package

  Since: 0.1.0.0

#### Instances

Instances details

NFData PackageMetadata Source # |
Instance details Defined in Pantry.Types Methods rnf :: PackageMetadata -> () Source #
Generic PackageMetadata Source # |

Instance details

Defined in Pantry.Types

Associated Types

type Rep PackageMetadata |

Instance details

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)))

Methods

from :: PackageMetadata -> Rep PackageMetadata x Source #

to :: Rep PackageMetadata x -> PackageMetadata Source #

Show PackageMetadata Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> PackageMetadata -> ShowS Source # show :: PackageMetadata -> String Source # showList :: [PackageMetadata] -> ShowS Source #
Eq PackageMetadata Source # |
Instance details Defined in Pantry.Types Methods (==) :: PackageMetadata -> PackageMetadata -> Bool Source # (/=) :: PackageMetadata -> PackageMetadata -> Bool Source #
Ord PackageMetadata Source # |

Instance details

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 Source # |
Instance details Defined in Pantry.Types Methods display :: PackageMetadata -> Utf8Builder Source # textDisplay :: PackageMetadata -> Text Source #
type Rep PackageMetadata Source # |

Instance details

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)))

toRawPM :: PackageMetadata -> RawPackageMetadata Source #

Convert package metadata to its "raw" equivalent.

Since: 0.1.0.0

cabalFileName :: PackageName -> SafeFilePath Source #

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

- unSnapshotCacheHash :: SHA256

#### Instances

Instances details

Show SnapshotCacheHash Source # |
Instance details Defined in Pantry.Types Methods showsPrec :: Int -> SnapshotCacheHash -> ShowS Source # show :: SnapshotCacheHash -> String Source # showList :: [SnapshotCacheHash] -> ShowS Source #

getGlobalHintsFile :: HasPantryConfig env => RIO env (Path Abs File) Source #

Get the path to the global hints cache file

bsToBlobKey :: ByteString -> BlobKey Source #

Creates BlobKey for an input ByteString

Since: 0.1.0.0

warnMissingCabalFile :: HasLogFunc env => RawPackageLocationImmutable -> RIO env () Source #

Warn if the package uses `PCHpack`.

Since: 0.4.0.0

connRDBMS :: SqlBackend -> Text Source #

A tag displaying what database the `SqlBackend` is for. Can be used to differentiate features in downstream libraries for different database backends.