Safe Haskell | None |
---|---|
Language | Haskell2010 |
Stack.Types.PackageIndex
Synopsis
- data PackageDownload = PackageDownload {
- pdSHA256 :: !StaticSHA256
- pdUrl :: !ByteString
- pdSize :: !Word64
- newtype HSPackageDownload = HSPackageDownload {}
- newtype PackageCache index = PackageCache (HashMap PackageName (HashMap Version (index, Maybe PackageDownload, NonEmpty ([CabalHash], OffsetSize))))
- data OffsetSize = OffsetSize !Int64 !Int64
- data PackageIndex = PackageIndex {
- indexName :: !IndexName
- indexLocation :: !Text
- indexType :: !IndexType
- indexDownloadPrefix :: !Text
- indexRequireHashes :: !Bool
- newtype IndexName = IndexName {}
- indexNameText :: IndexName -> Text
- data IndexType
- data HackageSecurity = HackageSecurity {
- hsKeyIds :: ![Text]
- hsKeyThreshold :: !Int
Documentation
data PackageDownload #
Constructors
PackageDownload | |
Fields
|
Instances
newtype HSPackageDownload #
Hackage Security provides a different JSON format, we'll have our own JSON parser for it.
Constructors
HSPackageDownload | |
Fields |
Instances
FromJSON HSPackageDownload # | |
Defined in Stack.Types.PackageIndex Methods parseJSON :: Value -> Parser HSPackageDownload # parseJSONList :: Value -> Parser [HSPackageDownload] # |
newtype PackageCache index #
Cached information about packages in an index. We have a mapping from package name to a version map. Within the version map, we map from the version to information on an individual version. Each version has optional download information (about the package's tarball itself), and cabal file information. The cabal file information is a non-empty list of all cabal file revisions. Each file revision indicates the hash of the contents of the cabal file, and the offset into the index tarball.
It's assumed that cabal files appear in the index tarball in the correct revision order.
Constructors
PackageCache (HashMap PackageName (HashMap Version (index, Maybe PackageDownload, NonEmpty ([CabalHash], OffsetSize)))) |
Instances
Eq index => Eq (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Methods (==) :: PackageCache index -> PackageCache index -> Bool # (/=) :: PackageCache index -> PackageCache index -> Bool # | |
Data index => Data (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageCache index -> c (PackageCache index) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (PackageCache index) # toConstr :: PackageCache index -> Constr # dataTypeOf :: PackageCache index -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (PackageCache index)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (PackageCache index)) # gmapT :: (forall b. Data b => b -> b) -> PackageCache index -> PackageCache index # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageCache index -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageCache index -> r # gmapQ :: (forall d. Data d => d -> u) -> PackageCache index -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageCache index -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageCache index -> m (PackageCache index) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageCache index -> m (PackageCache index) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageCache index -> m (PackageCache index) # | |
Show index => Show (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Methods showsPrec :: Int -> PackageCache index -> ShowS # show :: PackageCache index -> String # showList :: [PackageCache index] -> ShowS # | |
Generic (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Associated Types type Rep (PackageCache index) :: * -> * # Methods from :: PackageCache index -> Rep (PackageCache index) x # to :: Rep (PackageCache index) x -> PackageCache index # | |
Semigroup (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Methods (<>) :: PackageCache index -> PackageCache index -> PackageCache index # sconcat :: NonEmpty (PackageCache index) -> PackageCache index # stimes :: Integral b => b -> PackageCache index -> PackageCache index # | |
Monoid (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Methods mempty :: PackageCache index # mappend :: PackageCache index -> PackageCache index -> PackageCache index # mconcat :: [PackageCache index] -> PackageCache index # | |
NFData index => NFData (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Methods rnf :: PackageCache index -> () # | |
Store index => Store (PackageCache index) # | |
Defined in Stack.Types.PackageIndex Methods size :: Size (PackageCache index) # poke :: PackageCache index -> Poke () # peek :: Peek (PackageCache index) # | |
type Rep (PackageCache index) # | |
Defined in Stack.Types.PackageIndex type Rep (PackageCache index) = D1 (MetaData "PackageCache" "Stack.Types.PackageIndex" "stack-1.7.1-79VQHXRBDVUIQMpSmzqhhb" True) (C1 (MetaCons "PackageCache" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HashMap PackageName (HashMap Version (index, Maybe PackageDownload, NonEmpty ([CabalHash], OffsetSize))))))) |
data OffsetSize #
offset in bytes into the 01-index.tar file for the .cabal file contents, and size in bytes of the .cabal file
Constructors
OffsetSize !Int64 !Int64 |
Instances
Eq OffsetSize # | |
Defined in Stack.Types.PackageIndex | |
Data OffsetSize # | |
Defined in Stack.Types.PackageIndex Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OffsetSize -> c OffsetSize # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OffsetSize # toConstr :: OffsetSize -> Constr # dataTypeOf :: OffsetSize -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OffsetSize) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OffsetSize) # gmapT :: (forall b. Data b => b -> b) -> OffsetSize -> OffsetSize # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OffsetSize -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OffsetSize -> r # gmapQ :: (forall d. Data d => d -> u) -> OffsetSize -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OffsetSize -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OffsetSize -> m OffsetSize # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OffsetSize -> m OffsetSize # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OffsetSize -> m OffsetSize # | |
Show OffsetSize # | |
Defined in Stack.Types.PackageIndex Methods showsPrec :: Int -> OffsetSize -> ShowS # show :: OffsetSize -> String # showList :: [OffsetSize] -> ShowS # | |
Generic OffsetSize # | |
Defined in Stack.Types.PackageIndex Associated Types type Rep OffsetSize :: * -> * # | |
NFData OffsetSize # | |
Defined in Stack.Types.PackageIndex Methods rnf :: OffsetSize -> () # | |
Store OffsetSize # | |
Defined in Stack.Types.PackageIndex | |
type Rep OffsetSize # | |
Defined in Stack.Types.PackageIndex type Rep OffsetSize = D1 (MetaData "OffsetSize" "Stack.Types.PackageIndex" "stack-1.7.1-79VQHXRBDVUIQMpSmzqhhb" False) (C1 (MetaCons "OffsetSize" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int64) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int64))) |
PackageIndex, IndexName & IndexLocation
data PackageIndex #
Information on a single package index
Constructors
PackageIndex | |
Fields
|
Instances
Show PackageIndex # | |
Defined in Stack.Types.PackageIndex Methods showsPrec :: Int -> PackageIndex -> ShowS # show :: PackageIndex -> String # showList :: [PackageIndex] -> ShowS # | |
FromJSON (WithJSONWarnings PackageIndex) # | |
Defined in Stack.Types.PackageIndex Methods parseJSON :: Value -> Parser (WithJSONWarnings PackageIndex) # parseJSONList :: Value -> Parser [WithJSONWarnings PackageIndex] # |
Unique name for a package index
Constructors
IndexName | |
Fields |
Instances
Eq IndexName # | |
Ord IndexName # | |
Show IndexName # | |
Hashable IndexName # | |
Defined in Stack.Types.PackageIndex | |
ToJSON IndexName # | |
Defined in Stack.Types.PackageIndex | |
FromJSON IndexName # | |
Store IndexName # | |
indexNameText :: IndexName -> Text #
Constructors
ITHackageSecurity !HackageSecurity | |
ITVanilla |
Instances
Eq IndexType # | |
Ord IndexType # | |
Show IndexType # | |
data HackageSecurity #
Constructors
HackageSecurity | |
Fields
|
Instances
Eq HackageSecurity # | |
Defined in Stack.Types.PackageIndex Methods (==) :: HackageSecurity -> HackageSecurity -> Bool # (/=) :: HackageSecurity -> HackageSecurity -> Bool # | |
Ord HackageSecurity # | |
Defined in Stack.Types.PackageIndex Methods compare :: HackageSecurity -> HackageSecurity -> Ordering # (<) :: HackageSecurity -> HackageSecurity -> Bool # (<=) :: HackageSecurity -> HackageSecurity -> Bool # (>) :: HackageSecurity -> HackageSecurity -> Bool # (>=) :: HackageSecurity -> HackageSecurity -> Bool # max :: HackageSecurity -> HackageSecurity -> HackageSecurity # min :: HackageSecurity -> HackageSecurity -> HackageSecurity # | |
Show HackageSecurity # | |
Defined in Stack.Types.PackageIndex Methods showsPrec :: Int -> HackageSecurity -> ShowS # show :: HackageSecurity -> String # showList :: [HackageSecurity] -> ShowS # | |
FromJSON HackageSecurity # | |
Defined in Stack.Types.PackageIndex Methods parseJSON :: Value -> Parser HackageSecurity # parseJSONList :: Value -> Parser [HackageSecurity] # |