| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Mirror.Documents
Description
A durable mirror format's operations over its managed documents. Each adapter declares them, so the mirror view restores and assembles retained versions without naming a format.
Synopsis
- data MirrorDocuments = MirrorDocuments {
- mdRestore :: MirrorVersion -> [Artifact] -> Maybe VersionDoc
- mdOrder :: [(Text, VersionDoc)] -> [(Text, VersionDoc)]
- mdEntryKey :: Int -> EntryKey
- mdRekey :: (EntryKey -> EntryKey) -> CachedDoc -> Maybe CachedDoc
- mdAssemble :: ProjectMirrorRecord -> [VersionDoc] -> CachedDoc
- restoreFragments :: (Int -> EntryKey) -> (MirrorReadData -> Maybe (source, Map EntryKey entry)) -> MirrorVersion -> [Artifact] -> Maybe (NonEmpty (PackageDetails, source, NonEmpty (Artifact, entry)))
Documentation
data MirrorDocuments Source #
Restore, ordering and assembly of one format's managed mirror documents.
Constructors
| MirrorDocuments | |
Fields
| |
restoreFragments :: (Int -> EntryKey) -> (MirrorReadData -> Maybe (source, Map EntryKey entry)) -> MirrorVersion -> [Artifact] -> Maybe (NonEmpty (PackageDetails, source, NonEmpty (Artifact, entry))) Source #
Pair each fragment's retained entries with the current target file of the same name, numbering artifacts across fragments.