Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unison.Codebase.Branch.Type
Synopsis
- type NamespaceHash m = HashFor (Branch0 m)
- head :: Branch m -> Branch0 m
- headHash :: Branch m -> CausalHash
- namespaceHash :: forall m. Branch m -> BranchHash
- newtype Branch m = Branch {
- _history :: UnwrappedBranch m
- data Branch0 m
- data UnconflictedBranchView = UnconflictedBranchView {}
- branch0 :: forall m. Star Referent NameSegment -> Star TypeReference NameSegment -> Map NameSegment (Branch m) -> Map NameSegment (PatchHash, m Patch) -> Branch0 m
- terms_ :: Lens' (Branch0 m) (Star Referent NameSegment)
- types_ :: Lens' (Branch0 m) (Star TypeReference NameSegment)
- children_ :: Lens' (Branch0 m) (Map NameSegment (Branch m))
- nonEmptyChildren :: Branch0 m -> Map NameSegment (Branch m)
- history_ :: Iso' (Branch m) (UnwrappedBranch m)
- edits_ :: Lens' (Branch0 m) (Map NameSegment (PatchHash, m Patch))
- isEmpty0 :: Branch0 m -> Bool
- deepTerms :: Branch0 m -> Relation Referent Name
- deepTypes :: Branch0 m -> Relation TypeReference Name
- deepPaths :: Branch0 m -> Set Path
- deleteLibdeps :: Branch0 m -> Branch0 m
- type Star r n = Star r n
- type UnwrappedBranch m = Causal m (Branch0 m)
Documentation
type NamespaceHash m = HashFor (Branch0 m) Source #
A Hash for a namespace itself, it doesn't incorporate any history.
headHash :: Branch m -> CausalHash Source #
namespaceHash :: forall m. Branch m -> BranchHash Source #
A node in the Unison namespace hierarchy along with its history.
Constructors
Branch | |
Fields
|
A node in the Unison namespace hierarchy.
$sel:_terms:Branch0
and $sel:_types:Branch0
are the declarations at this level.
$sel:_children:Branch0
are the nodes one level below us.
$sel:_edits:Branch0
are the Patch
s 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.
data UnconflictedBranchView Source #
A view of a branch's definition (everything outside of lib
) that is unconflicted: each name refers to one thing.
The data contained within is all just different expressions of the same contents, for various use cases. The
intention is to use laziness to avoid recomputing data structures whenever possible.
Constructors
UnconflictedBranchView | |
Fields
|
branch0 :: forall m. Star Referent NameSegment -> Star TypeReference NameSegment -> Map NameSegment (Branch m) -> Map NameSegment (PatchHash, m Patch) -> Branch0 m Source #
types_ :: Lens' (Branch0 m) (Star TypeReference NameSegment) Source #
nonEmptyChildren :: Branch0 m -> Map NameSegment (Branch m) Source #
deleteLibdeps :: Branch0 m -> Branch0 m Source #
deleteLibdeps branch
deletes all libdeps from branch
.
type UnwrappedBranch m = Causal m (Branch0 m) Source #