summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils/Misc.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-05-06 22:22:02 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-12 21:41:44 -0400
commit0ef119071347f7bc14f0fa89904b0cfd0b230ac1 (patch)
tree7a80b3942ae6bd18391f9b924ad55bb001392288 /compiler/GHC/Utils/Misc.hs
parentbfabf94f63b6644bd32982fd13ea0c8bca9aeae4 (diff)
downloadhaskell-0ef119071347f7bc14f0fa89904b0cfd0b230ac1.tar.gz
Fully remove HsVersions.h
Replace uses of WARN macro with calls to: warnPprTrace :: Bool -> SDoc -> a -> a Remove the now unused HsVersions.h Bump haddock submodule
Diffstat (limited to 'compiler/GHC/Utils/Misc.hs')
-rw-r--r--compiler/GHC/Utils/Misc.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/GHC/Utils/Misc.hs b/compiler/GHC/Utils/Misc.hs
index 5629b339b9..8dde1c7296 100644
--- a/compiler/GHC/Utils/Misc.hs
+++ b/compiler/GHC/Utils/Misc.hs
@@ -127,8 +127,6 @@ module GHC.Utils.Misc (
overrideWith,
) where
-#include "HsVersions.h"
-
import GHC.Prelude
import GHC.Utils.Exception
@@ -539,7 +537,7 @@ isIn msg x ys
elem100 :: Eq a => Int -> a -> [a] -> Bool
elem100 _ _ [] = False
elem100 i x (y:ys)
- | i > 100 = WARN(True, text ("Over-long elem in " ++ msg)) (x `elem` (y:ys))
+ | i > 100 = warnPprTrace True (text ("Over-long elem in " ++ msg)) (x `elem` (y:ys))
| otherwise = x == y || elem100 (i + 1) x ys
isn'tIn msg x ys
@@ -548,7 +546,7 @@ isn'tIn msg x ys
notElem100 :: Eq a => Int -> a -> [a] -> Bool
notElem100 _ _ [] = True
notElem100 i x (y:ys)
- | i > 100 = WARN(True, text ("Over-long notElem in " ++ msg)) (x `notElem` (y:ys))
+ | i > 100 = warnPprTrace True (text ("Over-long notElem in " ++ msg)) (x `notElem` (y:ys))
| otherwise = x /= y && notElem100 (i + 1) x ys
# endif /* DEBUG */