Commit 2f923ce2 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Drop pre-AMP compatibility CPP conditionals

Since GHC 8.1/8.2 only needs to be bootstrap-able by GHC 7.10 and
GHC 8.0 (and GHC 8.2), we can now finally drop all that pre-AMP
compatibility CPP-mess for good!

Reviewers: austin, goldfire, bgamari

Subscribers: goldfire, thomie, erikd

Differential Revision: https://phabricator.haskell.org/D1724
parent 0d207378
......@@ -39,9 +39,6 @@ import Type (mkTyConApp)
import Data.Function (on)
import qualified Data.Data as Data
import qualified Data.Typeable
#if __GLASGOW_HASKELL__ <= 708
import Control.Applicative ((<$>))
#endif
{-
************************************************************************
......
......@@ -56,7 +56,6 @@ Of course, datatypes with no constructors cannot have any fields.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
......@@ -79,11 +78,6 @@ import Binary
import Data.Data
#if __GLASGOW_HASKELL__ < 709
import Data.Foldable ( Foldable )
import Data.Traversable ( Traversable )
#endif
-- | Field labels are just represented as strings;
-- they are not necessarily unique (even within a module)
type FieldLabelString = FastString
......
-- (c) The University of Glasgow, 1992-2006
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveFunctor #-}
......@@ -85,10 +84,6 @@ import Util
import Outputable
import FastString
#if __GLASGOW_HASKELL__ < 709
import Data.Foldable ( Foldable )
import Data.Traversable ( Traversable )
#endif
import Data.Bits
import Data.Data
import Data.List
......
......@@ -33,9 +33,7 @@ import Data.Bits
import Data.List (nub)
import Control.Monad (liftM)
#if __GLASGOW_HASKELL__ >= 709
import Prelude hiding ((<*>))
#endif
#include "HsVersions.h"
......
......@@ -5,7 +5,7 @@
-- CmmLint: checking the correctness of Cmm statements and expressions
--
-----------------------------------------------------------------------------
{-# LANGUAGE GADTs, CPP #-}
{-# LANGUAGE GADTs #-}
module CmmLint (
cmmLint, cmmLintGraph
) where
......@@ -22,9 +22,6 @@ import Outputable
import DynFlags
import Control.Monad (liftM, ap)
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative (Applicative(..))
#endif
-- Things to check:
-- - invariant on CmmBlock in CmmExpr (see comment there)
......
......@@ -55,10 +55,6 @@ import Data.Word
import System.IO
import qualified Data.Map as Map
import Control.Monad (liftM, ap)
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative (Applicative(..))
#endif
import qualified Data.Array.Unsafe as U ( castSTUArray )
import Data.Array.ST
......
......@@ -52,9 +52,7 @@ import DynFlags
import Control.Monad
#if __GLASGOW_HASKELL__ >= 709
import Prelude hiding ((<*>))
#endif
------------------------------------------------------------------------
-- Top-level bindings
......
......@@ -50,9 +50,7 @@ import Outputable
import Control.Monad (unless,void)
import Control.Arrow (first)
#if __GLASGOW_HASKELL__ >= 709
import Prelude hiding ((<*>))
#endif
------------------------------------------------------------------------
-- cgExpr: the main function
......
{-# LANGUAGE CPP #-}
-- | Our extended FCode monad.
-- We add a mapping from names to CmmExpr, to support local variable names in
......@@ -54,9 +52,6 @@ import UniqFM
import Unique
import Control.Monad (liftM, ap)
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative (Applicative(..))
#endif
-- | The environment contains variable definitions or blockids.
data Named
......
......@@ -45,11 +45,7 @@ import BasicTypes
import Control.Monad
#if __GLASGOW_HASKELL__ >= 709
import Prelude hiding( succ, (<*>) )
#else
import Prelude hiding( succ )
#endif
-----------------------------------------------------------------------------
-- Code generation for Foreign Calls
......
......@@ -48,9 +48,7 @@ import DynFlags
import FastString( mkFastString, fsLit )
import Panic( sorry )
#if __GLASGOW_HASKELL__ >= 709
import Prelude hiding ((<*>))
#endif
import Control.Monad (when)
import Data.Maybe (isJust)
......
......@@ -25,9 +25,7 @@ module StgCmmLayout (
#include "HsVersions.h"
#if __GLASGOW_HASKELL__ >= 709
import Prelude hiding ((<*>))
#endif
import StgCmmClosure
import StgCmmEnv
......
......@@ -43,9 +43,7 @@ import FastString
import Outputable
import Util
#if __GLASGOW_HASKELL__ >= 709
import Prelude hiding ((<*>))
#endif
import Data.Bits ((.&.), bit)
import Control.Monad (liftM, when)
......
......@@ -61,10 +61,6 @@ import MonadUtils ( mapAccumLM )
import Data.List ( mapAccumL )
import Control.Monad
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
{-
-- ---------------------------------------------------------------------------
-- Overview
......
......@@ -80,9 +80,6 @@ import DynFlags
import Data.List
import Data.Char ( ord )
#if __GLASGOW_HASKELL__ < 709
import Data.Word ( Word )
#endif
infixl 4 `mkCoreApp`, `mkCoreApps`
......
......@@ -47,9 +47,6 @@ import qualified GHC.LanguageExtensions as LangExt
import Control.Monad
import Data.Int
#if __GLASGOW_HASKELL__ < 709
import Data.Traversable (traverse)
#endif
import Data.Word
{-
......
......@@ -25,9 +25,6 @@ import SrcLoc
import FastString -- sLit
import VarSet
#if __GLASGOW_HASKELL__ < 709
import Data.Functor ((<$>))
#endif
import Data.Maybe (mapMaybe)
import Data.List (groupBy, sortBy, nubBy)
import Control.Monad.Trans.State.Lazy
......
......@@ -36,9 +36,6 @@ import Util
-- From iserv
import SizedSeq
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative (Applicative(..))
#endif
import Control.Monad
import Control.Monad.ST ( runST )
import Control.Monad.Trans.Class
......
......@@ -47,10 +47,6 @@ import OrdList
import Data.List
import Foreign
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative (Applicative(..))
#endif
import Control.Monad
import Data.Char
......
......@@ -68,15 +68,8 @@ import Data.Array.Base
import Data.Ix
import Data.List
import qualified Data.Sequence as Seq
#if __GLASGOW_HASKELL__ < 709
import Data.Monoid (mappend)
#endif
import Data.Sequence (viewl, ViewL(..))
#if __GLASGOW_HASKELL__ >= 709
import Foreign
#else
import Foreign.Safe
#endif
import System.IO.Unsafe
---------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment