summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-05-07 15:55:04 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-12 21:41:44 -0400
commit67a5a91ef5e61f3b3c84481d8a396ed48cd5d96e (patch)
tree109ee95b75507cd49355135d53da2dbc9d9231cb /compiler/GHC/Iface
parent0ef119071347f7bc14f0fa89904b0cfd0b230ac1 (diff)
downloadhaskell-67a5a91ef5e61f3b3c84481d8a396ed48cd5d96e.tar.gz
Remove useless {-# LANGUAGE CPP #-} pragmas
Diffstat (limited to 'compiler/GHC/Iface')
-rw-r--r--compiler/GHC/Iface/Binary.hs2
-rw-r--r--compiler/GHC/Iface/Env.hs2
-rw-r--r--compiler/GHC/Iface/Load.hs2
-rw-r--r--compiler/GHC/Iface/Make.hs2
-rw-r--r--compiler/GHC/Iface/Recomp.hs11
-rw-r--r--compiler/GHC/Iface/Recomp/Binary.hs2
-rw-r--r--compiler/GHC/Iface/Rename.hs2
-rw-r--r--compiler/GHC/Iface/Syntax.hs2
-rw-r--r--compiler/GHC/Iface/Tidy.hs2
-rw-r--r--compiler/GHC/Iface/Type.hs2
10 files changed, 13 insertions, 16 deletions
diff --git a/compiler/GHC/Iface/Binary.hs b/compiler/GHC/Iface/Binary.hs
index 7a732cd48b..b248158ef8 100644
--- a/compiler/GHC/Iface/Binary.hs
+++ b/compiler/GHC/Iface/Binary.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE BinaryLiterals, CPP, ScopedTypeVariables, BangPatterns #-}
+{-# LANGUAGE BinaryLiterals, ScopedTypeVariables, BangPatterns #-}
--
-- (c) The University of Glasgow 2002-2006
diff --git a/compiler/GHC/Iface/Env.hs b/compiler/GHC/Iface/Env.hs
index b79264e22b..adcf62f8c5 100644
--- a/compiler/GHC/Iface/Env.hs
+++ b/compiler/GHC/Iface/Env.hs
@@ -1,6 +1,6 @@
-- (c) The University of Glasgow 2002-2006
-{-# LANGUAGE CPP, RankNTypes #-}
+{-# LANGUAGE RankNTypes #-}
module GHC.Iface.Env (
newGlobalBinder, newInteractiveBinder,
diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs
index 41fe389b46..7b2a659161 100644
--- a/compiler/GHC/Iface/Load.hs
+++ b/compiler/GHC/Iface/Load.hs
@@ -4,7 +4,7 @@
-}
-{-# LANGUAGE CPP, BangPatterns, NondecreasingIndentation #-}
+{-# LANGUAGE BangPatterns, NondecreasingIndentation #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE FlexibleContexts #-}
diff --git a/compiler/GHC/Iface/Make.hs b/compiler/GHC/Iface/Make.hs
index 9fc9fca257..416cd56d9e 100644
--- a/compiler/GHC/Iface/Make.hs
+++ b/compiler/GHC/Iface/Make.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+
{-# LANGUAGE NondecreasingIndentation #-}
{-
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs
index ede395aa67..e033a6628a 100644
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiWayIf #-}
-- | Module for detecting if recompilation is required
@@ -41,6 +40,7 @@ import GHC.Utils.Binary
import GHC.Utils.Fingerprint
import GHC.Utils.Exception
import GHC.Utils.Logger
+import GHC.Utils.Constants (debugIsOn)
import GHC.Types.Annotations
import GHC.Types.Name
@@ -664,12 +664,9 @@ checkModUsage _this_pkg UsageFile{ usg_file_path = file,
else return UpToDate
where
recomp = RecompBecause (file ++ " changed")
- handler =
-#if defined(DEBUG)
- \e -> pprTrace "UsageFile" (text (show e)) $ return recomp
-#else
- \_ -> return recomp -- if we can't find the file, just recompile, don't fail
-#endif
+ handler = if debugIsOn
+ then \e -> pprTrace "UsageFile" (text (show e)) $ return recomp
+ else \_ -> return recomp -- if we can't find the file, just recompile, don't fail
------------------------
checkModuleFingerprint
diff --git a/compiler/GHC/Iface/Recomp/Binary.hs b/compiler/GHC/Iface/Recomp/Binary.hs
index c4e1d65a17..8fd9ef858f 100644
--- a/compiler/GHC/Iface/Recomp/Binary.hs
+++ b/compiler/GHC/Iface/Recomp/Binary.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+
-- | Computing fingerprints of values serializeable with GHC's \"Binary\" module.
module GHC.Iface.Recomp.Binary
diff --git a/compiler/GHC/Iface/Rename.hs b/compiler/GHC/Iface/Rename.hs
index edc166acf3..18ad1a55ce 100644
--- a/compiler/GHC/Iface/Rename.hs
+++ b/compiler/GHC/Iface/Rename.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
diff --git a/compiler/GHC/Iface/Syntax.hs b/compiler/GHC/Iface/Syntax.hs
index 483a18465a..198b5eb5f4 100644
--- a/compiler/GHC/Iface/Syntax.hs
+++ b/compiler/GHC/Iface/Syntax.hs
@@ -3,7 +3,7 @@
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
-}
-{-# LANGUAGE CPP #-}
+
{-# LANGUAGE LambdaCase #-}
module GHC.Iface.Syntax (
diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs
index 418e878ea5..71e93671b9 100644
--- a/compiler/GHC/Iface/Tidy.hs
+++ b/compiler/GHC/Iface/Tidy.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+
{-# LANGUAGE DeriveFunctor #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs
index f1326b3461..3477fcf552 100644
--- a/compiler/GHC/Iface/Type.hs
+++ b/compiler/GHC/Iface/Type.hs
@@ -6,7 +6,7 @@
This module defines interface types and binders
-}
-{-# LANGUAGE CPP #-}
+
{-# LANGUAGE FlexibleInstances #-}
-- FlexibleInstances for Binary (DefMethSpec IfaceType)
{-# LANGUAGE BangPatterns #-}