Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Base64Bytes = Base64Bytes ByteString
- newtype RepoInfo = RepoInfo {
- unRepoInfo :: Text
- data Path = Path {}
- pathRepoInfo :: Path -> RepoInfo
- pathCodebasePath :: Path -> [Text]
- data Entity text noSyncHash hash
- = TC (TermComponent text hash)
- | DC (DeclComponent text hash)
- | P (Patch text noSyncHash hash)
- | PD (PatchDiff text noSyncHash hash)
- | N (Namespace text hash)
- | ND (NamespaceDiff text hash)
- | C (Causal hash)
- data TermComponent text hash = TermComponent [(LocalIds text hash, ByteString)]
- data DeclComponent text hash = DeclComponent [(LocalIds text hash, ByteString)]
- data Patch text oldHash newHash = Patch {
- textLookup :: [text]
- oldHashLookup :: [oldHash]
- newHashLookup :: [newHash]
- bytes :: ByteString
- data PatchDiff text oldHash hash = PatchDiff {
- parent :: hash
- textLookup :: [text]
- oldHashLookup :: [oldHash]
- newHashLookup :: [hash]
- bytes :: ByteString
- data Namespace text hash = Namespace {
- textLookup :: [text]
- defnLookup :: [hash]
- patchLookup :: [hash]
- childLookup :: [(hash, hash)]
- bytes :: LocalBranchBytes
- data NamespaceDiff text hash = NamespaceDiff {
- parent :: hash
- textLookup :: [text]
- defnLookup :: [hash]
- patchLookup :: [hash]
- childLookup :: [(hash, hash)]
- bytes :: LocalBranchBytes
- data Causal hash = Causal {
- namespaceHash :: hash
- parents :: Set hash
- data LocalIds text hash = LocalIds {}
- entityDependencies :: Ord hash => Entity text noSyncHash hash -> Set hash
- data EntityType
- entityHashes_ :: (Applicative m, Ord hash') => (hash -> m hash') -> Entity text noSyncHash hash -> m (Entity text noSyncHash hash')
- patchOldHashes_ :: Applicative m => (oldHash -> m oldHash') -> Patch text oldHash newHash -> m (Patch text oldHash' newHash)
- patchNewHashes_ :: Applicative m => (newHash -> m newHash') -> Patch text oldHash newHash -> m (Patch text oldHash newHash')
- patchDiffHashes_ :: Applicative m => (hash -> m hash') -> PatchDiff text noSyncHash hash -> m (PatchDiff text noSyncHash hash')
- namespaceDiffHashes_ :: Applicative m => (hash -> m hash') -> NamespaceDiff text hash -> m (NamespaceDiff text hash')
- causalHashes_ :: (Applicative m, Ord hash') => (hash -> m hash') -> Causal hash -> m (Causal hash')
- newtype GetCausalHashByPathRequest = GetCausalHashByPathRequest {}
- data GetCausalHashByPathResponse
- data DownloadEntitiesRequest = DownloadEntitiesRequest {}
- data DownloadEntitiesResponse
- data DownloadEntitiesError
- data UploadEntitiesRequest = UploadEntitiesRequest {}
- data UploadEntitiesResponse
- data UploadEntitiesError
- = UploadEntitiesError'EntityValidationFailure EntityValidationError
- | UploadEntitiesError'HashMismatchForEntity HashMismatchForEntity
- | UploadEntitiesError'InvalidRepoInfo Text RepoInfo
- | UploadEntitiesError'NeedDependencies (NeedDependencies Hash32)
- | UploadEntitiesError'NoWritePermission RepoInfo
- | UploadEntitiesError'ProjectNotFound Text
- | UploadEntitiesError'UserNotFound Text
- data HashMismatchForEntity = HashMismatchForEntity {}
- data InvalidParentage = InvalidParentage {}
- data NeedDependencies hash = NeedDependencies {
- missingDependencies :: NESet hash
- data EntityValidationError
Misc. types
newtype Base64Bytes Source #
A newtype for JSON encoding binary data.
Instances
FromJSON Base64Bytes Source # | |
Defined in Unison.Sync.Types parseJSON :: Value -> Parser Base64Bytes # parseJSONList :: Value -> Parser [Base64Bytes] # | |
ToJSON Base64Bytes Source # | |
Defined in Unison.Sync.Types toJSON :: Base64Bytes -> Value # toEncoding :: Base64Bytes -> Encoding # toJSONList :: [Base64Bytes] -> Value # toEncodingList :: [Base64Bytes] -> Encoding # |
pathRepoInfo :: Path -> RepoInfo Source #
Convert a path like arya.public.mystuff to a "repo info" by treating the first segment as a user handle.
pathCodebasePath :: Path -> [Text] Source #
Entity types
data Entity text noSyncHash hash Source #
TC (TermComponent text hash) | |
DC (DeclComponent text hash) | |
P (Patch text noSyncHash hash) | |
PD (PatchDiff text noSyncHash hash) | |
N (Namespace text hash) | |
ND (NamespaceDiff text hash) | |
C (Causal hash) |
Instances
(FromJSON text, FromJSON noSyncHash, FromJSON hash, Ord hash) => FromJSON (Entity text noSyncHash hash) Source # | |
(ToJSON text, ToJSON noSyncHash, ToJSON hash) => ToJSON (Entity text noSyncHash hash) Source # | |
Defined in Unison.Sync.Types | |
(Show text, Show noSyncHash, Show hash) => Show (Entity text noSyncHash hash) Source # | |
(Eq text, Eq noSyncHash, Eq hash) => Eq (Entity text noSyncHash hash) Source # | |
(Ord text, Ord noSyncHash, Ord hash) => Ord (Entity text noSyncHash hash) Source # | |
Defined in Unison.Sync.Types compare :: Entity text noSyncHash hash -> Entity text noSyncHash hash -> Ordering # (<) :: Entity text noSyncHash hash -> Entity text noSyncHash hash -> Bool # (<=) :: Entity text noSyncHash hash -> Entity text noSyncHash hash -> Bool # (>) :: Entity text noSyncHash hash -> Entity text noSyncHash hash -> Bool # (>=) :: Entity text noSyncHash hash -> Entity text noSyncHash hash -> Bool # max :: Entity text noSyncHash hash -> Entity text noSyncHash hash -> Entity text noSyncHash hash # min :: Entity text noSyncHash hash -> Entity text noSyncHash hash -> Entity text noSyncHash hash # |
data TermComponent text hash Source #
TermComponent [(LocalIds text hash, ByteString)] |
Instances
data DeclComponent text hash Source #
DeclComponent [(LocalIds text hash, ByteString)] |
Instances
data Patch text oldHash newHash Source #
Patch | |
|
Instances
(FromJSON text, FromJSON oldHash, FromJSON newHash) => FromJSON (Patch text oldHash newHash) Source # | |
(ToJSON text, ToJSON oldHash, ToJSON newHash) => ToJSON (Patch text oldHash newHash) Source # | |
Defined in Unison.Sync.Types | |
(Show text, Show oldHash, Show newHash) => Show (Patch text oldHash newHash) Source # | |
(Eq text, Eq oldHash, Eq newHash) => Eq (Patch text oldHash newHash) Source # | |
(Ord text, Ord oldHash, Ord newHash) => Ord (Patch text oldHash newHash) Source # | |
Defined in Unison.Sync.Types compare :: Patch text oldHash newHash -> Patch text oldHash newHash -> Ordering # (<) :: Patch text oldHash newHash -> Patch text oldHash newHash -> Bool # (<=) :: Patch text oldHash newHash -> Patch text oldHash newHash -> Bool # (>) :: Patch text oldHash newHash -> Patch text oldHash newHash -> Bool # (>=) :: Patch text oldHash newHash -> Patch text oldHash newHash -> Bool # max :: Patch text oldHash newHash -> Patch text oldHash newHash -> Patch text oldHash newHash # min :: Patch text oldHash newHash -> Patch text oldHash newHash -> Patch text oldHash newHash # |
data PatchDiff text oldHash hash Source #
PatchDiff | |
|
Instances
(FromJSON text, FromJSON oldHash, FromJSON hash) => FromJSON (PatchDiff text oldHash hash) Source # | |
(ToJSON text, ToJSON oldHash, ToJSON hash) => ToJSON (PatchDiff text oldHash hash) Source # | |
Defined in Unison.Sync.Types | |
(Show hash, Show text, Show oldHash) => Show (PatchDiff text oldHash hash) Source # | |
(Eq hash, Eq text, Eq oldHash) => Eq (PatchDiff text oldHash hash) Source # | |
(Ord hash, Ord text, Ord oldHash) => Ord (PatchDiff text oldHash hash) Source # | |
Defined in Unison.Sync.Types compare :: PatchDiff text oldHash hash -> PatchDiff text oldHash hash -> Ordering # (<) :: PatchDiff text oldHash hash -> PatchDiff text oldHash hash -> Bool # (<=) :: PatchDiff text oldHash hash -> PatchDiff text oldHash hash -> Bool # (>) :: PatchDiff text oldHash hash -> PatchDiff text oldHash hash -> Bool # (>=) :: PatchDiff text oldHash hash -> PatchDiff text oldHash hash -> Bool # max :: PatchDiff text oldHash hash -> PatchDiff text oldHash hash -> PatchDiff text oldHash hash # min :: PatchDiff text oldHash hash -> PatchDiff text oldHash hash -> PatchDiff text oldHash hash # |
data Namespace text hash Source #
Namespace | |
|
Instances
data NamespaceDiff text hash Source #
NamespaceDiff | |
|
Instances
Causal | |
|
Instances
(FromJSON hash, Ord hash) => FromJSON (Causal hash) Source # | |
ToJSON hash => ToJSON (Causal hash) Source # | |
Defined in Unison.Sync.Types | |
Show hash => Show (Causal hash) Source # | |
Eq hash => Eq (Causal hash) Source # | |
Ord hash => Ord (Causal hash) Source # | |
Defined in Unison.Sync.Types |
data LocalIds text hash Source #
Instances
Bifoldable LocalIds Source # | |
Bifunctor LocalIds Source # | |
Bitraversable LocalIds Source # | |
Defined in Unison.Sync.Types bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> LocalIds a b -> f (LocalIds c d) # | |
Functor (LocalIds text) Source # | |
(FromJSON text, FromJSON hash) => FromJSON (LocalIds text hash) Source # | |
(ToJSON text, ToJSON hash) => ToJSON (LocalIds text hash) Source # | |
Defined in Unison.Sync.Types | |
(Show text, Show hash) => Show (LocalIds text hash) Source # | |
(Eq text, Eq hash) => Eq (LocalIds text hash) Source # | |
(Ord text, Ord hash) => Ord (LocalIds text hash) Source # | |
Defined in Unison.Sync.Types compare :: LocalIds text hash -> LocalIds text hash -> Ordering # (<) :: LocalIds text hash -> LocalIds text hash -> Bool # (<=) :: LocalIds text hash -> LocalIds text hash -> Bool # (>) :: LocalIds text hash -> LocalIds text hash -> Bool # (>=) :: LocalIds text hash -> LocalIds text hash -> Bool # max :: LocalIds text hash -> LocalIds text hash -> LocalIds text hash # min :: LocalIds text hash -> LocalIds text hash -> LocalIds text hash # |
entityDependencies :: Ord hash => Entity text noSyncHash hash -> Set hash Source #
Get the direct dependencies of an entity (which are actually sync'd).
FIXME use generic-lens here? (typed @hash)
data EntityType Source #
TermComponentType | |
DeclComponentType | |
PatchType | |
PatchDiffType | |
NamespaceType | |
NamespaceDiffType | |
CausalType |
Instances
Entity Traversals
entityHashes_ :: (Applicative m, Ord hash') => (hash -> m hash') -> Entity text noSyncHash hash -> m (Entity text noSyncHash hash') Source #
patchOldHashes_ :: Applicative m => (oldHash -> m oldHash') -> Patch text oldHash newHash -> m (Patch text oldHash' newHash) Source #
patchNewHashes_ :: Applicative m => (newHash -> m newHash') -> Patch text oldHash newHash -> m (Patch text oldHash newHash') Source #
patchDiffHashes_ :: Applicative m => (hash -> m hash') -> PatchDiff text noSyncHash hash -> m (PatchDiff text noSyncHash hash') Source #
namespaceDiffHashes_ :: Applicative m => (hash -> m hash') -> NamespaceDiff text hash -> m (NamespaceDiff text hash') Source #
causalHashes_ :: (Applicative m, Ord hash') => (hash -> m hash') -> Causal hash -> m (Causal hash') Source #
Request/response types
Get causal hash by path
newtype GetCausalHashByPathRequest Source #
Instances
data GetCausalHashByPathResponse Source #
GetCausalHashByPathSuccess (Maybe HashJWT) | |
GetCausalHashByPathNoReadPermission Path | |
GetCausalHashByPathUserNotFound | |
GetCausalHashByPathInvalidRepoInfo Text RepoInfo |
Instances
Download entities
data DownloadEntitiesRequest Source #
Instances
data DownloadEntitiesResponse Source #
DownloadEntitiesSuccess (NEMap Hash32 (Entity Text Hash32 HashJWT)) | |
DownloadEntitiesFailure DownloadEntitiesError |
Instances
FromJSON DownloadEntitiesResponse Source # | |
Defined in Unison.Sync.Types | |
ToJSON DownloadEntitiesResponse Source # | |
Defined in Unison.Sync.Types |
data DownloadEntitiesError Source #
Instances
Show DownloadEntitiesError Source # | |
Defined in Unison.Sync.Types showsPrec :: Int -> DownloadEntitiesError -> ShowS # show :: DownloadEntitiesError -> String # showList :: [DownloadEntitiesError] -> ShowS # | |
Eq DownloadEntitiesError Source # | |
Defined in Unison.Sync.Types (==) :: DownloadEntitiesError -> DownloadEntitiesError -> Bool # (/=) :: DownloadEntitiesError -> DownloadEntitiesError -> Bool # |
Upload entities
data UploadEntitiesRequest Source #
Instances
data UploadEntitiesResponse Source #
Instances
data UploadEntitiesError Source #
Instances
Show UploadEntitiesError Source # | |
Defined in Unison.Sync.Types showsPrec :: Int -> UploadEntitiesError -> ShowS # show :: UploadEntitiesError -> String # showList :: [UploadEntitiesError] -> ShowS # | |
Eq UploadEntitiesError Source # | |
Defined in Unison.Sync.Types (==) :: UploadEntitiesError -> UploadEntitiesError -> Bool # (/=) :: UploadEntitiesError -> UploadEntitiesError -> Bool # | |
Ord UploadEntitiesError Source # | |
Defined in Unison.Sync.Types compare :: UploadEntitiesError -> UploadEntitiesError -> Ordering # (<) :: UploadEntitiesError -> UploadEntitiesError -> Bool # (<=) :: UploadEntitiesError -> UploadEntitiesError -> Bool # (>) :: UploadEntitiesError -> UploadEntitiesError -> Bool # (>=) :: UploadEntitiesError -> UploadEntitiesError -> Bool # max :: UploadEntitiesError -> UploadEntitiesError -> UploadEntitiesError # min :: UploadEntitiesError -> UploadEntitiesError -> UploadEntitiesError # |
Common/shared error types
data HashMismatchForEntity Source #
Instances
data InvalidParentage Source #
Instances
FromJSON InvalidParentage Source # | |
Defined in Unison.Sync.Types parseJSON :: Value -> Parser InvalidParentage # parseJSONList :: Value -> Parser [InvalidParentage] # | |
ToJSON InvalidParentage Source # | |
Defined in Unison.Sync.Types toJSON :: InvalidParentage -> Value # toEncoding :: InvalidParentage -> Encoding # toJSONList :: [InvalidParentage] -> Value # toEncodingList :: [InvalidParentage] -> Encoding # | |
Show InvalidParentage Source # | |
Defined in Unison.Sync.Types showsPrec :: Int -> InvalidParentage -> ShowS # show :: InvalidParentage -> String # showList :: [InvalidParentage] -> ShowS # |
data NeedDependencies hash Source #
NeedDependencies | |
|
Instances
data EntityValidationError Source #
The ways in which validating an entity may fail.
EntityHashMismatch EntityType HashMismatchForEntity | |
UnsupportedEntityType Hash32 EntityType | |
InvalidByteEncoding Hash32 EntityType Text | |
HashResolutionFailure Hash32 |