| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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
- data Version
- data PackageName
- data family Key record
- data family Unique record
- data Tree = Tree {
- treeKey :: !BlobId
- treeCabal :: !(Maybe BlobId)
- treeCabalType :: !FileType
- treeName :: !PackageNameId
- treeVersion :: !VersionId
- data family EntityField record :: Type -> Type
- data SafeFilePath
- newtype ModuleNameP = ModuleNameP {}
- newtype VersionP = VersionP {}
- newtype PackageNameP = PackageNameP {}
- 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 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
- packageTreeKey :: Package -> TreeKey
- unSafeFilePath :: SafeFilePath -> Text
- mkSafeFilePath :: Text -> Maybe SafeFilePath
- getHackageTarball :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageIdentifierRevision -> Maybe TreeKey -> RIO env HackageTarballResult
- data HackageTarballResult = HackageTarballResult {}
- getTreeForKey :: TreeKey -> ReaderT SqlBackend (RIO env) (Maybe (Entity Tree))
- forceUpdateHackageIndex :: (HasPantryConfig env, HasLogFunc env) => Maybe Utf8Builder -> RIO env DidUpdateOccur
- type BlobId = Key Blob
- type HackageCabalId = Key HackageCabal
- type ModuleNameId = Key ModuleName
- type PackageNameId = Key PackageName
- type TreeEntryId = Key TreeEntry
- type TreeId = Key Tree
- type VersionId = Key Version
- allBlobsCount :: Maybe BlobId -> ReaderT SqlBackend (RIO env) Int
- allBlobsSource :: HasResourceMap env => Maybe BlobId -> ConduitT () (BlobId, ByteString) (ReaderT SqlBackend (RIO env)) ()
- allHackageCabalCount :: Maybe HackageCabalId -> ReaderT SqlBackend (RIO env) Int
- allHackageCabalRawPackageLocations :: HasResourceMap env => Maybe HackageCabalId -> ReaderT SqlBackend (RIO env) (Map HackageCabalId RawPackageLocationImmutable)
- getBlobKey :: BlobId -> ReaderT SqlBackend (RIO env) BlobKey
- getPackageNameById :: PackageNameId -> ReaderT SqlBackend (RIO env) (Maybe PackageName)
- getPackageNameId :: PackageName -> ReaderT SqlBackend (RIO env) PackageNameId
- getVersionId :: Version -> ReaderT SqlBackend (RIO env) VersionId
- loadBlobById :: BlobId -> ReaderT SqlBackend (RIO env) ByteString
- migrateAll :: Migration
- storeBlob :: ByteString -> ReaderT SqlBackend (RIO env) (BlobId, BlobKey)
Documentation
Instances
data PackageName Source #
Instances
| PersistEntity PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage Associated Types
Methods keyToValues :: Key PackageName -> [PersistValue] Source # keyFromValues :: [PersistValue] -> Either Text (Key PackageName) Source # persistIdField :: EntityField PackageName (Key PackageName) Source # entityDef :: proxy PackageName -> EntityDef Source # persistFieldDef :: EntityField PackageName typ -> FieldDef Source # toPersistFields :: PackageName -> [PersistValue] Source # fromPersistValues :: [PersistValue] -> Either Text PackageName Source # tabulateEntityA :: Applicative f => (forall a. EntityField PackageName a -> f a) -> f (Entity PackageName) Source # tabulateEntityApply :: Apply f => (forall a. EntityField PackageName a -> f a) -> f (Entity PackageName) Source # persistUniqueKeys :: PackageName -> [Unique PackageName] Source # persistUniqueToFieldNames :: Unique PackageName -> NonEmpty (FieldNameHS, FieldNameDB) Source # persistUniqueToValues :: Unique PackageName -> [PersistValue] Source # fieldLens :: EntityField PackageName field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity PackageName -> f (Entity PackageName) Source # keyFromRecordM :: Maybe (PackageName -> Key PackageName) Source # | |||||||||||||||||
| SafeToInsert PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| PersistField PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toPersistValue :: PackageName -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text PackageName Source # | |||||||||||||||||
| AtLeastOneUniqueKey PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage Methods requireUniquesP :: PackageName -> NonEmpty (Unique PackageName) Source # | |||||||||||||||||
| OnlyOneUniqueKey PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage Methods | |||||||||||||||||
| PersistFieldSql PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| ToBackendKey SqlBackend PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toBackendKey :: Key PackageName -> BackendKey SqlBackend Source # fromBackendKey :: BackendKey SqlBackend -> Key PackageName Source # | |||||||||||||||||
| SymbolToField "name" PackageName PackageNameP Source # | |||||||||||||||||
Defined in Pantry.Storage Methods symbolToField :: EntityField PackageName PackageNameP Source # | |||||||||||||||||
| SymbolToField "name" Tree PackageNameId Source # | |||||||||||||||||
Defined in Pantry.Storage Methods | |||||||||||||||||
| SymbolToField "id" PackageName (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods symbolToField :: EntityField PackageName (Key PackageName) Source # | |||||||||||||||||
| FromJSON (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods parseJSON :: Value -> Parser (Key PackageName) Source # parseJSONList :: Value -> Parser [Key PackageName] Source # omittedField :: Maybe (Key PackageName) Source # | |||||||||||||||||
| ToJSON (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toJSON :: Key PackageName -> Value Source # toEncoding :: Key PackageName -> Encoding Source # toJSONList :: [Key PackageName] -> Value Source # toEncodingList :: [Key PackageName] -> Encoding Source # | |||||||||||||||||
| Read (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| Show (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| Eq (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods (==) :: Key PackageName -> Key PackageName -> Bool Source # (/=) :: Key PackageName -> Key PackageName -> Bool Source # | |||||||||||||||||
| Ord (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods compare :: Key PackageName -> Key PackageName -> Ordering Source # (<) :: Key PackageName -> Key PackageName -> Bool Source # (<=) :: Key PackageName -> Key PackageName -> Bool Source # (>) :: Key PackageName -> Key PackageName -> Bool Source # (>=) :: Key PackageName -> Key PackageName -> Bool Source # max :: Key PackageName -> Key PackageName -> Key PackageName Source # min :: Key PackageName -> Key PackageName -> Key PackageName Source # | |||||||||||||||||
| FromHttpApiData (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods parseUrlPiece :: Text -> Either Text (Key PackageName) parseHeader :: ByteString -> Either Text (Key PackageName) parseQueryParam :: Text -> Either Text (Key PackageName) | |||||||||||||||||
| ToHttpApiData (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toUrlPiece :: Key PackageName -> Text toEncodedUrlPiece :: Key PackageName -> Builder toHeader :: Key PackageName -> ByteString toQueryParam :: Key PackageName -> Text | |||||||||||||||||
| PathPiece (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| PersistField (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toPersistValue :: Key PackageName -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (Key PackageName) Source # | |||||||||||||||||
| PersistFieldSql (Key PackageName) Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| data EntityField PackageName typ Source # | |||||||||||||||||
Defined in Pantry.Storage data EntityField PackageName typ
| |||||||||||||||||
| newtype Key PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| type PersistEntityBackend PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| data Unique PackageName Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
data family Key record Source #
By default, a backend will automatically generate the key Instead you can specify a Primary key made up of unique values.
Instances
| SymbolToField "key" Tree BlobId Source # | |
Defined in Pantry.Storage Methods | |
| SymbolToField "name" Tree PackageNameId Source # | |
Defined in Pantry.Storage Methods | |
| SymbolToField "version" Tree VersionId Source # | |
Defined in Pantry.Storage Methods | |
| SymbolToField "cabal" Tree (Maybe BlobId) Source # | |
Defined in Pantry.Storage Methods | |
| SymbolToField "id" PackageName (Key PackageName) Source # | |
Defined in Pantry.Storage Methods symbolToField :: EntityField PackageName (Key PackageName) Source # | |
| SymbolToField "id" Tree (Key Tree) Source # | |
Defined in Pantry.Storage Methods symbolToField :: EntityField Tree (Key Tree) Source # | |
| SymbolToField "id" Version (Key Version) Source # | |
Defined in Pantry.Storage Methods | |
| FromJSON (Key PackageName) Source # | |
Defined in Pantry.Storage Methods parseJSON :: Value -> Parser (Key PackageName) Source # parseJSONList :: Value -> Parser [Key PackageName] Source # omittedField :: Maybe (Key PackageName) Source # | |
| FromJSON (Key Tree) Source # | |
| FromJSON (Key Version) Source # | |
| ToJSON (Key PackageName) Source # | |
Defined in Pantry.Storage Methods toJSON :: Key PackageName -> Value Source # toEncoding :: Key PackageName -> Encoding Source # toJSONList :: [Key PackageName] -> Value Source # toEncodingList :: [Key PackageName] -> Encoding Source # | |
| ToJSON (Key Tree) Source # | |
| ToJSON (Key Version) Source # | |
| Read (Key PackageName) Source # | |
Defined in Pantry.Storage | |
| Read (Key Tree) Source # | |
| Read (Key Version) Source # | |
| Show (Key PackageName) Source # | |
Defined in Pantry.Storage | |
| Show (Key Tree) Source # | |
| Show (Key Version) Source # | |
| Eq (Key PackageName) Source # | |
Defined in Pantry.Storage Methods (==) :: Key PackageName -> Key PackageName -> Bool Source # (/=) :: Key PackageName -> Key PackageName -> Bool Source # | |
| Eq (Key Tree) Source # | |
| Eq (Key Version) Source # | |
| Ord (Key PackageName) Source # | |
Defined in Pantry.Storage Methods compare :: Key PackageName -> Key PackageName -> Ordering Source # (<) :: Key PackageName -> Key PackageName -> Bool Source # (<=) :: Key PackageName -> Key PackageName -> Bool Source # (>) :: Key PackageName -> Key PackageName -> Bool Source # (>=) :: Key PackageName -> Key PackageName -> Bool Source # max :: Key PackageName -> Key PackageName -> Key PackageName Source # min :: Key PackageName -> Key PackageName -> Key PackageName Source # | |
| Ord (Key Tree) Source # | |
Defined in Pantry.Storage | |
| Ord (Key Version) Source # | |
Defined in Pantry.Storage Methods compare :: Key Version -> Key Version -> Ordering Source # (<) :: Key Version -> Key Version -> Bool Source # (<=) :: Key Version -> Key Version -> Bool Source # (>) :: Key Version -> Key Version -> Bool Source # (>=) :: Key Version -> Key Version -> Bool Source # | |
| FromHttpApiData (Key PackageName) | |
Defined in Pantry.Storage Methods parseUrlPiece :: Text -> Either Text (Key PackageName) parseHeader :: ByteString -> Either Text (Key PackageName) parseQueryParam :: Text -> Either Text (Key PackageName) | |
| FromHttpApiData (Key Tree) | |
Defined in Pantry.Storage Methods parseUrlPiece :: Text -> Either Text (Key Tree) parseHeader :: ByteString -> Either Text (Key Tree) | |
| FromHttpApiData (Key Version) | |
Defined in Pantry.Storage Methods parseUrlPiece :: Text -> Either Text (Key Version) parseHeader :: ByteString -> Either Text (Key Version) | |
| ToHttpApiData (Key PackageName) | |
Defined in Pantry.Storage Methods toUrlPiece :: Key PackageName -> Text toEncodedUrlPiece :: Key PackageName -> Builder toHeader :: Key PackageName -> ByteString toQueryParam :: Key PackageName -> Text | |
| ToHttpApiData (Key Tree) | |
Defined in Pantry.Storage Methods toUrlPiece :: Key Tree -> Text toEncodedUrlPiece :: Key Tree -> Builder toHeader :: Key Tree -> ByteString toQueryParam :: Key Tree -> Text toEncodedQueryParam :: Key Tree -> Builder | |
| ToHttpApiData (Key Version) | |
Defined in Pantry.Storage Methods toUrlPiece :: Key Version -> Text toEncodedUrlPiece :: Key Version -> Builder toHeader :: Key Version -> ByteString toQueryParam :: Key Version -> Text toEncodedQueryParam :: Key Version -> Builder | |
| PathPiece (Key PackageName) | |
Defined in Pantry.Storage | |
| PathPiece (Key Tree) | |
Defined in Pantry.Storage | |
| PathPiece (Key Version) | |
Defined in Pantry.Storage | |
| PersistField (Key PackageName) Source # | |
Defined in Pantry.Storage Methods toPersistValue :: Key PackageName -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (Key PackageName) Source # | |
| PersistField (Key Tree) Source # | |
Defined in Pantry.Storage Methods toPersistValue :: Key Tree -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (Key Tree) Source # | |
| PersistField (Key Version) Source # | |
Defined in Pantry.Storage Methods toPersistValue :: Key Version -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (Key Version) Source # | |
| PersistFieldSql (Key PackageName) Source # | |
Defined in Pantry.Storage | |
| PersistFieldSql (Key Tree) Source # | |
| PersistFieldSql (Key Version) Source # | |
| (PersistEntity a, PersistEntityBackend a ~ backend, IsPersistBackend backend) => RawSql (Key a) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Key a -> (Int, [Text]) Source # rawSqlColCountReason :: Key a -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (Key a) Source # | |
| newtype Key PackageName Source # | |
Defined in Pantry.Storage | |
| newtype Key Tree Source # | |
Defined in Pantry.Storage | |
| newtype Key Version Source # | |
Defined in Pantry.Storage | |
data family Unique record Source #
Unique keys besides the Key.
Instances
| data Unique PackageName Source # | |
Defined in Pantry.Storage | |
| data Unique Tree Source # | |
Defined in Pantry.Storage | |
| data Unique Version Source # | |
Defined in Pantry.Storage | |
Constructors
| Tree | |
Fields
| |
Instances
| PersistEntity Tree Source # | |||||||||||||||||
Defined in Pantry.Storage Associated Types
Methods keyToValues :: Key Tree -> [PersistValue] Source # keyFromValues :: [PersistValue] -> Either Text (Key Tree) Source # persistIdField :: EntityField Tree (Key Tree) Source # entityDef :: proxy Tree -> EntityDef Source # persistFieldDef :: EntityField Tree typ -> FieldDef Source # toPersistFields :: Tree -> [PersistValue] Source # fromPersistValues :: [PersistValue] -> Either Text Tree Source # tabulateEntityA :: Applicative f => (forall a. EntityField Tree a -> f a) -> f (Entity Tree) Source # tabulateEntityApply :: Apply f => (forall a. EntityField Tree a -> f a) -> f (Entity Tree) Source # persistUniqueKeys :: Tree -> [Unique Tree] Source # persistUniqueToFieldNames :: Unique Tree -> NonEmpty (FieldNameHS, FieldNameDB) Source # persistUniqueToValues :: Unique Tree -> [PersistValue] Source # fieldLens :: EntityField Tree field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity Tree -> f (Entity Tree) Source # | |||||||||||||||||
| SafeToInsert Tree Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| PersistField Tree Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toPersistValue :: Tree -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text Tree Source # | |||||||||||||||||
| AtLeastOneUniqueKey Tree Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| OnlyOneUniqueKey Tree Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| PersistFieldSql Tree Source # | |||||||||||||||||
| ToBackendKey SqlBackend Tree Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toBackendKey :: Key Tree -> BackendKey SqlBackend Source # fromBackendKey :: BackendKey SqlBackend -> Key Tree Source # | |||||||||||||||||
| SymbolToField "cabalType" Tree FileType Source # | |||||||||||||||||
Defined in Pantry.Storage Methods | |||||||||||||||||
| SymbolToField "key" Tree BlobId Source # | |||||||||||||||||
Defined in Pantry.Storage Methods | |||||||||||||||||
| SymbolToField "name" Tree PackageNameId Source # | |||||||||||||||||
Defined in Pantry.Storage Methods | |||||||||||||||||
| SymbolToField "version" Tree VersionId Source # | |||||||||||||||||
Defined in Pantry.Storage Methods | |||||||||||||||||
| SymbolToField "cabal" Tree (Maybe BlobId) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods | |||||||||||||||||
| SymbolToField "id" Tree (Key Tree) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods symbolToField :: EntityField Tree (Key Tree) Source # | |||||||||||||||||
| FromJSON (Key Tree) Source # | |||||||||||||||||
| ToJSON (Key Tree) Source # | |||||||||||||||||
| Read (Key Tree) Source # | |||||||||||||||||
| Show (Key Tree) Source # | |||||||||||||||||
| Eq (Key Tree) Source # | |||||||||||||||||
| Ord (Key Tree) Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| FromHttpApiData (Key Tree) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods parseUrlPiece :: Text -> Either Text (Key Tree) parseHeader :: ByteString -> Either Text (Key Tree) | |||||||||||||||||
| ToHttpApiData (Key Tree) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toUrlPiece :: Key Tree -> Text toEncodedUrlPiece :: Key Tree -> Builder toHeader :: Key Tree -> ByteString toQueryParam :: Key Tree -> Text toEncodedQueryParam :: Key Tree -> Builder | |||||||||||||||||
| PathPiece (Key Tree) Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| PersistField (Key Tree) Source # | |||||||||||||||||
Defined in Pantry.Storage Methods toPersistValue :: Key Tree -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (Key Tree) Source # | |||||||||||||||||
| PersistFieldSql (Key Tree) Source # | |||||||||||||||||
| data EntityField Tree typ Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| newtype Key Tree Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| type PersistEntityBackend Tree Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
| data Unique Tree Source # | |||||||||||||||||
Defined in Pantry.Storage | |||||||||||||||||
data family EntityField record :: Type -> Type Source #
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
| SymbolToField sym rec typ => IsLabel sym (EntityField rec typ) | This instance delegates to Since: persistent-2.11.0.0 |
Defined in Database.Persist.Class.PersistEntity Methods fromLabel :: EntityField rec typ Source # | |
| data EntityField PackageName typ Source # | |
Defined in Pantry.Storage data EntityField PackageName typ
| |
| data EntityField Tree typ Source # | |
Defined in Pantry.Storage | |
| data EntityField Version typ Source # | |
Defined in Pantry.Storage | |
data SafeFilePath Source #
Instances
| Show SafeFilePath | |
Defined in Pantry.Types | |
| Eq SafeFilePath | |
Defined in Pantry.Types Methods (==) :: SafeFilePath -> SafeFilePath -> Bool Source # (/=) :: SafeFilePath -> SafeFilePath -> Bool Source # | |
| Ord SafeFilePath | |
Defined in Pantry.Types Methods compare :: SafeFilePath -> SafeFilePath -> Ordering Source # (<) :: SafeFilePath -> SafeFilePath -> Bool Source # (<=) :: SafeFilePath -> SafeFilePath -> Bool Source # (>) :: SafeFilePath -> SafeFilePath -> Bool Source # (>=) :: SafeFilePath -> SafeFilePath -> Bool Source # max :: SafeFilePath -> SafeFilePath -> SafeFilePath Source # min :: SafeFilePath -> SafeFilePath -> SafeFilePath Source # | |
| PersistField SafeFilePath | |
Defined in Pantry.Types Methods toPersistValue :: SafeFilePath -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text SafeFilePath Source # | |
| PersistFieldSql SafeFilePath | |
Defined in Pantry.Types | |
| Display SafeFilePath | |
Defined in Pantry.Types | |
newtype ModuleNameP Source #
Constructors
| ModuleNameP | |
Fields | |
Instances
| NFData ModuleNameP | |
Defined in Pantry.Types Methods rnf :: ModuleNameP -> () Source # | |
| Show ModuleNameP | |
Defined in Pantry.Types | |
| Eq ModuleNameP | |
Defined in Pantry.Types Methods (==) :: ModuleNameP -> ModuleNameP -> Bool Source # (/=) :: ModuleNameP -> ModuleNameP -> Bool Source # | |
| Ord ModuleNameP | |
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 | |
Defined in Pantry.Types Methods toPersistValue :: ModuleNameP -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text ModuleNameP Source # | |
| PersistFieldSql ModuleNameP | |
Defined in Pantry.Types | |
| Display ModuleNameP | |
Defined in Pantry.Types | |
Constructors
| VersionP | |
Fields | |
Instances
| FromJSON VersionP | |
| ToJSON VersionP | |
| NFData VersionP | |
Defined in Pantry.Types | |
| Read VersionP | |
| Show VersionP | |
| Eq VersionP | |
| Ord VersionP | |
Defined in Pantry.Types | |
| PersistField VersionP | |
Defined in Pantry.Types Methods toPersistValue :: VersionP -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text VersionP Source # | |
| PersistFieldSql VersionP | |
| Display VersionP | |
Defined in Pantry.Types | |
| SymbolToField "version" Version VersionP Source # | |
Defined in Pantry.Storage Methods | |
newtype PackageNameP Source #
Constructors
| PackageNameP | |
Fields | |
Instances
| FromJSON PackageNameP | |
Defined in Pantry.Types Methods parseJSON :: Value -> Parser PackageNameP Source # parseJSONList :: Value -> Parser [PackageNameP] Source # | |
| FromJSONKey PackageNameP | |
Defined in Pantry.Types | |
| ToJSON PackageNameP | |
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 | |
Defined in Pantry.Types | |
| NFData PackageNameP | |
Defined in Pantry.Types Methods rnf :: PackageNameP -> () Source # | |
| Read PackageNameP | |
Defined in Pantry.Types | |
| Show PackageNameP | |
Defined in Pantry.Types | |
| Eq PackageNameP | |
Defined in Pantry.Types Methods (==) :: PackageNameP -> PackageNameP -> Bool Source # (/=) :: PackageNameP -> PackageNameP -> Bool Source # | |
| Ord PackageNameP | |
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 | |
Defined in Pantry.Types Methods toPersistValue :: PackageNameP -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text PackageNameP Source # | |
| PersistFieldSql PackageNameP | |
Defined in Pantry.Types | |
| Display PackageNameP | |
Defined in Pantry.Types | |
| SymbolToField "name" PackageName PackageNameP Source # | |
Defined in Pantry.Storage Methods symbolToField :: EntityField PackageName PackageNameP Source # | |
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
| |
Represents a SQL database connection.
Constructors
| Storage | |
Fields
| |
packageTreeKey :: Package -> TreeKey Source #
The TreeKey containing this package.
This is a hash of the binary representation of packageTree.
Since: 0.1.0.0
unSafeFilePath :: SafeFilePath -> Text Source #
mkSafeFilePath :: Text -> Maybe SafeFilePath Source #
getHackageTarball :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageIdentifierRevision -> Maybe TreeKey -> RIO env HackageTarballResult Source #
data HackageTarballResult Source #
Information returned by getHackageTarball
Since: 0.1.0.0
Constructors
| HackageTarballResult | |
Fields
| |
getTreeForKey :: TreeKey -> ReaderT SqlBackend (RIO env) (Maybe (Entity Tree)) Source #
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
type HackageCabalId = Key HackageCabal Source #
type ModuleNameId = Key ModuleName Source #
type PackageNameId = Key PackageName Source #
type TreeEntryId = Key TreeEntry Source #
allBlobsCount :: Maybe BlobId -> ReaderT SqlBackend (RIO env) Int Source #
Arguments
| :: HasResourceMap env | |
| => Maybe BlobId | For some x, yield blob whose id>x. |
| -> ConduitT () (BlobId, ByteString) (ReaderT SqlBackend (RIO env)) () |
allHackageCabalCount :: Maybe HackageCabalId -> ReaderT SqlBackend (RIO env) Int Source #
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.
getBlobKey :: BlobId -> ReaderT SqlBackend (RIO env) BlobKey Source #
getPackageNameById :: PackageNameId -> ReaderT SqlBackend (RIO env) (Maybe PackageName) Source #
getPackageNameId :: PackageName -> ReaderT SqlBackend (RIO env) PackageNameId Source #
getVersionId :: Version -> ReaderT SqlBackend (RIO env) VersionId Source #
loadBlobById :: BlobId -> ReaderT SqlBackend (RIO env) ByteString Source #
storeBlob :: ByteString -> ReaderT SqlBackend (RIO env) (BlobId, BlobKey) Source #