From 71c0fcb737e94d7f2aa65e0540ddc2554f63bdd7 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sun, 31 Dec 2023 02:27:52 -0500 Subject: [PATCH] Manually fuse elem and map in isParentOf --- src/ShellCheck/AnalyzerLib.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ShellCheck/AnalyzerLib.hs b/src/ShellCheck/AnalyzerLib.hs index 21123d4..944b12d 100644 --- a/src/ShellCheck/AnalyzerLib.hs +++ b/src/ShellCheck/AnalyzerLib.hs @@ -430,7 +430,9 @@ getPathM t = do return $ getPath (parentMap params) t isParentOf tree parent child = - elem (getId parent) . NE.map getId $ getPath tree child + any (\t -> parentId == getId t) (getPath tree child) + where + parentId = getId parent parents params = getPath (parentMap params)