inferno-vc-0.1.0: Version control server for Inferno
Safe HaskellSafe-Inferred
LanguageHaskell2010

Inferno.VersionControl.Operations

Description

This module defines operations on the Inferno VC store. The store structure is as follows:

  • `storePath` stores the JSON serialised `VCMeta VCObject`s, where the filename is the cryptographic hash (VCOBjectHash) of the object's contents
  • `storePath/heads` is a set of current HEAD objects of the store, which can be seen as the roots of the VC tree
  • `storePath/to_head` is a map from every VCOBjectHash to its current HEAD, where the file name is the source hash and the contents of the file are the HEAD hash
  • `storePathdeps` is a map from every VCOBjectHash to its (transitive) dependencies, i.e. the file `storePathdeps/hash` describes the closure of `hash`
Synopsis

Documentation

newtype VCStorePath Source #

Constructors

VCStorePath FilePath 

Instances

Instances details
Generic VCStorePath Source # 
Instance details

Defined in Inferno.VersionControl.Operations

Associated Types

type Rep VCStorePath :: Type -> Type #

type Rep VCStorePath Source # 
Instance details

Defined in Inferno.VersionControl.Operations

type Rep VCStorePath = D1 ('MetaData "VCStorePath" "Inferno.VersionControl.Operations" "inferno-vc-0.1.0-KyAO1GZuiEv4oyOIVKzzQ6" 'True) (C1 ('MetaCons "VCStorePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

trace :: VCStoreLogM env m => VCServerTrace -> m () Source #

initVCStore :: VCStoreEnvM env m => m () Source #

deleteAutosavedVCObject :: (VCStoreLogM env m, VCStoreErrM err m, VCStoreEnvM env m) => VCObjectHash -> m () Source #

Delete a temporary object from the VC. This is used for autosaved scripts and to run tests against unsaved scripts

deleteStaleAutosavedVCObjects :: (VCStoreLogM env m, VCStoreErrM err m, VCStoreEnvM env m) => m () Source #

Deletes all stale autosaved objects from the VC.

deleteVCObjects :: (VCStoreLogM env m, VCStoreErrM err m, VCStoreEnvM env m) => VCObjectHash -> m () Source #

Soft delete script and its predecessors All scripts and their references are moved to "removed" directory

fetchRemovedVCObject :: (VCStoreLogM env m, VCStoreErrM err m, VCStoreEnvM env m, FromJSON a, FromJSON g) => VCObjectHash -> m (VCMeta a g VCObject) Source #

Fetch object from removed directory