fromRawCausal :: Causal.Raw Branch.Raw (Branches m, Dependencies)
              -> (Branches m, Dependencies)
fromRawCausal = \case
  Causal.RawOne e -> e
  Causal.RawCons e h -> e <> fromTails [h]
  Causal.RawMerge e hs -> e <> fromTails (toList hs)
  where
  fromTails ts = (fmap (,Nothing) ts, mempty)
fromRawCausal :: Causal.Raw Branch.Raw (Branches m, Dependencies)
              -> (Branches m, Dependencies)
fromRawCausal = \case
  Causal.RawOne e -> e
  Causal.RawCons e h -> e <> fromTails [h]
  Causal.RawMerge e hs -> e <> fromTails (toList hs)
  where
  fromTails ts = (fmap (,Nothing) ts, mempty)
fromRawCausal = \case
  Causal.RawOne e -> e
  Causal.RawCons e h -> e <> fromTails [h]
  Causal.RawMerge e hs -> e <> fromTails (toList hs)
  where
  fromTails ts = (fmap (,Nothing) ts, mempty)