Skip to content

Commit

Permalink
Fix AMP related warnings. We are warning free now.
Browse files Browse the repository at this point in the history
  • Loading branch information
rrnewton committed May 31, 2016
1 parent 9000b99 commit 32afe61
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Criterion/Analysis.hs
Expand Up @@ -29,7 +29,7 @@ module Criterion.Analysis
) where

-- Temporary: to support pre-AMP GHC 7.8.4:
import Data.Monoid (Monoid(..))
import Data.Monoid

import Control.Arrow (second)
import Control.Monad (unless, when)
Expand All @@ -56,6 +56,7 @@ import qualified Data.Vector as V
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Unboxed as U
import qualified Statistics.Resampling.Bootstrap as B
import Prelude

-- | Classify outliers in a data set, using the boxplot technique.
classifyOutliers :: Sample -> Outliers
Expand Down
4 changes: 2 additions & 2 deletions Criterion/IO.hs
Expand Up @@ -112,8 +112,8 @@ readJSONReports path =
do bstr <- L.readFile path
let res = Aeson.eitherDecode bstr
case res of
Left err -> return res
Right (tg,vers,ls)
Left _ -> return res
Right (tg,vers,_)
| tg == headerRoot && vers == critVersion -> return res
| otherwise ->
do hPutStrLn stderr $ "Warning, readJSONReports: mismatched header, expected "
Expand Down
5 changes: 4 additions & 1 deletion Criterion/Main/Options.hs
Expand Up @@ -21,6 +21,9 @@ module Criterion.Main.Options
, versionInfo
) where

-- Temporary: to support pre-AMP GHC 7.8.4:
import Data.Monoid

import Control.Monad (when)
import Criterion.Analysis (validateAccessors)
import Criterion.Types (Config(..), Verbosity(..), measureAccessors,
Expand All @@ -29,7 +32,6 @@ import Data.Char (isSpace, toLower)
import Data.Data (Data, Typeable)
import Data.Int (Int64)
import Data.List (isPrefixOf)
import Data.Monoid (mempty)
import Data.Version (showVersion)
import GHC.Generics (Generic)
import Options.Applicative
Expand All @@ -39,6 +41,7 @@ import Options.Applicative.Types
import Paths_criterion (version)
import Text.PrettyPrint.ANSI.Leijen (Doc, text)
import qualified Data.Map as M
import Prelude

-- | How to match a benchmark name.
data MatchType = Prefix
Expand Down
3 changes: 2 additions & 1 deletion Criterion/Monad/Internal.hs
Expand Up @@ -18,13 +18,14 @@ module Criterion.Monad.Internal
) where

-- Temporary: to support pre-AMP GHC 7.8.4:
import Control.Applicative (Applicative)
import Control.Applicative

import Control.Monad.Reader (MonadReader(..), ReaderT)
import Control.Monad.Trans (MonadIO)
import Criterion.Types (Config)
import Data.IORef (IORef)
import System.Random.MWC (GenIO)
import Prelude

data Crit = Crit {
config :: !Config
Expand Down
5 changes: 3 additions & 2 deletions Criterion/Types.hs
Expand Up @@ -64,8 +64,8 @@ module Criterion.Types
) where

-- Temporary: to support pre-AMP GHC 7.8.4:
import Control.Applicative ((<$>), (<*>))
import Data.Monoid (Monoid(..))
import Control.Applicative
import Data.Monoid

import Control.DeepSeq (NFData(rnf))
import Control.Exception (evaluate)
Expand All @@ -78,6 +78,7 @@ import GHC.Generics (Generic)
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U
import qualified Statistics.Resampling.Bootstrap as B
import Prelude

-- | Control the amount of information displayed.
data Verbosity = Quiet
Expand Down

0 comments on commit 32afe61

Please sign in to comment.