summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-03-10 10:24:28 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2020-03-10 10:25:25 +0000
commit3980d4dfc23cf86eb60f68f2d1e34386f25723de (patch)
treed64f242c133b2d2aadf86ab920610ac89a7f7c9c
parentca8f51d475a69583a228f118e6b9dac98ba483d3 (diff)
downloadhaskell-wip/T17908.tar.gz
Deepen call stack for isInwip/T17908
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.
-rw-r--r--compiler/utils/Util.hs4
1 files 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