| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Unison.Codebase.Branch.Type
Synopsis
- type NamespaceHash (m :: Type -> Type) = HashFor (Branch0 m)
- head :: forall (m :: Type -> Type). Branch m -> Branch0 m
- headHash :: forall (m :: Type -> Type). Branch m -> CausalHash
- namespaceHash :: forall (m :: Type -> Type). Branch m -> BranchHash
- newtype Branch (m :: Type -> Type) = Branch {
- _history :: UnwrappedBranch m
- data Branch0 (m :: Type -> Type)
- branch0 :: Star Referent NameSegment -> Star TypeReference NameSegment -> Map NameSegment (Branch m) -> Map NameSegment (PatchHash, m Patch) -> Branch0 m
- terms_ :: forall (m :: Type -> Type) f. Functor f => (Star Referent NameSegment -> f (Star Referent NameSegment)) -> Branch0 m -> f (Branch0 m)
- types_ :: forall (m :: Type -> Type) f. Functor f => (Star TypeReference NameSegment -> f (Star TypeReference NameSegment)) -> Branch0 m -> f (Branch0 m)
- children_ :: forall (m :: Type -> Type) f. Functor f => (Map NameSegment (Branch m) -> f (Map NameSegment (Branch m))) -> Branch0 m -> f (Branch0 m)
- nonEmptyChildren :: forall (m :: Type -> Type). Branch0 m -> Map NameSegment (Branch m)
- history_ :: forall (m :: Type -> Type) p f. (Profunctor p, Functor f) => p (UnwrappedBranch m) (f (UnwrappedBranch m)) -> p (Branch m) (f (Branch m))
- edits_ :: forall m f. Functor f => (Map NameSegment (PatchHash, m Patch) -> f (Map NameSegment (PatchHash, m Patch))) -> Branch0 m -> f (Branch0 m)
- isEmpty0 :: forall (m :: Type -> Type). Branch0 m -> Bool
- deepDefns :: forall (m :: Type -> Type). Branch0 m -> Defns (Relation Referent Name) (Relation TypeReference Name)
- deepDefnsRefs :: forall (m :: Type -> Type). Branch0 m -> DefnsF Set TermReference TypeReference
- deepTerms :: forall (m :: Type -> Type). Branch0 m -> Relation Referent Name
- deepTypes :: forall (m :: Type -> Type). Branch0 m -> Relation TypeReference Name
- deepPaths :: forall (m :: Type -> Type). Branch0 m -> Set Path
- deleteLibdeps :: forall (m :: Type -> Type). Branch0 m -> Branch0 m
- type Star r n = Star r n
- type UnwrappedBranch (m :: Type -> Type) = Causal m (Branch0 m)
Documentation
type NamespaceHash (m :: Type -> Type) = HashFor (Branch0 m) Source #
A Hash for a namespace itself, it doesn't incorporate any history.
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 | |
Fields
| |
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.
branch0 :: Star Referent NameSegment -> Star TypeReference NameSegment -> Map NameSegment (Branch m) -> Map NameSegment (PatchHash, m Patch) -> Branch0 m Source #
terms_ :: forall (m :: Type -> Type) f. Functor f => (Star Referent NameSegment -> f (Star Referent NameSegment)) -> Branch0 m -> f (Branch0 m) Source #
types_ :: forall (m :: Type -> Type) f. Functor f => (Star TypeReference NameSegment -> f (Star TypeReference 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 #
nonEmptyChildren :: forall (m :: Type -> Type). Branch0 m -> Map NameSegment (Branch 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 #
deepDefns :: forall (m :: Type -> Type). Branch0 m -> Defns (Relation Referent Name) (Relation TypeReference Name) Source #
deepDefnsRefs :: forall (m :: Type -> Type). Branch0 m -> DefnsF Set TermReference TypeReference Source #