summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-07-10 11:54:47 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-07-14 01:21:48 -0400
commitd7c6c4717cdf1b7bd8550e37da66c52275c802f0 (patch)
tree7488a774c7b8e288b4373bcdc9121b53ba1492ea /compiler
parentbd9fc1b2adea718be089b8370d2e82ea55af6539 (diff)
downloadhaskell-d7c6c4717cdf1b7bd8550e37da66c52275c802f0.tar.gz
Expunge #ifdef and #ifndef from the codebase
These are unexploded minds as far as the linter is concerned. I don't want to hit in my MRs by mistake! I did this with `sed`, and then rolled back some changes in the docs, config.guess, and the linter itself.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/CodeOutput.hs4
-rw-r--r--compiler/main/DynFlags.hs2
-rw-r--r--compiler/utils/Util.hs2
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/main/CodeOutput.hs b/compiler/main/CodeOutput.hs
index 050e6f5c14..6f80df9676 100644
--- a/compiler/main/CodeOutput.hs
+++ b/compiler/main/CodeOutput.hs
@@ -252,8 +252,8 @@ outputForeignStubs dflags mod location stubs
then Just stub_c
else Nothing )
where
- cplusplus_hdr = "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
- cplusplus_ftr = "#ifdef __cplusplus\n}\n#endif\n"
+ cplusplus_hdr = "#if defined(__cplusplus)\nextern \"C\" {\n#endif\n"
+ cplusplus_ftr = "#if defined(__cplusplus)\n}\n#endif\n"
-- Don't use doOutput for dumping the f. export stubs
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 7009771aa4..2315be3519 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3020,7 +3020,7 @@ dynamic_flags_deps = [
, make_ord_flag defGhcFlag "rdynamic" $ noArg $
#if defined(linux_HOST_OS)
addOptl "-rdynamic"
-#elif defined (mingw32_HOST_OS)
+#elif defined(mingw32_HOST_OS)
addOptl "-Wl,--export-all-symbols"
#else
-- ignored for compat w/ gcc:
diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs
index aa4afa5451..dba5a4495f 100644
--- a/compiler/utils/Util.hs
+++ b/compiler/utils/Util.hs
@@ -576,7 +576,7 @@ only _ = panic "Util: only"
isIn, isn'tIn :: Eq a => String -> a -> [a] -> Bool
-# ifndef DEBUG
+# if !defined(DEBUG)
isIn _msg x ys = x `elem` ys
isn'tIn _msg x ys = x `notElem` ys