From af4e76d6ac50bd28f8814717b724ed413eb9d8a7 Mon Sep 17 00:00:00 2001 From: Rudy Matela Date: Thu, 4 Jul 2019 22:06:10 -0300 Subject: [PATCH] Cleanup imports. --- bench/arithficial.hs | 1 - eg/binarytree.hs | 1 - eg/binarytree0.hs | 1 - eg/bool.hs | 1 - eg/colour.hs | 2 -- eg/digraphs.hs | 3 --- eg/fun.hs | 2 +- eg/monad.hs | 2 +- eg/pretty.hs | 1 - eg/regexes.hs | 1 - eg/tauts.hs | 1 - src/Test/Speculate/CondReason.hs | 2 +- src/Test/Speculate/Function.hs | 2 +- src/Test/Speculate/Pretty.hs | 2 -- src/Test/Speculate/Reason.hs | 8 ++++---- tests/test-stats.hs | 5 ----- 16 files changed, 8 insertions(+), 27 deletions(-) diff --git a/bench/arithficial.hs b/bench/arithficial.hs index 3e34855..2e5324a 100644 --- a/bench/arithficial.hs +++ b/bench/arithficial.hs @@ -1,5 +1,4 @@ import Test.Speculate -import System.Environment (getArgs) -- How well does this tool performs on artificial operators f :: Num a => a -> a -> a diff --git a/eg/binarytree.hs b/eg/binarytree.hs index 8421cdb..a458503 100644 --- a/eg/binarytree.hs +++ b/eg/binarytree.hs @@ -2,7 +2,6 @@ {-# Language DeriveDataTypeable, StandaloneDeriving #-} -- for GHC <= 7.8 -- Colin Runciman, December 2016 import Test.Speculate -import Test.LeanCheck import Data.Function (on) diff --git a/eg/binarytree0.hs b/eg/binarytree0.hs index a0d2690..d70bd96 100644 --- a/eg/binarytree0.hs +++ b/eg/binarytree0.hs @@ -2,7 +2,6 @@ {-# Language DeriveDataTypeable, StandaloneDeriving #-} -- for GHC <= 7.8 -- Colin Runciman, December 2016 import Test.Speculate -import Test.LeanCheck import Data.Function (on) diff --git a/eg/bool.hs b/eg/bool.hs index 9ceaf6b..0dc3f24 100644 --- a/eg/bool.hs +++ b/eg/bool.hs @@ -1,5 +1,4 @@ import Test.Speculate -import Test.LeanCheck ((==>)) main :: IO () main = speculate args diff --git a/eg/colour.hs b/eg/colour.hs index e798a59..c29a860 100644 --- a/eg/colour.hs +++ b/eg/colour.hs @@ -1,10 +1,8 @@ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} -- for GHC < 7.10 import Test.Speculate import Test.Speculate.Utils.Colour -import Test.LeanCheck import Data.Ratio import Data.Function (on) -import Test.Speculate.Sanity deriving instance Typeable Colour -- for GHC < 7.10 diff --git a/eg/digraphs.hs b/eg/digraphs.hs index d85470d..e8ff4ed 100644 --- a/eg/digraphs.hs +++ b/eg/digraphs.hs @@ -1,8 +1,5 @@ {-# LANGUAGE CPP, DeriveDataTypeable, StandaloneDeriving #-} -- for GHC < 7.10 import Test.Speculate -import Test.LeanCheck hiding ((\/)) -import Test.LeanCheck.Utils -import Data.Function (on) import Digraph diff --git a/eg/fun.hs b/eg/fun.hs index cbb0083..f0e0ca3 100644 --- a/eg/fun.hs +++ b/eg/fun.hs @@ -1,5 +1,5 @@ import Test.Speculate -import Test.Speculate.Function.A100 +import Test.Speculate.Function.A100() main :: IO () main = speculate args diff --git a/eg/monad.hs b/eg/monad.hs index fe38bbb..d1af35d 100644 --- a/eg/monad.hs +++ b/eg/monad.hs @@ -1,5 +1,5 @@ import Test.Speculate -import Test.Speculate.Function.A100 +import Test.Speculate.Function.A100() import Control.Monad ((>=>)) diff --git a/eg/pretty.hs b/eg/pretty.hs index 987f7f9..914b98c 100644 --- a/eg/pretty.hs +++ b/eg/pretty.hs @@ -1,7 +1,6 @@ {-# LANGUAGE CPP #-} {-# Language DeriveDataTypeable, StandaloneDeriving #-} -- for GHC < 7.10 import Test.Speculate -import Test.LeanCheck import Data.Function (on) import Data.List (isPrefixOf) diff --git a/eg/regexes.hs b/eg/regexes.hs index e424130..58489bf 100644 --- a/eg/regexes.hs +++ b/eg/regexes.hs @@ -4,7 +4,6 @@ import Test.Speculate import Test.Speculate.Utils.Memoize import Data.Function (on) import Regex -import Data.Maybe (fromJust) instance Listable Symbol where list = [Symbol 'a', Symbol 'b', Symbol 'c'] diff --git a/eg/tauts.hs b/eg/tauts.hs index 282500a..cd65aaf 100644 --- a/eg/tauts.hs +++ b/eg/tauts.hs @@ -3,7 +3,6 @@ import Test.Speculate hiding (Name(..)) import qualified Test.Speculate as S import Taut hiding (main) -import Test.LeanCheck deriveListable ''Prop deriveListable ''Name diff --git a/src/Test/Speculate/CondReason.hs b/src/Test/Speculate/CondReason.hs index b79a4ff..8355ae1 100644 --- a/src/Test/Speculate/CondReason.hs +++ b/src/Test/Speculate/CondReason.hs @@ -13,7 +13,7 @@ import Test.Speculate.Expr import Test.Speculate.Reason import qualified Test.Speculate.Utils.Digraph as D import Test.Speculate.Utils.Digraph (Digraph) -import Data.Maybe (mapMaybe,maybeToList,fromMaybe) +import Data.Maybe (maybeToList,fromMaybe) import Data.List (lookup, sortBy) import Data.Function (on) import Data.Functor ((<$>)) -- for GHC < 7.10 diff --git a/src/Test/Speculate/Function.hs b/src/Test/Speculate/Function.hs index 90f6229..80a6d6f 100644 --- a/src/Test/Speculate/Function.hs +++ b/src/Test/Speculate/Function.hs @@ -20,7 +20,7 @@ module Test.Speculate.Function where import Test.Speculate -import Test.LeanCheck.Function +import Test.LeanCheck.Function() import Test.LeanCheck.Error (errorToNothing) import Data.Function (on) diff --git a/src/Test/Speculate/Pretty.hs b/src/Test/Speculate/Pretty.hs index 2ecedff..c46105c 100644 --- a/src/Test/Speculate/Pretty.hs +++ b/src/Test/Speculate/Pretty.hs @@ -20,8 +20,6 @@ import Test.Speculate.Reason (Thy, finalEquations) import Test.Speculate.SemiReason (Shy, finalSemiEquations) import Test.Speculate.CondReason (Chy, finalCondEquations) -import Data.Typeable (typeOf, TypeRep) - type Equation = (Expr,Expr) type CondEquation = (Expr,Expr,Expr) diff --git a/src/Test/Speculate/Reason.hs b/src/Test/Speculate/Reason.hs index 2b4114b..2473a7a 100644 --- a/src/Test/Speculate/Reason.hs +++ b/src/Test/Speculate/Reason.hs @@ -58,13 +58,13 @@ import Test.Speculate.Expr import Test.Speculate.Reason.Order import Test.Speculate.Utils import Data.Either -import Data.Tuple (swap) -import Data.List (partition, (\\), sortBy, sort) import Data.Function (on) -import Data.Monoid ((<>)) import Data.Functor ((<$>)) -- for GHC < 7.10 +import Data.List (partition, (\\), sortBy, sort) +import Data.Maybe +import Data.Monoid ((<>)) +import Data.Tuple (swap) import qualified Data.List as L (insert) -import Data.Maybe (fromJust,isJust,listToMaybe,maybeToList,mapMaybe) import Control.Monad type Rule = (Expr,Expr) diff --git a/tests/test-stats.hs b/tests/test-stats.hs index b79dedb..dee4572 100644 --- a/tests/test-stats.hs +++ b/tests/test-stats.hs @@ -1,12 +1,7 @@ -- Test library import Test --- Helper -import Data.Function (on) - -- Functions under test -import Test.Speculate -import Test.Speculate.Expr import Test.Speculate.Reason import Test.Speculate.Utils