Tweak checks of item attachment to not use ItemLinks

This commit is contained in:
2025-07-12 21:11:41 +01:00
parent 3dc70c483a
commit 264d83971f
+4 -4
View File
@@ -211,16 +211,16 @@ rightIsParentCombine ltree rtree = do
return $ rtree & ldtLeft .:~ (linktype, ltree & ldtValue . _2 .~ sf)
leftChildList :: LDTree ItemLink CItem -> [(ItemStructuralFunction, ItemLink)]
leftChildList t = foldl' f l (reverse $ t ^.. ldtLeft . each . _1)
leftChildList t = foldl' f l (reverse $ t ^.. ldtLeft . each . _2 . ldtValue . _2)
where
l = fst $ itemToBreakLists (t ^. ldtValue . _1) (t ^. ldtValue . _2)
f x y = tail $ dropWhile ((/=y) . snd) x
f x y = tail $ dropWhile ((/=y) . fst) x
rightChildList :: LDTree ItemLink CItem -> [(ItemStructuralFunction, ItemLink)]
rightChildList t = foldl' f l (reverse $ t ^.. ldtRight . each . _1)
rightChildList t = foldl' f l (reverse $ t ^.. ldtRight . each . _2 . ldtValue . _2)
where
l = snd $ itemToBreakLists (t ^. ldtValue . _1) (t ^. ldtValue . _2)
f x y = tail $ dropWhile ((/=y) . snd) x
f x y = tail $ dropWhile ((/=y) . fst) x
leftRightCombine ::
LDTComb a b ->