diff --git a/Data/Time/Clock/Scale.hs b/Data/Time/Clock/Scale.hs index f07fd642671e74576227495286b17cde982ac93d..fb67cc563d6894e89bc64c5a9c440f2c21b114d6 100644 --- a/Data/Time/Clock/Scale.hs +++ b/Data/Time/Clock/Scale.hs @@ -83,6 +83,14 @@ instance Fractional DiffTime where recip (MkDiffTime a) = MkDiffTime (recip a) fromRational r = MkDiffTime (fromRational r) +-- necessary because H98 doesn't have "cunning newtype" derivation +instance RealFrac DiffTime where + properFraction (MkDiffTime a) = let (b',a') = properFraction a in (b',MkDiffTime a') + truncate (MkDiffTime a) = truncate a + round (MkDiffTime a) = round a + ceiling (MkDiffTime a) = ceiling a + floor (MkDiffTime a) = floor a + -- | Create a 'DiffTime' which represents an integral number of seconds. secondsToDiffTime :: Integer -> DiffTime secondsToDiffTime = fromInteger diff --git a/configure.ac b/configure.ac index b04e8cd7f0569df5b0dea30c42b48af634256596..dc58c49f67f52f5705ed2d287bde62d6832ab4bb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([Haskell time package], [1.2.0.3], [ashley@semantic.org], [time]) +AC_INIT([Haskell time package], [1.3], [ashley@semantic.org], [time]) # Safety check: Ensure that we are in the correct source directory. AC_CONFIG_SRCDIR([include/HsTime.h]) diff --git a/time.cabal b/time.cabal index 5ca55576526ac84bfd94f0545f1ddc2231545dc5..21bf3e48e8eee694c137dabe1a92887ab560821e 100644 --- a/time.cabal +++ b/time.cabal @@ -1,5 +1,5 @@ name: time -version: 1.2.0.5 +version: 1.3 stability: stable license: BSD3 license-file: LICENSE