From 97ea5eb5e811c4091730273909fefe79b008eb97 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 23 Feb 2010 20:41:47 -0500 Subject: [PATCH] trivial: Remove redundant imports and pointless variables. The dependency graph is bad enough right now as it is, removing redunant imports should help a bit. --- Data/Floating/Environment.hs | 2 -- Data/Floating/Helpers.hs | 2 -- Data/Floating/Types/Double.hs | 6 +----- Data/Floating/Types/Float.hs | 6 +----- Data/Poset.hs | 1 - 5 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Data/Floating/Environment.hs b/Data/Floating/Environment.hs index bab6e4c..4625694 100644 --- a/Data/Floating/Environment.hs +++ b/Data/Floating/Environment.hs @@ -65,8 +65,6 @@ import Data.Floating.Types.Core import Control.Exception import Control.Applicative import Control.Monad - -import System.IO.Unsafe import Debug.Trace import Foreign.C diff --git a/Data/Floating/Helpers.hs b/Data/Floating/Helpers.hs index ea53f56..552cd13 100644 --- a/Data/Floating/Helpers.hs +++ b/Data/Floating/Helpers.hs @@ -15,12 +15,10 @@ module Data.Floating.Helpers ( import Prelude hiding (Double, RealFloat(..), RealFrac(..)) import Data.Floating.Types.Core import Data.Roundable -import Data.Ratio import Data.Maybe import Foreign import Foreign.C -import System.IO.Unsafe foreign import ccall unsafe "double_format" double_format :: CString -> CChar -> CInt -> CDouble -> IO CInt diff --git a/Data/Floating/Types/Double.hs b/Data/Floating/Types/Double.hs index 285e050..2a32869 100644 --- a/Data/Floating/Types/Double.hs +++ b/Data/Floating/Types/Double.hs @@ -16,19 +16,15 @@ module Data.Floating.Types.Double ( import Prelude hiding (Double, Floating(..), RealFloat(..), Ord(..)) import Control.Applicative -import Control.Monad import Data.Maybe -import Data.Ratio import Data.Roundable import Data.Poset import GHC.Exts hiding (Double(..)) import GHC.Integer -import GHC.Prim import Foreign import Foreign.C -import System.IO.Unsafe import Data.Floating.Types.Core import Data.Floating.Helpers @@ -108,7 +104,7 @@ instance Roundable Double where toIntegral x = case classify x of FPInfinite -> Nothing FPNaN -> Nothing - otherwise -> Just . fromInteger . dropFrac $ x + _ -> Just . fromInteger . dropFrac $ x floor = libmDouble c_floor ceiling = libmDouble c_ceil truncate = libmDouble c_trunc diff --git a/Data/Floating/Types/Float.hs b/Data/Floating/Types/Float.hs index 3100fe8..16a1d04 100644 --- a/Data/Floating/Types/Float.hs +++ b/Data/Floating/Types/Float.hs @@ -16,18 +16,14 @@ module Data.Floating.Types.Float ( import Prelude hiding (Float, Floating(..), RealFloat(..), Ord(..)) import Control.Applicative -import Control.Monad import Data.Maybe -import Data.Ratio import Data.Roundable import Data.Poset import GHC.Exts hiding (Float(..)) -import GHC.Prim import Foreign import Foreign.C -import System.IO.Unsafe import Data.Floating.Types.Core import Data.Floating.Helpers @@ -108,7 +104,7 @@ instance Roundable Float where toIntegral x = case classify x of FPInfinite -> Nothing FPNaN -> Nothing - otherwise -> Just . fromInteger . dropFrac $ x + _ -> Just . fromInteger . dropFrac $ x floor = libmFloat c_floorf ceiling = libmFloat c_ceilf truncate = libmFloat c_truncf diff --git a/Data/Poset.hs b/Data/Poset.hs index 06ddbc3..06de482 100644 --- a/Data/Poset.hs +++ b/Data/Poset.hs @@ -21,7 +21,6 @@ module Data.Poset ( module Data.Poset ) where -import qualified Prelude import Prelude hiding (Ord(..), Ordering(..)) import Data.Poset.Instances import Data.Poset.Internal -- 2.11.4.GIT