Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Branch m = Branch {
- terms :: !(Map NameSegment (Map Referent (m MdValues)))
- types :: !(Map NameSegment (Map Reference (m MdValues)))
- patches :: !(Map NameSegment (PatchHash, m Patch))
- children :: !(Map NameSegment (CausalBranch m))
- type CausalBranch m = Causal m CausalHash BranchHash (Branch m) (Branch m)
- data Patch = Patch {}
- type MetadataType = Reference
- type MetadataValue = Reference
- newtype MdValues = MdValues {}
- data NamespaceStats = NamespaceStats {}
- hasDefinitions :: NamespaceStats -> Bool
- childAt :: NameSegment -> Branch m -> Maybe (CausalBranch m)
- hoist :: Functor n => (forall x. m x -> n x) -> Branch m -> Branch n
- hoistCausalBranch :: Functor n => (forall x. m x -> n x) -> CausalBranch m -> CausalBranch n
- empty :: Branch m
Documentation
A re-imagining of Unison.Codebase.Branch which is less eager in what it loads, which can often speed up load times and keep fewer things in memory.
Branch | |
|
Instances
Generic (Branch m) Source # | |
Show (Branch m) Source # | |
type Rep (Branch m) Source # | |
Defined in U.Codebase.Branch.Type type Rep (Branch m) = D1 ('MetaData "Branch" "U.Codebase.Branch.Type" "unison-codebase-0.0.0-AFzt1HmKDX512erVMwvK3i" 'False) (C1 ('MetaCons "Branch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "terms") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map NameSegment (Map Referent (m MdValues)))) :*: S1 ('MetaSel ('Just "types") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map NameSegment (Map Reference (m MdValues))))) :*: (S1 ('MetaSel ('Just "patches") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map NameSegment (PatchHash, m Patch))) :*: S1 ('MetaSel ('Just "children") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map NameSegment (CausalBranch m)))))) |
type CausalBranch m = Causal m CausalHash BranchHash (Branch m) (Branch m) Source #
type MetadataType = Reference Source #
type MetadataValue = Reference Source #
data NamespaceStats Source #
Useful statistics about a namespace.
All contained statistics should be static
, i.e. they can be computed when a branch is
first saved, and won't change unless the branch hash also changes.
Instances
hasDefinitions :: NamespaceStats -> Bool Source #
Whether the provided stats indicate the presence of any definitions in the namespace.
childAt :: NameSegment -> Branch m -> Maybe (CausalBranch m) Source #
hoistCausalBranch :: Functor n => (forall x. m x -> n x) -> CausalBranch m -> CausalBranch n Source #