diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-01-05 19:58:05 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-01-11 19:43:22 -0500 |
commit | 23d215fcb62c8bfe8d56396a0c9718a72ac0037b (patch) | |
tree | 520a04b518f1898c7c6685679aafafbb8f1d5942 /compiler/GHC/Data | |
parent | 49731fed69cb67ebaa3481b6ed5395ccd760c051 (diff) | |
download | haskell-23d215fcb62c8bfe8d56396a0c9718a72ac0037b.tar.gz |
warnPprTrace: pass separately the reason
This makes it more similar to pprTrace, pprPanic etc.
Diffstat (limited to 'compiler/GHC/Data')
-rw-r--r-- | compiler/GHC/Data/List/SetOps.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Data/List/SetOps.hs b/compiler/GHC/Data/List/SetOps.hs index 9a5d138863..187d862b3d 100644 --- a/compiler/GHC/Data/List/SetOps.hs +++ b/compiler/GHC/Data/List/SetOps.hs @@ -66,7 +66,7 @@ unionLists xs [y] | isIn "unionLists" y xs = xs | otherwise = y:xs unionLists xs ys - = warnPprTrace (lengthExceeds xs 100 || lengthExceeds ys 100) (ppr xs $$ ppr ys) $ + = warnPprTrace (lengthExceeds xs 100 || lengthExceeds ys 100) "unionLists" (ppr xs $$ ppr ys) $ [x | x <- xs, isn'tIn "unionLists" x ys] ++ ys -- | Calculate the set difference of two lists. This is @@ -207,7 +207,7 @@ isIn msg x ys elem100 :: Eq a => Int -> a -> [a] -> Bool elem100 _ _ [] = False elem100 i x (y:ys) - | i > 100 = warnPprTrace True (text ("Over-long elem in " ++ msg)) (x `elem` (y:ys)) + | i > 100 = warnPprTrace True ("Over-long elem in " ++ msg) empty (x `elem` (y:ys)) | otherwise = x == y || elem100 (i + 1) x ys isn'tIn msg x ys @@ -216,6 +216,6 @@ isn'tIn msg x ys notElem100 :: Eq a => Int -> a -> [a] -> Bool notElem100 _ _ [] = True notElem100 i x (y:ys) - | i > 100 = warnPprTrace True (text ("Over-long notElem in " ++ msg)) (x `notElem` (y:ys)) + | i > 100 = warnPprTrace True ("Over-long notElem in " ++ msg) empty (x `notElem` (y:ys)) | otherwise = x /= y && notElem100 (i + 1) x ys # endif /* DEBUG */ |