[commit: packages/time] format-widths, ghc, improve-leapseconds, master, posix-perf, tasty, wip/travis: document orphan Read instances (0a8946c)

git at git.haskell.org git at git.haskell.org
Fri Apr 21 16:53:43 UTC 2017


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

On branches: format-widths,ghc,improve-leapseconds,master,posix-perf,tasty,wip/travis
Link       : http://git.haskell.org/packages/time.git/commitdiff/0a8946c3bc8159960dd50ef28ff17b21aceb4e92

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

commit 0a8946c3bc8159960dd50ef28ff17b21aceb4e92
Author: Ashley Yakeley <ashley at yakeley.org>
Date:   Sat Feb 21 02:02:29 2015 -0800

    document orphan Read instances


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

0a8946c3bc8159960dd50ef28ff17b21aceb4e92
 lib/Data/Time/Calendar/Days.hs       | 3 +++
 lib/Data/Time/Clock/UTC.hs           | 7 +++++--
 lib/Data/Time/LocalTime/LocalTime.hs | 6 ++++++
 lib/Data/Time/LocalTime/TimeOfDay.hs | 3 +++
 lib/Data/Time/LocalTime/TimeZone.hs  | 3 +++
 5 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/lib/Data/Time/Calendar/Days.hs b/lib/Data/Time/Calendar/Days.hs
index 3ff0efb..c2ea920 100644
--- a/lib/Data/Time/Calendar/Days.hs
+++ b/lib/Data/Time/Calendar/Days.hs
@@ -15,6 +15,9 @@ import Data.Data
 #endif
 
 -- | The Modified Julian Day is a standard count of days, with zero being the day 1858-11-17.
+--
+-- For the 'Read' instance of 'Day',
+-- import "Data.Time" or "Data.Time.Format".
 newtype Day = ModifiedJulianDay {toModifiedJulianDay :: Integer} deriving (Eq,Ord
 #if LANGUAGE_DeriveDataTypeable
 #if LANGUAGE_Rank2Types
diff --git a/lib/Data/Time/Clock/UTC.hs b/lib/Data/Time/Clock/UTC.hs
index 0c0a7d3..63783e2 100644
--- a/lib/Data/Time/Clock/UTC.hs
+++ b/lib/Data/Time/Clock/UTC.hs
@@ -29,8 +29,11 @@ import Data.Data
 -- It consists of the day number, and a time offset from midnight.
 -- Note that if a day has a leap second added to it, it will have 86401 seconds.
 --
--- For the 'Show' instance of 'UTCTime' import @Data.Time@ or
--- @Data.Time.LocalTime at .
+-- For the 'Read' instance of 'UTCTime',
+-- import "Data.Time" or "Data.Time.Format".
+--
+-- For the 'Show' instance of 'UTCTime',
+-- import "Data.Time" or "Data.Time.LocalTime".
 data UTCTime = UTCTime {
     -- | the day
     utctDay :: Day,
diff --git a/lib/Data/Time/LocalTime/LocalTime.hs b/lib/Data/Time/LocalTime/LocalTime.hs
index b2ae6e6..d653fb5 100644
--- a/lib/Data/Time/LocalTime/LocalTime.hs
+++ b/lib/Data/Time/LocalTime/LocalTime.hs
@@ -27,6 +27,9 @@ import Data.Data
 -- and the time is a TimeOfDay.
 -- Conversion of this (as local civil time) to UTC depends on the time zone.
 -- Conversion of this (as local mean time) to UT1 depends on the longitude.
+--
+-- For the 'Read' instance of 'LocalTime',
+-- import "Data.Time" or "Data.Time.Format".
 data LocalTime = LocalTime {
     localDay    :: Day,
     localTimeOfDay   :: TimeOfDay
@@ -68,6 +71,9 @@ localTimeToUT1 :: Rational -> LocalTime -> UniversalTime
 localTimeToUT1 long (LocalTime (ModifiedJulianDay localMJD) tod) = ModJulianDate ((fromIntegral localMJD) + (timeOfDayToDayFraction tod) - (long / 360))
 
 -- | A local time together with a TimeZone.
+--
+-- For the 'Read' instance of 'ZonedTime',
+-- import "Data.Time" or "Data.Time.Format".
 data ZonedTime = ZonedTime {
     zonedTimeToLocalTime :: LocalTime,
     zonedTimeZone :: TimeZone
diff --git a/lib/Data/Time/LocalTime/TimeOfDay.hs b/lib/Data/Time/LocalTime/TimeOfDay.hs
index 91d77df..8e6e7cc 100644
--- a/lib/Data/Time/LocalTime/TimeOfDay.hs
+++ b/lib/Data/Time/LocalTime/TimeOfDay.hs
@@ -21,6 +21,9 @@ import Data.Data
 #endif
 
 -- | Time of day as represented in hour, minute and second (with picoseconds), typically used to express local time of day.
+--
+-- For the 'Read' instance of 'TimeOfDay',
+-- import "Data.Time" or "Data.Time.Format".
 data TimeOfDay = TimeOfDay {
     -- | range 0 - 23
     todHour    :: Int,
diff --git a/lib/Data/Time/LocalTime/TimeZone.hs b/lib/Data/Time/LocalTime/TimeZone.hs
index 630ca54..6c2f39b 100644
--- a/lib/Data/Time/LocalTime/TimeZone.hs
+++ b/lib/Data/Time/LocalTime/TimeZone.hs
@@ -30,6 +30,9 @@ import Data.Data
 #endif
 
 -- | A TimeZone is a whole number of minutes offset from UTC, together with a name and a \"just for summer\" flag.
+--
+-- For the 'Read' instance of 'TimeZone',
+-- import "Data.Time" or "Data.Time.Format".
 data TimeZone = TimeZone {
     -- | The number of minutes offset from UTC. Positive means local time will be later in the day than UTC.
     timeZoneMinutes :: Int,



More information about the ghc-commits mailing list