Commit before attempting to remove Annotation datatype

This commit is contained in:
2025-09-24 10:05:44 +01:00
parent 87f1444f5c
commit a83186e6dd
3 changed files with 17 additions and 8 deletions
+3 -2
View File
@@ -36,7 +36,8 @@ overwriteLabel i t ts =
t
attachTree :: (a -> Maybe a) -> Tree a -> Tree ([Tree a], a) -> Tree ([Tree a], a)
attachTree upf t = safeUpdateSingleNode (isJust . upf . snd) ((root . _2 %~ g) . (root . _1 .:~ t))
attachTree upf t = safeUpdateSingleNode (isJust . upf . snd) ((root . _2 %~ g)
. (root . _1 .:~ t))
where
g x = fromMaybe x (upf x)
@@ -78,7 +79,7 @@ composeNode (NodeTree t) = t
composeNode (NodeMTree mt) = composeTree mt
attachList' :: Tree a -> [MetaBranch a b] -> Tree a
attachList' t xs = shiftChildren $ foldr attachBranch (fmap ([],) t) xs
attachList' t = shiftChildren . foldr attachBranch (fmap ([],) t)
attachBranch :: MetaBranch a b -> Tree ([Tree a], a) -> Tree ([Tree a], a)
attachBranch mb =