Commit c8dc3f58 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

-Wall police.

parent 559cb13c
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PackageDescription.PrettyPrint
......@@ -17,7 +18,9 @@ module Distribution.PackageDescription.PrettyPrint (
showGenericPackageDescription,
) where
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid (Monoid(mempty))
#endif
import Distribution.PackageDescription
( Benchmark(..), BenchmarkInterface(..), benchmarkType
, TestSuite(..), TestSuiteInterface(..), testType
......@@ -27,7 +30,7 @@ import Distribution.PackageDescription
Flag(..), PackageDescription(..),
GenericPackageDescription(..))
import Text.PrettyPrint
(hsep, comma, punctuate, parens, char, nest, empty,
(hsep, parens, char, nest, empty,
isEmpty, ($$), (<+>), colon, (<>), text, vcat, ($+$), Doc, render)
import Distribution.Simple.Utils (writeUTF8File)
import Distribution.ParseUtils (showFreeText, FieldDescr(..), indentWith, ppField, ppFields)
......
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module PackageTests.DeterministicAr.Check where
......@@ -7,7 +8,9 @@ import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BS8
import Data.Char (isSpace)
import Data.List
#if __GLASGOW_HASKELL__ < 710
import Data.Traversable
#endif
import PackageTests.PackageTester
import System.Exit
import System.FilePath
......
{-# LANGUAGE CPP #-}
module UnitTests.Distribution.Utils.NubList
( tests
) where
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid
#endif
import Distribution.Utils.NubList
import Test.Framework
import Test.Framework.Providers.HUnit (testCase)
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Config
......@@ -91,8 +92,10 @@ import Data.List
( partition, find, foldl' )
import Data.Maybe
( fromMaybe )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
( Monoid(..) )
#endif
import Control.Monad
( unless, foldM, liftM, liftM2 )
import qualified Distribution.Compat.ReadP as Parse
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Configure
......@@ -55,7 +56,9 @@ import Distribution.Verbosity as Verbosity
import Distribution.Version
( Version(..), VersionRange, orLaterVersion )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (Monoid(..))
#endif
-- | Choose the Cabal version such that the setup scripts compiled against this
-- version will support the given command-line flags.
......
{-# LANGUAGE CPP #-}
module Distribution.Client.Dependency.Modular.Preference where
-- Reordering or pruning the tree in order to prefer or make certain choices.
import qualified Data.List as L
import qualified Data.Map as M
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
#endif
import Data.Ord
import Distribution.Client.Dependency.Types
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Dependency.Types
......@@ -59,8 +60,10 @@ import Data.List
( foldl', maximumBy, minimumBy, nub, sort, sortBy, groupBy )
import Data.Maybe
( fromJust, fromMaybe, catMaybes )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
( Monoid(mempty) )
#endif
import Control.Monad
( guard )
import qualified Data.Set as Set
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Dependency.TopDown.Constraints
......@@ -35,8 +36,10 @@ import Distribution.Version
import Distribution.Client.Utils
( mergeBy, MergeResult(..) )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
( Monoid(mempty) )
#endif
import Data.Either
( partitionEithers )
import qualified Data.Map as Map
......
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
-----------------------------------------------------------------------------
-- |
......@@ -29,13 +30,20 @@ module Distribution.Client.Dependency.Types (
foldProgress,
) where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
( Applicative(..), Alternative(..) )
( Applicative(..) )
#endif
import Control.Applicative
( Alternative(..) )
import Data.Char
( isAlpha, toLower )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
( Monoid(..) )
#endif
import Distribution.Client.Types
( OptionalStanza(..), SourcePackage(..) )
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Exec
......@@ -30,8 +31,10 @@ import Distribution.System (Platform)
import Distribution.Verbosity (Verbosity)
import System.FilePath (searchPathSeparator, (</>))
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
import Data.Monoid (mempty)
#endif
-- | Execute the given command in the package's environment.
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Freeze
......@@ -54,8 +55,10 @@ import Distribution.Verbosity
import Control.Monad
( when )
import qualified Data.ByteString.Lazy.Char8 as BS.Char8
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
( mempty )
#endif
import Data.Version
( showVersion )
import Distribution.Version
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Get
......@@ -51,8 +52,10 @@ import Data.List
import qualified Data.Map
import Data.Maybe
( listToMaybe, mapMaybe )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
( mempty )
#endif
import Data.Ord
( comparing )
import System.Directory
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.IndexUtils
......@@ -63,7 +64,9 @@ import Distribution.Simple.Utils
import Data.Char (isAlphaNum)
import Data.Maybe (mapMaybe, fromMaybe)
import Data.List (isPrefixOf)
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (Monoid(..))
#endif
import qualified Data.Map as Map
import Control.Monad (MonadPlus(mplus), when, liftM)
import Control.Exception (evaluate)
......
......@@ -40,10 +40,12 @@ import Data.Maybe
import Data.Function
( on )
import qualified Data.Map as M
#if !MIN_VERSION_base(4,8,0)
import Data.Traversable
( traverse )
import Control.Applicative
( (<$>) )
#endif
import Control.Monad
( when, unless, (>=>), join, forM_ )
import Control.Arrow
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Init.Heuristics
......@@ -35,14 +36,18 @@ import Distribution.Client.Utils
import Language.Haskell.Extension ( Extension )
import Distribution.Client.Types ( packageDescription, SourcePackageDb(..) )
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ( pure, (<$>), (<*>) )
#endif
import Control.Arrow ( first )
import Control.Monad ( liftM )
import Data.Char ( isAlphaNum, isNumber, isUpper, isLower, isSpace )
import Data.Either ( partitionEithers )
import Data.List ( isInfixOf, isPrefixOf, isSuffixOf, sortBy )
import Data.Maybe ( mapMaybe, catMaybes, maybeToList )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid ( mempty, mappend, mconcat, )
#endif
import Data.Ord ( comparing )
import qualified Data.Set as Set ( fromList, toList )
import System.Directory ( getCurrentDirectory, getDirectoryContents,
......
{-# LANG|UAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Init.Types
......@@ -27,7 +28,9 @@ import qualified Text.PrettyPrint as Disp
import qualified Distribution.Compat.ReadP as Parse
import Distribution.Text
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
#endif
-- | InitFlags is really just a simple type to represent certain
-- portions of a .cabal file. Rather than have a flag for EVERY
......
......@@ -45,8 +45,10 @@ import System.Exit
( ExitCode(..) )
import Distribution.Compat.Exception
( catchIO, catchExit )
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
( (<$>) )
#endif
import Control.Monad
( forM_, when, unless )
import System.Directory
......
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
-----------------------------------------------------------------------------
-- |
......@@ -63,7 +64,9 @@ import qualified Data.Graph as Graph
import qualified Data.Array as Array
import Data.Array ((!))
import Data.List (groupBy, sortBy, nub, isInfixOf)
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (Monoid(..))
#endif
import Data.Maybe (isJust, isNothing, fromMaybe, catMaybes)
import Distribution.Package
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Run
......@@ -28,7 +29,9 @@ import Distribution.Verbosity (Verbosity)
import qualified Distribution.Simple.GHCJS as GHCJS
#if !MIN_VERSION_base(4,8,0)
import Data.Functor ((<$>))
#endif
import Data.List (find)
import System.Directory (getCurrentDirectory)
import Distribution.Compat.Environment (getEnvironment)
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Sandbox
......@@ -104,7 +105,9 @@ import Data.Char ( ord )
import Data.IORef ( newIORef, writeIORef, readIORef )
import Data.List ( delete, foldl' )
import Data.Maybe ( fromJust, fromMaybe )
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid ( mempty, mappend )
#endif
import Data.Word ( Word32 )
import Numeric ( showHex )
import System.Directory ( createDirectory
......
Markdown is supported
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