Skip to content

Commit 5fd4043

Browse files
committed
Remove redundant import warnings for 7.10
1 parent 825e109 commit 5fd4043

45 files changed

Lines changed: 164 additions & 12 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

psci/Completion.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
{-# LANGUAGE CPP #-}
2+
13
module Completion where
24

35
import Data.Maybe (mapMaybe)
46
import Data.List (nub, nubBy, sortBy, isPrefixOf, stripPrefix)
57
import Data.Char (isUpper)
68
import Data.Function (on)
9+
#if __GLASGOW_HASKELL__ < 710
710
import Data.Traversable (traverse)
11+
#endif
812

913
import Control.Arrow (second)
14+
#if __GLASGOW_HASKELL__ < 710
1015
import Control.Applicative ((<$>), (<*>))
16+
#endif
1117
import Control.Monad.Trans.Reader (asks, runReaderT, ReaderT)
1218
import Control.Monad.Trans.State.Strict
1319

psci/PSCi.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1818
{-# LANGUAGE RecordWildCards #-}
1919
{-# LANGUAGE TupleSections #-}
20+
{-# LANGUAGE CPP #-}
2021

2122
module PSCi where
2223

2324
import Data.Foldable (traverse_)
2425
import Data.List (intercalate, nub, sort)
26+
#if __GLASGOW_HASKELL__ < 710
2527
import Data.Traversable (traverse)
28+
#endif
2629
import Data.Tuple (swap)
2730
import Data.Version (showVersion)
2831
import qualified Data.Map as M

psci/Parser.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
--
1414
-----------------------------------------------------------------------------
1515

16+
{-# LANGUAGE CPP #-}
17+
1618
module Parser
1719
( parseCommand
1820
) where
@@ -22,7 +24,9 @@ import Prelude hiding (lex)
2224
import Data.Char (isSpace)
2325
import Data.List (intercalate)
2426

27+
#if __GLASGOW_HASKELL__ < 710
2528
import Control.Applicative hiding (many)
29+
#endif
2630

2731
import Text.Parsec hiding ((<|>))
2832

src/Control/Monad/Supply.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
-----------------------------------------------------------------------------
1515

1616
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
17+
{-# LANGUAGE CPP #-}
1718

1819
module Control.Monad.Supply where
1920

2021
import Data.Functor.Identity
2122

23+
#if __GLASGOW_HASKELL__ < 710
2224
import Control.Applicative
25+
#endif
2326
import Control.Monad.State
2427
import Control.Monad.Error.Class (MonadError(..))
2528
import Control.Monad.Reader

src/Language/PureScript/AST/Declarations.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-----------------------------------------------------------------------------
1414

15-
{-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables #-}
15+
{-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables, CPP #-}
1616

1717
module Language.PureScript.AST.Declarations where
1818

@@ -21,7 +21,9 @@ import qualified Data.Map as M
2121

2222
import Control.Monad.Identity
2323

24+
#if __GLASGOW_HASKELL__ < 710
2425
import Control.Applicative
26+
#endif
2527

2628
import Language.PureScript.AST.Binders
2729
import Language.PureScript.AST.Operators

src/Language/PureScript/AST/Traversals.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@
1212
--
1313
-----------------------------------------------------------------------------
1414

15+
{-# LANGUAGE CPP #-}
16+
1517
module Language.PureScript.AST.Traversals where
1618

19+
#if __GLASGOW_HASKELL__ < 710
1720
import Data.Monoid (Monoid(..), mconcat)
21+
#endif
1822
import Data.Maybe (mapMaybe)
23+
#if __GLASGOW_HASKELL__ < 710
1924
import Data.Traversable (traverse)
25+
#endif
2026

27+
#if __GLASGOW_HASKELL__ < 710
2128
import Control.Applicative
29+
#endif
2230
import Control.Monad
2331
import Control.Arrow ((***), (+++), second)
2432

src/Language/PureScript/Bundle.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
{-# LANGUAGE ScopedTypeVariables #-}
2121
{-# LANGUAGE TupleSections #-}
2222
{-# LANGUAGE RecordWildCards #-}
23+
{-# LANGUAGE CPP #-}
2324

2425
module Language.PureScript.Bundle (
2526
bundle
@@ -38,7 +39,9 @@ import Data.Version (showVersion)
3839

3940
import qualified Data.Set as S
4041

42+
#if __GLASGOW_HASKELL__ < 710
4143
import Control.Applicative
44+
#endif
4245
import Control.Monad
4346
import Control.Monad.Error.Class
4447
import Language.JavaScript.Parser

src/Language/PureScript/CodeGen/JS.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
{-# LANGUAGE ViewPatterns #-}
1818
{-# LANGUAGE FlexibleContexts #-}
1919
{-# LANGUAGE ScopedTypeVariables #-}
20+
{-# LANGUAGE CPP #-}
2021

2122
module Language.PureScript.CodeGen.JS
2223
( module AST
@@ -28,7 +29,9 @@ module Language.PureScript.CodeGen.JS
2829
import Data.List ((\\), delete, intersect)
2930
import qualified Data.Traversable as T (traverse)
3031

32+
#if __GLASGOW_HASKELL__ < 710
3133
import Control.Applicative
34+
#endif
3235
import Control.Arrow ((&&&))
3336
import Control.Monad (replicateM, forM)
3437
import Control.Monad.Reader (MonadReader, asks)

src/Language/PureScript/CodeGen/JS/AST.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@
1313
--
1414
-----------------------------------------------------------------------------
1515

16-
{-# LANGUAGE DeriveDataTypeable #-}
16+
{-# LANGUAGE DeriveDataTypeable, CPP #-}
1717

1818
module Language.PureScript.CodeGen.JS.AST where
1919

20+
#if __GLASGOW_HASKELL__ < 710
2021
import Control.Applicative (Applicative, (<$>), (<*>))
22+
#endif
2123
import Control.Monad.Identity
2224
import Data.Data
25+
#if __GLASGOW_HASKELL__ < 710
2326
import Data.Traversable (traverse)
27+
#endif
2428

2529
import Language.PureScript.Comments
2630
import Language.PureScript.Traversals

src/Language/PureScript/CodeGen/JS/Optimizer.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@
3131
--
3232
-----------------------------------------------------------------------------
3333

34-
{-# LANGUAGE FlexibleContexts #-}
34+
{-# LANGUAGE FlexibleContexts, CPP #-}
3535

3636
module Language.PureScript.CodeGen.JS.Optimizer (
3737
optimize
3838
) where
3939

40+
#if __GLASGOW_HASKELL__ < 710
4041
import Control.Applicative (Applicative)
42+
#endif
4143
import Control.Monad.Reader (MonadReader, ask, asks)
4244
import Control.Monad.Supply.Class (MonadSupply)
4345

0 commit comments

Comments
 (0)