unison-parser-typechecker-0.0.0
Safe HaskellNone
LanguageHaskell2010

Unison.Codebase.Branch.Type

Synopsis

Documentation

type NamespaceHash (m :: Type -> Type) = HashFor (Branch0 m) Source #

A Hash for a namespace itself, it doesn't incorporate any history.

head :: forall (m :: Type -> Type). Branch m -> Branch0 m Source #

headHash :: forall (m :: Type -> Type). Branch m -> CausalHash Source #

namespaceHash :: forall (m :: Type -> Type). Branch m -> BranchHash Source #

newtype Branch (m :: Type -> Type) Source #

A node in the Unison namespace hierarchy along with its history.

Constructors

Branch 

Instances

Instances details
Eq (Branch m) Source # 
Instance details

Defined in Unison.Codebase.Branch.Type

Methods

(==) :: Branch m -> Branch m -> Bool #

(/=) :: Branch m -> Branch m -> Bool #

Ord (Branch m) Source # 
Instance details

Defined in Unison.Codebase.Branch.Type

Methods

compare :: Branch m -> Branch m -> Ordering #

(<) :: Branch m -> Branch m -> Bool #

(<=) :: Branch m -> Branch m -> Bool #

(>) :: Branch m -> Branch m -> Bool #

(>=) :: Branch m -> Branch m -> Bool #

max :: Branch m -> Branch m -> Branch m #

min :: Branch m -> Branch m -> Branch m #

AsEmpty (Branch m) Source # 
Instance details

Defined in Unison.Codebase.Branch

Methods

_Empty :: Prism' (Branch m) () #

data Branch0 (m :: Type -> Type) Source #

A node in the Unison namespace hierarchy.

_terms and _types are the declarations at this level. _children are the nodes one level below us. _edits are the Patchs stored at this node in the code.

The remaining fields are derived from the four above. None of the record fields are exported to avoid accidental tweaking without updating the associated derived fields.

Use either the lensy accessors or the field getters.

Instances

Instances details
Eq (Branch0 m) Source # 
Instance details

Defined in Unison.Codebase.Branch.Type

Methods

(==) :: Branch0 m -> Branch0 m -> Bool #

(/=) :: Branch0 m -> Branch0 m -> Bool #

ContentAddressable (Branch0 m) Source # 
Instance details

Defined in Unison.Codebase.Branch

Methods

contentHash :: Branch0 m -> Hash #

terms_ :: forall (m :: Type -> Type) f. Functor f => (Star Referent NameSegment -> f (Star Referent NameSegment)) -> Branch0 m -> f (Branch0 m) Source #

children_ :: forall (m :: Type -> Type) f. Functor f => (Map NameSegment (Branch m) -> f (Map NameSegment (Branch m))) -> Branch0 m -> f (Branch0 m) Source #

history_ :: forall (m :: Type -> Type) p f. (Profunctor p, Functor f) => p (UnwrappedBranch m) (f (UnwrappedBranch m)) -> p (Branch m) (f (Branch m)) Source #

edits_ :: forall m f. Functor f => (Map NameSegment (PatchHash, m Patch) -> f (Map NameSegment (PatchHash, m Patch))) -> Branch0 m -> f (Branch0 m) Source #

isEmpty0 :: forall (m :: Type -> Type). Branch0 m -> Bool Source #

deepTerms :: forall (m :: Type -> Type). Branch0 m -> Relation Referent Name Source #

deepPaths :: forall (m :: Type -> Type). Branch0 m -> Set Path Source #

deleteLibdeps :: forall (m :: Type -> Type). Branch0 m -> Branch0 m Source #

deleteLibdeps branch deletes all libdeps from branch.

type Star r n = Star r n Source #

type UnwrappedBranch (m :: Type -> Type) = Causal m (Branch0 m) Source #