From 3980d4dfc23cf86eb60f68f2d1e34386f25723de Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Tue, 10 Mar 2020 10:24:28 +0000 Subject: Deepen call stack for isIn I see quite a few warnings like: WARNING: file compiler/utils/Util.hs, line 593 Over-long elem in unionLists But the call stack is uninformative. Better to add HasDebugCallStack to isIn. Ditto isn'tIn. --- compiler/utils/Util.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 6eb1390c06..35642f9166 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -577,13 +577,13 @@ only _ = panic "Util: only" -- Debugging/specialising versions of \tr{elem} and \tr{notElem} -isIn, isn'tIn :: Eq a => String -> a -> [a] -> Bool - # if !defined(DEBUG) +isIn, isn'tIn :: Eq a => String -> a -> [a] -> Bool isIn _msg x ys = x `elem` ys isn'tIn _msg x ys = x `notElem` ys # else /* DEBUG */ +isIn, isn'tIn :: (HasDebugCallStack, Eq a) => String -> a -> [a] -> Bool isIn msg x ys = elem100 0 x ys where -- cgit v1.2.1