Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- getCausalHashByPath :: BaseUrl -> Path -> Cli (Either (SyncError GetCausalHashByPathError) (Maybe HashJWT))
- data GetCausalHashByPathError
- uploadEntities :: BaseUrl -> RepoInfo -> NESet Hash32 -> (Int -> IO ()) -> Cli (Either (SyncError UploadEntitiesError) ())
- pull :: BaseUrl -> Path -> (Int -> IO ()) -> Cli (Either (SyncError PullError) CausalHash)
- data PullError
- downloadEntities :: BaseUrl -> RepoInfo -> HashJWT -> (Int -> IO ()) -> Cli (Either (SyncError DownloadEntitiesError) ())
Get causal hash by path
:: BaseUrl | The Unison Share URL. |
-> Path | |
-> Cli (Either (SyncError GetCausalHashByPathError) (Maybe HashJWT)) |
Get the causal hash of a path hosted on Unison Share.
data GetCausalHashByPathError Source #
An error occurred when getting causal hash by path.
GetCausalHashByPathErrorNoReadPermission Path | The user does not have permission to read this path. |
GetCausalHashByPathErrorInvalidRepoInfo Text RepoInfo | The repo info was invalid. (err, repoInfo) |
GetCausalHashByPathErrorUserNotFound RepoInfo | The user was not found. |
Instances
Show GetCausalHashByPathError Source # | |
Defined in Unison.Share.Sync.Types showsPrec :: Int -> GetCausalHashByPathError -> ShowS # show :: GetCausalHashByPathError -> String # showList :: [GetCausalHashByPathError] -> ShowS # |
Upload
uploadEntities :: BaseUrl -> RepoInfo -> NESet Hash32 -> (Int -> IO ()) -> Cli (Either (SyncError UploadEntitiesError) ()) Source #
Upload a set of entities to Unison Share. If the server responds that it cannot yet store any hash(es) due to missing dependencies, send those dependencies too, and on and on, until the server stops responding that it's missing anything.
Returns true on success, false on failure (because the user does not have write permission).
Pull/Download
An error occurred while pulling code from Unison Share.