Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type NamespaceHash m = HashFor (Branch0 m)
- head :: Branch m -> Branch0 m
- headHash :: Branch m -> CausalHash
- namespaceHash :: Branch m -> NamespaceHash m
- newtype Branch m = Branch {
- _history :: UnwrappedBranch m
- data Branch0 m
- 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
- deepDefns :: Branch0 m -> DefnsF (Relation Name) Referent TypeReference
- deepPaths :: Branch0 m -> Set Path
- deepEdits :: Branch0 m -> Map Name PatchHash
- 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 :: Branch m -> NamespaceHash m Source #
A node in the Unison namespace hierarchy along with its history.
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.
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 #
type UnwrappedBranch m = Causal m (Branch0 m) Source #