Skip to content

Commit

Permalink
Backport #10723: Remove unused -XCPP (#10752)
Browse files Browse the repository at this point in the history
* Remove redundant -XCPP

- Remove redundant -XCPP from Cabal-tree-diff
- Remove redundant -XCPP from cabal-install
- Remove redundant -XCPP from Cabal
- Remove redundant -XCPP from Cabal-QuickCheck
- Remove redundant -XCPP from Cabal-syntax
- Remove redundant -XCPP from Cabal-tests
- Remove redundant -XCPP from cabal-testsuite

(cherry picked from commit 7965c7f)

# Conflicts:
#	Cabal-syntax/src/Distribution/Compat/Binary.hs
#	Cabal-syntax/src/Distribution/Utils/Generic.hs
#	cabal-install/src/Distribution/Client/CmdUpdate.hs
#	cabal-install/src/Distribution/Client/InstallSymlink.hs
#	cabal-install/src/Distribution/Client/Targets.hs

* fix conflicts

---------

Co-authored-by: Phil de Joux <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 14, 2025
1 parent 4bb2f7c commit 18ee994
Show file tree
Hide file tree
Showing 66 changed files with 0 additions and 168 deletions.
1 change: 0 additions & 1 deletion Cabal-QuickCheck/src/Test/QuickCheck/GenericArbitrary.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
Expand Down
3 changes: 0 additions & 3 deletions Cabal-syntax/src/Distribution/Compat/Binary.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternSynonyms #-}

module Distribution.Compat.Binary
( decodeOrFailIO
, decodeFileOrFail'
Expand Down
2 changes: 0 additions & 2 deletions Cabal-syntax/src/Distribution/Compat/Exception.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE CPP #-}

module Distribution.Compat.Exception
( catchIO
, catchExit
Expand Down
5 changes: 0 additions & 5 deletions Cabal-syntax/src/Distribution/Compat/Graph.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

-----------------------------------------------------------------------------

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Compat.Graph
-- Copyright : (c) Edward Z. Yang 2016
Expand Down
2 changes: 0 additions & 2 deletions Cabal-syntax/src/Distribution/Compat/MonadFail.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE CPP #-}

-- | Compatibility layer for "Control.Monad.Fail"
module Distribution.Compat.MonadFail (Control.Monad.Fail.MonadFail (fail)) where

Expand Down
1 change: 0 additions & 1 deletion Cabal-syntax/src/Distribution/Compat/Newtype.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
Expand Down
1 change: 0 additions & 1 deletion Cabal-syntax/src/Distribution/Compat/Prelude.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Trustworthy #-}
Expand Down
1 change: 0 additions & 1 deletion Cabal-syntax/src/Distribution/Compat/Semigroup.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
Expand Down
1 change: 0 additions & 1 deletion Cabal-syntax/src/Distribution/FieldGrammar/Class.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE RankNTypes #-}
Expand Down
1 change: 0 additions & 1 deletion Cabal-syntax/src/Distribution/Fields/ParseResult.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}

Expand Down
3 changes: 0 additions & 3 deletions Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.PackageDescription.Parsec
-- Copyright : Isaac Jones 2003-2005
Expand Down
1 change: 0 additions & 1 deletion Cabal-syntax/src/Distribution/Parsec.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
Expand Down
3 changes: 0 additions & 3 deletions Cabal-syntax/src/Distribution/System.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.System
-- Copyright : Duncan Coutts 2007-2008
Expand Down
4 changes: 0 additions & 4 deletions Cabal-syntax/src/Distribution/Utils/Generic.hs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Utils.Generic
-- Copyright : Isaac Jones, Simon Marlow 2003-2004
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
module UnitTests.Distribution.CabalSpecVersion (tests) where

Expand Down
1 change: 0 additions & 1 deletion Cabal-tests/tests/UnitTests/Distribution/Utils/CharSet.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
module UnitTests.Distribution.Utils.CharSet where

import Prelude hiding (Foldable(..))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
module UnitTests.Distribution.Utils.Structured (tests) where

import Data.Proxy (Proxy (..))
Expand Down
1 change: 0 additions & 1 deletion Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -freduction-depth=0 #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.TreeDiff.Instances.Cabal () where
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -freduction-depth=0 #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.TreeDiff.Instances.CabalLanguage () where
Expand Down
1 change: 0 additions & 1 deletion Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -freduction-depth=0 #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.TreeDiff.Instances.CabalSPDX () where
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -freduction-depth=0 #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.TreeDiff.Instances.CabalVersion where
Expand Down
2 changes: 0 additions & 2 deletions Cabal/src/Distribution/Compat/Async.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE CPP #-}

-- | 'Async', yet using 'MVar's.
--
-- Adopted from @async@ library
Expand Down
1 change: 0 additions & 1 deletion Cabal/src/Distribution/Compat/ResponseFile.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}

Expand Down
1 change: 0 additions & 1 deletion Cabal/src/Distribution/Compat/Stack.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE RankNTypes #-}

Expand Down
1 change: 0 additions & 1 deletion Cabal/src/Distribution/Simple/GHCJS.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Benchmark.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Benchmark
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Build.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Build
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Clean.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Clean
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Common.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Common
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Copy.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
Expand All @@ -7,8 +6,6 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Copy
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Global.hs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Global
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Haddock.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Haddock
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Hscolour.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Hscolour
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Install.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
Expand All @@ -7,8 +6,6 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Install
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Register.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Register
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Repl.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.Repl
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/SDist.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Setup.SDist
-- Copyright : Isaac Jones 2003-2004
Expand Down
3 changes: 0 additions & 3 deletions Cabal/src/Distribution/Simple/Setup/Test.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Simple.Test
-- Copyright : Isaac Jones 2003-2004
Expand Down
2 changes: 0 additions & 2 deletions Cabal/src/Distribution/Utils/MapAccum.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE CPP #-}

module Distribution.Utils.MapAccum (mapAccumM) where

import Distribution.Compat.Prelude
Expand Down
1 change: 0 additions & 1 deletion Cabal/src/Distribution/Utils/Progress.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}

-- Note: This module was copied from cabal-install.
Expand Down
6 changes: 0 additions & 6 deletions cabal-install/src/Distribution/Client/Check.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{-# LANGUAGE CPP #-}

-----------------------------------------------------------------------------

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Client.Check
-- Copyright : (c) Lennart Kolmodin 2008
Expand Down
5 changes: 0 additions & 5 deletions cabal-install/src/Distribution/Client/CmdOutdated.hs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}

-----------------------------------------------------------------------------

-----------------------------------------------------------------------------

-- |
-- Module : Distribution.Client.CmdOutdated
-- Maintainer : [email protected]
Expand Down
Loading

0 comments on commit 18ee994

Please sign in to comment.