# bjornbm/dimensional

Remove time dependency. Issue #30.

1 parent 57a400d commit 16889361ba718472f5e02bef919506682772bd61 committed Mar 4, 2014
Showing with 7 additions and 8 deletions.
1. +6 −6 Numeric/Units/Dimensional/DK/SIUnits.lhs
2. +1 −2 dimensional-dk.cabal
 @@ -27,8 +27,7 @@ referenced are from [1] unless otherwise specified. > import Numeric.Units.Dimensional.DK > import Numeric.Units.Dimensional.DK.Quantities > import Numeric.NumType.DK ( neg1, neg2, pos2, pos3 ) -> import Data.Time.Clock (DiffTime) -> import Prelude ( (.), Num, Real (toRational), Fractional (fromRational), Floating, recip ) +> import Prelude ( (.), Num, Real, realToFrac, Fractional, Floating, recip ) > import qualified Prelude @@ -116,10 +115,11 @@ quantities. In order to convert between the 'DiffTime' data type in the 'Data.Time' library and 'Time' quantities we provide the functions 'fromDiffTime' and 'toDiffTime'. -> fromDiffTime :: (Fractional a) => DiffTime -> Time a -> fromDiffTime = (*~ second) . fromRational . toRational -> toDiffTime :: (Real a, Fractional a) => Time a -> DiffTime -> toDiffTime = fromRational . toRational . (/~ second) +> {-# DEPRECATED fromDiffTime, toDiffTime "These will probably go away." #-} +> fromDiffTime :: (Real a, Fractional b) => a -> Time b +> fromDiffTime = (*~ second) . realToFrac +> toDiffTime :: (Real a, Fractional a, Fractional b) => Time a -> b +> toDiffTime = realToFrac . (/~ second) = SI derived units (section 4.2) =
 @@ -1,5 +1,5 @@ Name: dimensional-dk -Version: 0.6 +Version: 0.7 License: BSD3 License-File: LICENSE Copyright: Bjorn Buckwalter 2006-2014 @@ -29,7 +29,6 @@ Description: Category: Math, Physics Build-Type: Simple Build-Depends: base < 5, - time < 1.5, numtype-dk >= 0.3 && < 1.1 Exposed-Modules: Numeric.Units.Dimensional.DK, Numeric.Units.Dimensional.DK.Prelude,