pantry-0.9.2: Content addressable Haskell package management
Safe HaskellSafe-Inferred
LanguageHaskell2010

Pantry.Internal.Stackage

Description

All types and functions exported from this module are for advanced usage only. They are needed for stackage-server integration with pantry and some are needed for stack testing.

Synopsis

Documentation

packageTreeKey :: Package -> TreeKey #

The TreeKey containing this package.

This is a hash of the binary representation of packageTree.

Since: 0.1.0.0

data Storage #

Represents a SQL database connection.

Constructors

Storage 

Fields

data PantryConfig #

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

newtype PackageNameP #

Constructors

PackageNameP 

Instances

Instances details
FromJSON PackageNameP 
Instance details

Defined in Pantry.Types

FromJSONKey PackageNameP 
Instance details

Defined in Pantry.Types

ToJSON PackageNameP 
Instance details

Defined in Pantry.Types

ToJSONKey PackageNameP 
Instance details

Defined in Pantry.Types

Read PackageNameP 
Instance details

Defined in Pantry.Types

Show PackageNameP 
Instance details

Defined in Pantry.Types

NFData PackageNameP 
Instance details

Defined in Pantry.Types

Methods

rnf :: PackageNameP -> () #

Eq PackageNameP 
Instance details

Defined in Pantry.Types

Ord PackageNameP 
Instance details

Defined in Pantry.Types

PersistField PackageNameP 
Instance details

Defined in Pantry.Types

PersistFieldSql PackageNameP 
Instance details

Defined in Pantry.Types

Display PackageNameP 
Instance details

Defined in Pantry.Types

SymbolToField "name" PackageName PackageNameP Source # 
Instance details

Defined in Pantry.Storage

newtype VersionP #

Constructors

VersionP 

Fields

Instances

Instances details
FromJSON VersionP 
Instance details

Defined in Pantry.Types

ToJSON VersionP 
Instance details

Defined in Pantry.Types

Read VersionP 
Instance details

Defined in Pantry.Types

Show VersionP 
Instance details

Defined in Pantry.Types

NFData VersionP 
Instance details

Defined in Pantry.Types

Methods

rnf :: VersionP -> () #

Eq VersionP 
Instance details

Defined in Pantry.Types

Ord VersionP 
Instance details

Defined in Pantry.Types

PersistField VersionP 
Instance details

Defined in Pantry.Types

PersistFieldSql VersionP 
Instance details

Defined in Pantry.Types

Display VersionP 
Instance details

Defined in Pantry.Types

SymbolToField "version" Version VersionP Source # 
Instance details

Defined in Pantry.Storage

data family Unique record #

Unique keys besides the Key.

Instances

Instances details
data Unique PackageName Source # 
Instance details

Defined in Pantry.Storage

data Unique Tree Source # 
Instance details

Defined in Pantry.Storage

data Unique Version Source # 
Instance details

Defined in Pantry.Storage

data family EntityField record :: Type -> Type #

An EntityField is parameterised by the Haskell record it belongs to and the additional type of that field.

As of persistent-2.11.0.0, it's possible to use the OverloadedLabels language extension to refer to EntityField values polymorphically. See the documentation on SymbolToField for more information.

Instances

Instances details
SymbolToField sym rec typ => IsLabel sym (EntityField rec typ)

This instance delegates to SymbolToField to provide OverloadedLabels support to the EntityField type.

Since: persistent-2.11.0.0

Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

fromLabel :: EntityField rec typ #

data EntityField PackageName typ Source # 
Instance details

Defined in Pantry.Storage

data EntityField Tree typ Source # 
Instance details

Defined in Pantry.Storage

data EntityField Tree typ
data EntityField Version typ Source # 
Instance details

Defined in Pantry.Storage

data family Key record #

By default, a backend will automatically generate the key Instead you can specify a Primary key made up of unique values.

Instances

Instances details
SymbolToField "key" Tree BlobId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "name" Tree PackageNameId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "version" Tree VersionId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "cabal" Tree (Maybe BlobId) Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "id" PackageName (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "id" Tree (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "id" Version (Key Version) Source # 
Instance details

Defined in Pantry.Storage

FromJSON (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

FromJSON (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

FromJSON (Key Version) Source # 
Instance details

Defined in Pantry.Storage

ToJSON (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

ToJSON (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

ToJSON (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Read (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Read (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Read (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Show (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Show (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

showsPrec :: Int -> Key Tree -> ShowS #

show :: Key Tree -> String #

showList :: [Key Tree] -> ShowS #

Show (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Eq (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Eq (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

(==) :: Key Tree -> Key Tree -> Bool #

(/=) :: Key Tree -> Key Tree -> Bool #

Eq (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Ord (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Ord (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

compare :: Key Tree -> Key Tree -> Ordering #

(<) :: Key Tree -> Key Tree -> Bool #

(<=) :: Key Tree -> Key Tree -> Bool #

(>) :: Key Tree -> Key Tree -> Bool #

(>=) :: Key Tree -> Key Tree -> Bool #

max :: Key Tree -> Key Tree -> Key Tree #

min :: Key Tree -> Key Tree -> Key Tree #

Ord (Key Version) Source # 
Instance details

Defined in Pantry.Storage

FromHttpApiData (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

FromHttpApiData (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

FromHttpApiData (Key Version) Source # 
Instance details

Defined in Pantry.Storage

ToHttpApiData (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

ToHttpApiData (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

ToHttpApiData (Key Version) Source # 
Instance details

Defined in Pantry.Storage

PathPiece (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

PathPiece (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

PathPiece (Key Version) Source # 
Instance details

Defined in Pantry.Storage

PersistField (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

PersistField (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

PersistField (Key Version) Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

sqlType :: Proxy (Key Tree) -> SqlType #

PersistFieldSql (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Methods

sqlType :: Proxy (Key Version) -> SqlType #

(PersistEntity a, PersistEntityBackend a ~ backend, IsPersistBackend backend) => RawSql (Key a) 
Instance details

Defined in Database.Persist.Sql.Class

newtype Key PackageName Source # 
Instance details

Defined in Pantry.Storage

newtype Key Tree Source # 
Instance details

Defined in Pantry.Storage

newtype Key Version Source # 
Instance details

Defined in Pantry.Storage

type ModuleNameId = Key ModuleName Source #

type TreeEntryId = Key TreeEntry Source #

data Tree Source #

Instances

Instances details
PersistEntity Tree Source # 
Instance details

Defined in Pantry.Storage

Associated Types

type PersistEntityBackend Tree #

data Key Tree #

data EntityField Tree :: Type -> Type #

data Unique Tree #

SafeToInsert Tree Source # 
Instance details

Defined in Pantry.Storage

PersistField Tree Source # 
Instance details

Defined in Pantry.Storage

AtLeastOneUniqueKey Tree Source # 
Instance details

Defined in Pantry.Storage

OnlyOneUniqueKey Tree Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql Tree Source # 
Instance details

Defined in Pantry.Storage

Methods

sqlType :: Proxy Tree -> SqlType #

ToBackendKey SqlBackend Tree Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "cabalType" Tree FileType Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "key" Tree BlobId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "name" Tree PackageNameId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "version" Tree VersionId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "cabal" Tree (Maybe BlobId) Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "id" Tree (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

FromJSON (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

ToJSON (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Read (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Show (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

showsPrec :: Int -> Key Tree -> ShowS #

show :: Key Tree -> String #

showList :: [Key Tree] -> ShowS #

Eq (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

(==) :: Key Tree -> Key Tree -> Bool #

(/=) :: Key Tree -> Key Tree -> Bool #

Ord (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

compare :: Key Tree -> Key Tree -> Ordering #

(<) :: Key Tree -> Key Tree -> Bool #

(<=) :: Key Tree -> Key Tree -> Bool #

(>) :: Key Tree -> Key Tree -> Bool #

(>=) :: Key Tree -> Key Tree -> Bool #

max :: Key Tree -> Key Tree -> Key Tree #

min :: Key Tree -> Key Tree -> Key Tree #

FromHttpApiData (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

ToHttpApiData (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

PathPiece (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

PersistField (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql (Key Tree) Source # 
Instance details

Defined in Pantry.Storage

Methods

sqlType :: Proxy (Key Tree) -> SqlType #

data EntityField Tree typ Source # 
Instance details

Defined in Pantry.Storage

data EntityField Tree typ
newtype Key Tree Source # 
Instance details

Defined in Pantry.Storage

type PersistEntityBackend Tree Source # 
Instance details

Defined in Pantry.Storage

data Unique Tree Source # 
Instance details

Defined in Pantry.Storage

type HackageCabalId = Key HackageCabal Source #

data Version Source #

Instances

Instances details
PersistEntity Version Source # 
Instance details

Defined in Pantry.Storage

SafeToInsert Version Source # 
Instance details

Defined in Pantry.Storage

PersistField Version Source # 
Instance details

Defined in Pantry.Storage

AtLeastOneUniqueKey Version Source # 
Instance details

Defined in Pantry.Storage

OnlyOneUniqueKey Version Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql Version Source # 
Instance details

Defined in Pantry.Storage

ToBackendKey SqlBackend Version Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "version" Tree VersionId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "version" Version VersionP Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "id" Version (Key Version) Source # 
Instance details

Defined in Pantry.Storage

FromJSON (Key Version) Source # 
Instance details

Defined in Pantry.Storage

ToJSON (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Read (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Show (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Eq (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Ord (Key Version) Source # 
Instance details

Defined in Pantry.Storage

FromHttpApiData (Key Version) Source # 
Instance details

Defined in Pantry.Storage

ToHttpApiData (Key Version) Source # 
Instance details

Defined in Pantry.Storage

PathPiece (Key Version) Source # 
Instance details

Defined in Pantry.Storage

PersistField (Key Version) Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql (Key Version) Source # 
Instance details

Defined in Pantry.Storage

Methods

sqlType :: Proxy (Key Version) -> SqlType #

data EntityField Version typ Source # 
Instance details

Defined in Pantry.Storage

newtype Key Version Source # 
Instance details

Defined in Pantry.Storage

type PersistEntityBackend Version Source # 
Instance details

Defined in Pantry.Storage

data Unique Version Source # 
Instance details

Defined in Pantry.Storage

data PackageName Source #

Instances

Instances details
PersistEntity PackageName Source # 
Instance details

Defined in Pantry.Storage

SafeToInsert PackageName Source # 
Instance details

Defined in Pantry.Storage

PersistField PackageName Source # 
Instance details

Defined in Pantry.Storage

AtLeastOneUniqueKey PackageName Source # 
Instance details

Defined in Pantry.Storage

OnlyOneUniqueKey PackageName Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql PackageName Source # 
Instance details

Defined in Pantry.Storage

ToBackendKey SqlBackend PackageName Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "name" PackageName PackageNameP Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "name" Tree PackageNameId Source # 
Instance details

Defined in Pantry.Storage

SymbolToField "id" PackageName (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

FromJSON (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

ToJSON (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Read (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Show (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Eq (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

Ord (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

FromHttpApiData (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

ToHttpApiData (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

PathPiece (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

PersistField (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

PersistFieldSql (Key PackageName) Source # 
Instance details

Defined in Pantry.Storage

data EntityField PackageName typ Source # 
Instance details

Defined in Pantry.Storage

newtype Key PackageName Source # 
Instance details

Defined in Pantry.Storage

type PersistEntityBackend PackageName Source # 
Instance details

Defined in Pantry.Storage

data Unique PackageName Source # 
Instance details

Defined in Pantry.Storage

type BlobId = Key Blob Source #

allBlobsSource Source #

Arguments

:: HasResourceMap env 
=> Maybe BlobId

For some x, yield blob whose id>x.

-> ConduitT () (BlobId, ByteString) (ReaderT SqlBackend (RIO env)) () 

allHackageCabalRawPackageLocations Source #

Arguments

:: HasResourceMap env 
=> Maybe HackageCabalId

For some x, yield cabals whose id>x.

-> ReaderT SqlBackend (RIO env) (Map HackageCabalId RawPackageLocationImmutable) 

Pull all hackage cabal entries from the database as RawPackageLocationImmutable. We do a manual join rather than dropping to raw SQL, and Esqueleto would add more deps.

data HackageTarballResult Source #

Information returned by getHackageTarball

Since: 0.1.0.0

Constructors

HackageTarballResult 

Fields

forceUpdateHackageIndex :: (HasPantryConfig env, HasLogFunc env) => Maybe Utf8Builder -> RIO env DidUpdateOccur Source #

Same as updateHackageIndex, but force the database update even if hackage security tells that there is no change. This can be useful in order to make sure the database is in sync with the locally downloaded tarball

Since: 0.1.0.0