Commit before attempting to remove Annotation datatype
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user