From 264d83971fbca0172119b7f044fedb839ec62774 Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 12 Jul 2025 21:11:41 +0100 Subject: [PATCH] Tweak checks of item attachment to not use ItemLinks --- src/Dodge/Item/Grammar.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Dodge/Item/Grammar.hs b/src/Dodge/Item/Grammar.hs index c640c170a..603453019 100644 --- a/src/Dodge/Item/Grammar.hs +++ b/src/Dodge/Item/Grammar.hs @@ -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 ->