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 ->