From 97c0b0b41359e20aac3334ea63236ee39fb43029 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 23 Feb 2010 21:38:09 -0500 Subject: [PATCH] floating: Add a new Data.Floating.Types module. This module combines all the modules under it, which are no longer exposed. --- Data/Floating.hs | 8 ++------ Data/Floating/CMath/Complex.hs | 3 +-- Data/Floating/Environment.hs | 2 +- Data/Floating/Types.hs | 19 +++++++++++++++++++ altfloat.cabal | 13 ++++++++----- 5 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 Data/Floating/Types.hs diff --git a/Data/Floating.hs b/Data/Floating.hs index 29e7ec9..65579c4 100644 --- a/Data/Floating.hs +++ b/Data/Floating.hs @@ -8,17 +8,13 @@ -- | Top level module for alternative floating point support. module Data.Floating ( - Double, Float, - module Data.Floating.Types.Core, + module Data.Floating.Types, module Data.Floating, ) where import Prelude hiding (RealFloat(..), RealFrac(..), Double, Float) -import Data.Floating.Types.Core hiding (Double, Float, FloatConvert) -import Data.Floating.Types.Double -import Data.Floating.Types.Float +import Data.Floating.Types import Data.Floating.Environment -import Data.Floating.Types.CMath import Control.Monad diff --git a/Data/Floating/CMath/Complex.hs b/Data/Floating/CMath/Complex.hs index 5d5e2a9..b7ce19c 100644 --- a/Data/Floating/CMath/Complex.hs +++ b/Data/Floating/CMath/Complex.hs @@ -33,8 +33,7 @@ module Data.Floating.CMath.Complex ( c_carg, c_cproj ) where -import Data.Floating.Types.CMath -import Data.Floating.Types.Core +import Data.Floating.Types import Foreign import Foreign.C diff --git a/Data/Floating/Environment.hs b/Data/Floating/Environment.hs index 4625694..e1af2b3 100644 --- a/Data/Floating/Environment.hs +++ b/Data/Floating/Environment.hs @@ -61,7 +61,7 @@ module Data.Floating.Environment ( import Prelude hiding (Float, Double, Floating(..), RealFloat(..)) -import Data.Floating.Types.Core +import Data.Floating.Types import Control.Exception import Control.Applicative import Control.Monad diff --git a/Data/Floating/Types.hs b/Data/Floating/Types.hs new file mode 100644 index 0000000..4b85859 --- /dev/null +++ b/Data/Floating/Types.hs @@ -0,0 +1,19 @@ +{- + - Copyright (C) 2010 Nick Bowler. + - + - License BSD2: 2-clause BSD license. See LICENSE for full terms. + - This is free software: you are free to change and redistribute it. + - There is NO WARRANTY, to the extent permitted by law. + -} + +-- | Floating point types, classes and instances. The class interface is +-- loosely based off of the C standard library; if a function here has the +-- same name as a C function, it should behave similarly. +module Data.Floating.Types ( + module Data.Floating.Types.Core +) where + +import Data.Floating.Types.Core +import Data.Floating.Types.Double () +import Data.Floating.Types.Float () +import Data.Floating.Types.CMath () diff --git a/altfloat.cabal b/altfloat.cabal index e303eb5..3b0d9ba 100644 --- a/altfloat.cabal +++ b/altfloat.cabal @@ -76,14 +76,17 @@ Library Exposed-Modules: Data.Floating.CMath, Data.Floating.CMath.Complex, - Data.Floating.Types.Core, - Data.Floating.Types.CMath, - Data.Floating.Types.Double, - Data.Floating.Types.Float, + Data.Floating.Types, Data.Floating.Prelude, Data.Floating.Environment, Data.Floating, Data.Poset, Data.Roundable Other-Modules: - Data.Floating.Helpers, Data.Poset.Internal, Data.Poset.Instances + Data.Floating.Helpers, + Data.Floating.Types.Core, + Data.Floating.Types.CMath, + Data.Floating.Types.Double, + Data.Floating.Types.Float, + Data.Poset.Internal, + Data.Poset.Instances -- 2.11.4.GIT