[commit: packages/time] master: comments (cae9a55)

git at git.haskell.org git at git.haskell.org
Sun Dec 20 07:48:31 UTC 2015


Repository : ssh://git@git.haskell.org/time

On branch  : master
Link       : http://git.haskell.org/packages/time.git/commitdiff/cae9a559b5e04cf6a909e50a849701ef1a4b9ee9

>---------------------------------------------------------------

commit cae9a559b5e04cf6a909e50a849701ef1a4b9ee9
Author: Ashley Yakeley <ashley at semantic.org>
Date:   Sun Oct 30 21:20:38 2005 -0800

    comments
    
    darcs-hash:20051031052038-ac6dd-53d86650e4a39607f63fa4512d559cad30995bcf


>---------------------------------------------------------------

cae9a559b5e04cf6a909e50a849701ef1a4b9ee9
 Data/Fixed.hs          | 6 +++---
 Data/Time/Clock/UTC.hs | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Data/Fixed.hs b/Data/Fixed.hs
index 697c460..919862b 100644
--- a/Data/Fixed.hs
+++ b/Data/Fixed.hs
@@ -10,16 +10,16 @@ module Data.Fixed
 	E12,Pico
 ) where
 
--- | like "div", but with a more useful type
+-- | generalisation of 'div' to any instance of Real
 div' :: (Real a,Integral b) => a -> a -> b
 div' n d = floor ((toRational n) / (toRational d))
 
--- | like "divMod", but with a more useful type
+-- | generalisation of 'divMod' to any instance of Real
 divMod' :: (Real a,Integral b) => a -> a -> (b,a)
 divMod' n d = (f,n - (fromIntegral f) * d) where
 	f = div' n d
 
--- | like "mod", but with a more useful type
+-- | generalisation of 'mod' to any instance of Real
 mod' :: (Real a) => a -> a -> a
 mod' n d = n - (fromInteger f) * d where
 	f = div' n d
diff --git a/Data/Time/Clock/UTC.hs b/Data/Time/Clock/UTC.hs
index d1ca38d..282ee4f 100644
--- a/Data/Time/Clock/UTC.hs
+++ b/Data/Time/Clock/UTC.hs
@@ -9,6 +9,9 @@ module Data.Time.Clock.UTC
 	-- These corrections are not predictable and are announced with six month's notice.
 	-- No table of these corrections is provided, as any program compiled with it would become
 	-- out of date in six months.
+	-- 
+	-- If you don't care about leap seconds, use UTCTime and NominalDiffTime for your clock calculations,
+	-- and you'll be fine.
 	UTCTime(..),NominalDiffTime,
 	addUTCTime,diffUTCTime,
 	



More information about the ghc-commits mailing list