summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHécate <hecate+gitlab@glitchbra.in>2020-12-30 00:48:38 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-17 05:49:17 -0500
commit971a88a78105b207fb1e2e2614877fd080d2ccd1 (patch)
tree252f164129b85d593bc84884eb2d045846a633b2
parent2facd1e94039cbd489ba0a7ce9ba2c5f53780afc (diff)
downloadhaskell-971a88a78105b207fb1e2e2614877fd080d2ccd1.tar.gz
Remove unused extension pragmas from the compiler code base
-rw-r--r--compiler/GHC/Core/Opt/ConstantFold.hs10
-rw-r--r--compiler/GHC/Data/Graph/Directed.hs1
-rw-r--r--compiler/GHC/Driver/Env.hs1
-rw-r--r--compiler/GHC/Driver/Errors.hs2
-rw-r--r--compiler/GHC/Driver/Main.hs4
-rw-r--r--compiler/GHC/Driver/MakeFile.hs1
-rw-r--r--compiler/GHC/Hs/Binds.hs1
-rw-r--r--compiler/GHC/Parser/PostProcess.hs2
-rw-r--r--compiler/GHC/Rename/HsType.hs1
-rw-r--r--compiler/GHC/Rename/Pat.hs1
-rw-r--r--compiler/GHC/StgToCmm/Prim.hs6
-rw-r--r--compiler/GHC/Tc/Solver/Interact.hs2
-rw-r--r--compiler/GHC/Tc/Types/Constraint.hs3
-rw-r--r--compiler/GHC/Tc/Utils/Unify.hs1
-rw-r--r--compiler/GHC/Tc/Utils/Zonk.hs1
-rw-r--r--compiler/GHC/Types/FieldLabel.hs2
-rw-r--r--compiler/GHC/Types/Unique/DFM.hs2
-rw-r--r--compiler/GHC/Utils/Error.hs2
18 files changed, 17 insertions, 26 deletions
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index 0b5abdc711..948914e92a 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -10,8 +10,14 @@ ToDo:
(i1 + i2) only if it results in a valid Float.
-}
-{-# LANGUAGE CPP, RankNTypes, PatternSynonyms, ViewPatterns, RecordWildCards,
- DeriveFunctor, LambdaCase, TypeApplications, MultiWayIf #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE PatternSynonyms #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE -Wno-incomplete-uni-patterns #-}
diff --git a/compiler/GHC/Data/Graph/Directed.hs b/compiler/GHC/Data/Graph/Directed.hs
index e6adf612ea..451d31f125 100644
--- a/compiler/GHC/Data/Graph/Directed.hs
+++ b/compiler/GHC/Data/Graph/Directed.hs
@@ -2,7 +2,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
diff --git a/compiler/GHC/Driver/Env.hs b/compiler/GHC/Driver/Env.hs
index 5608c12b15..50c2b5caf6 100644
--- a/compiler/GHC/Driver/Env.hs
+++ b/compiler/GHC/Driver/Env.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
-{-# LANGUAGE DeriveFunctor #-}
module GHC.Driver.Env
( Hsc(..)
diff --git a/compiler/GHC/Driver/Errors.hs b/compiler/GHC/Driver/Errors.hs
index de66b60a2c..0cfa0d20f5 100644
--- a/compiler/GHC/Driver/Errors.hs
+++ b/compiler/GHC/Driver/Errors.hs
@@ -1,5 +1,3 @@
-{-# LANGUAGE ViewPatterns #-}
-
module GHC.Driver.Errors (
warningsToMessages
, printOrThrowWarnings
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index fe49f2a8e2..38d55e61f2 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -1,7 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE NondecreasingIndentation #-}
-{-# LANGUAGE LambdaCase #-}
{-# OPTIONS_GHC -fprof-auto-top #-}
-------------------------------------------------------------------------------
@@ -1211,8 +1210,7 @@ checkSafeImports tcg_env
cond' :: ImportedModsVal -> ImportedModsVal -> Hsc ImportedModsVal
cond' v1 v2
| imv_is_safe v1 /= imv_is_safe v2
- = do
- throwOneError $ mkPlainErrMsg (imv_span v1)
+ = throwOneError $ mkPlainErrMsg (imv_span v1)
(text "Module" <+> ppr (imv_name v1) <+>
(text $ "is imported both as a safe and unsafe import!"))
| otherwise
diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs
index 220e1bf5b2..8d4db19f92 100644
--- a/compiler/GHC/Driver/MakeFile.hs
+++ b/compiler/GHC/Driver/MakeFile.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
-{-# LANGUAGE LambdaCase #-}
-----------------------------------------------------------------------------
--
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs
index 201eb06255..1f895c20ec 100644
--- a/compiler/GHC/Hs/Binds.hs
+++ b/compiler/GHC/Hs/Binds.hs
@@ -1,6 +1,5 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs
index 59280962d3..de94c185ea 100644
--- a/compiler/GHC/Parser/PostProcess.hs
+++ b/compiler/GHC/Parser/PostProcess.hs
@@ -982,7 +982,7 @@ checkPat loc (L l e@(PatBuilderVar (L _ c))) tyargs args
| not (null args) && patIsRec c =
add_hint SuggestRecursiveDo $
patFail l (ppr e)
-checkPat loc (L _ (PatBuilderAppType f t)) tyargs args = do
+checkPat loc (L _ (PatBuilderAppType f t)) tyargs args =
checkPat loc f (t : tyargs) args
checkPat loc (L _ (PatBuilderApp f e)) [] args = do
p <- checkLPat e
diff --git a/compiler/GHC/Rename/HsType.hs b/compiler/GHC/Rename/HsType.hs
index b4498c80ee..3cc51b651c 100644
--- a/compiler/GHC/Rename/HsType.hs
+++ b/compiler/GHC/Rename/HsType.hs
@@ -2,7 +2,6 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
-{-# LANGUAGE ViewPatterns #-}
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
diff --git a/compiler/GHC/Rename/Pat.hs b/compiler/GHC/Rename/Pat.hs
index b2a3874c0a..80ab505ee5 100644
--- a/compiler/GHC/Rename/Pat.hs
+++ b/compiler/GHC/Rename/Pat.hs
@@ -1,7 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs
index afb495e9e7..b7efb3b8ee 100644
--- a/compiler/GHC/StgToCmm/Prim.hs
+++ b/compiler/GHC/StgToCmm/Prim.hs
@@ -2955,7 +2955,7 @@ doAtomicAddrRMW
-> CmmType -- ^ Pointed value type
-> CmmExpr -- ^ Op argument (e.g. amount to add)
-> FCode ()
-doAtomicAddrRMW res amop addr ty n = do
+doAtomicAddrRMW res amop addr ty n =
emitPrimCall
[ res ]
(MO_AtomicRMW (typeWidth ty) amop)
@@ -2982,7 +2982,7 @@ doAtomicReadAddr
-> CmmExpr -- ^ Addr#
-> CmmType -- ^ Type of element by which we are indexing
-> FCode ()
-doAtomicReadAddr res addr ty = do
+doAtomicReadAddr res addr ty =
emitPrimCall
[ res ]
(MO_AtomicRead (typeWidth ty))
@@ -3009,7 +3009,7 @@ doAtomicWriteAddr
-> CmmType -- ^ Type of element by which we are indexing
-> CmmExpr -- ^ Value to write
-> FCode ()
-doAtomicWriteAddr addr ty val = do
+doAtomicWriteAddr addr ty val =
emitPrimCall
[ {- no results -} ]
(MO_AtomicWrite (typeWidth ty))
diff --git a/compiler/GHC/Tc/Solver/Interact.hs b/compiler/GHC/Tc/Solver/Interact.hs
index e8ab8ad82a..62e289b543 100644
--- a/compiler/GHC/Tc/Solver/Interact.hs
+++ b/compiler/GHC/Tc/Solver/Interact.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, MultiWayIf #-}
+{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
diff --git a/compiler/GHC/Tc/Types/Constraint.hs b/compiler/GHC/Tc/Types/Constraint.hs
index c714bee20f..3862d842b0 100644
--- a/compiler/GHC/Tc/Types/Constraint.hs
+++ b/compiler/GHC/Tc/Types/Constraint.hs
@@ -1,4 +1,5 @@
-{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, MultiWayIf #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
diff --git a/compiler/GHC/Tc/Utils/Unify.hs b/compiler/GHC/Tc/Utils/Unify.hs
index 892ab050d5..735edc8ff0 100644
--- a/compiler/GHC/Tc/Utils/Unify.hs
+++ b/compiler/GHC/Tc/Utils/Unify.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
-{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
diff --git a/compiler/GHC/Tc/Utils/Zonk.hs b/compiler/GHC/Tc/Utils/Zonk.hs
index fbcc8444ed..9e2908fff8 100644
--- a/compiler/GHC/Tc/Utils/Zonk.hs
+++ b/compiler/GHC/Tc/Utils/Zonk.hs
@@ -1,7 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
-{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
diff --git a/compiler/GHC/Types/FieldLabel.hs b/compiler/GHC/Types/FieldLabel.hs
index 226a854f6f..87f0b9eed8 100644
--- a/compiler/GHC/Types/FieldLabel.hs
+++ b/compiler/GHC/Types/FieldLabel.hs
@@ -1,7 +1,5 @@
{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{-
diff --git a/compiler/GHC/Types/Unique/DFM.hs b/compiler/GHC/Types/Unique/DFM.hs
index ef78dbe6af..f3009de2a2 100644
--- a/compiler/GHC/Types/Unique/DFM.hs
+++ b/compiler/GHC/Types/Unique/DFM.hs
@@ -15,8 +15,6 @@ is not deterministic.
-}
{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE DeriveFoldable #-}
-{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
diff --git a/compiler/GHC/Utils/Error.hs b/compiler/GHC/Utils/Error.hs
index 2c7edd30e9..2e47601e8c 100644
--- a/compiler/GHC/Utils/Error.hs
+++ b/compiler/GHC/Utils/Error.hs
@@ -521,7 +521,7 @@ withTiming' dflags what force_result prtimings action
where whenPrintTimings = liftIO . when (prtimings == PrintTimings)
- recordAllocs alloc = do
+ recordAllocs alloc =
liftIO $ traceMarkerIO $ "GHC:allocs:" ++ show alloc
eventBegins ctx w = do