Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Causal m e
- pattern One :: CausalHash -> HashFor e -> e -> Causal m e
- pattern Cons :: CausalHash -> HashFor e -> e -> (CausalHash, m (Causal m e)) -> Causal m e
- pattern Merge :: CausalHash -> HashFor e -> e -> Map CausalHash (m (Causal m e)) -> Causal m e
- head_ :: ContentAddressable e => Lens' (Causal m e) e
- one :: ContentAddressable e => e -> Causal m e
- cons :: (Applicative m, ContentAddressable e) => e -> Causal m e -> Causal m e
- consDistinct :: (Applicative m, Eq e, ContentAddressable e) => e -> Causal m e -> Causal m e
- mergeNode :: ContentAddressable e => e -> Map CausalHash (m (Causal m e)) -> Causal m e
- uncons :: Applicative m => Causal m e -> m (Maybe (e, Causal m e))
- predecessors :: Causal m e -> Seq (m (Causal m e))
- threeWayMerge :: forall m e. (Monad m, ContentAddressable e) => (Maybe e -> e -> e -> m e) -> Causal m e -> Causal m e -> m (Causal m e)
- threeWayMerge' :: forall m e. (Monad m, ContentAddressable e) => (Causal m e -> Causal m e -> m (Maybe (Causal m e))) -> (Maybe e -> e -> e -> m e) -> Causal m e -> Causal m e -> m (Causal m e)
- squashMerge' :: forall m e. (Monad m, ContentAddressable e, Eq e) => (Causal m e -> Causal m e -> m (Maybe (Causal m e))) -> (e -> m e) -> (Maybe e -> e -> e -> m e) -> Causal m e -> Causal m e -> m (Causal m e)
- lca :: Monad m => Causal m e -> Causal m e -> m (Maybe (Causal m e))
- stepDistinct :: (Applicative m, Eq e, ContentAddressable e) => (e -> e) -> Causal m e -> Causal m e
- stepDistinctM :: (Applicative m, Functor n, Eq e, ContentAddressable e) => (e -> n e) -> Causal m e -> n (Causal m e)
- transform :: Functor m => (forall a. m a -> n a) -> Causal m e -> Causal n e
- unsafeMapHashPreserving :: forall m e e2. Functor m => (e -> e2) -> Causal m e -> Causal m e2
- before :: Monad m => Causal m e -> Causal m e -> m Bool
- beforeHash :: forall m e. Monad m => Word -> CausalHash -> Causal m e -> m Bool
Documentation
Instances
Show e => Show (Causal m e) Source # | |
Eq (Causal m a) Source # | |
Ord (Causal m a) Source # | |
Defined in Unison.Codebase.Causal.Type |
pattern Cons :: CausalHash -> HashFor e -> e -> (CausalHash, m (Causal m e)) -> Causal m e Source #
pattern Merge :: CausalHash -> HashFor e -> e -> Map CausalHash (m (Causal m e)) -> Causal m e Source #
head_ :: ContentAddressable e => Lens' (Causal m e) e Source #
Focus the current head, keeping the hash up to date.
one :: ContentAddressable e => e -> Causal m e Source #
cons :: (Applicative m, ContentAddressable e) => e -> Causal m e -> Causal m e Source #
consDistinct :: (Applicative m, Eq e, ContentAddressable e) => e -> Causal m e -> Causal m e Source #
mergeNode :: ContentAddressable e => e -> Map CausalHash (m (Causal m e)) -> Causal m e Source #
An optimized variant of fromListM
for when it is known we have 2+ predecessors (merge node).
threeWayMerge :: forall m e. (Monad m, ContentAddressable e) => (Maybe e -> e -> e -> m e) -> Causal m e -> Causal m e -> m (Causal m e) Source #
threeWayMerge' :: forall m e. (Monad m, ContentAddressable e) => (Causal m e -> Causal m e -> m (Maybe (Causal m e))) -> (Maybe e -> e -> e -> m e) -> Causal m e -> Causal m e -> m (Causal m e) Source #
squashMerge' :: forall m e. (Monad m, ContentAddressable e, Eq e) => (Causal m e -> Causal m e -> m (Maybe (Causal m e))) -> (e -> m e) -> (Maybe e -> e -> e -> m e) -> Causal m e -> Causal m e -> m (Causal m e) Source #
stepDistinct :: (Applicative m, Eq e, ContentAddressable e) => (e -> e) -> Causal m e -> Causal m e Source #
stepDistinctM :: (Applicative m, Functor n, Eq e, ContentAddressable e) => (e -> n e) -> Causal m e -> n (Causal m e) Source #
unsafeMapHashPreserving :: forall m e e2. Functor m => (e -> e2) -> Causal m e -> Causal m e2 Source #
beforeHash :: forall m e. Monad m => Word -> CausalHash -> Causal m e -> m Bool Source #