packages feed

time 1.9.1 → 1.9.2

raw patch · 10 files changed

+46/−8 lines, 10 files

Files

changelog.md view
@@ -1,5 +1,10 @@ # Change Log +## [1.9.2]+- add Data and Typeable instance for CalendarDiffDays and CalendarDiffTime+- "@since" annotations for everything after 1.9+- fix import issue with GHC 8.6+ ## [1.9.1] - new functions secondsToNominalDiffTime & nominalDiffTimeToSeconds - expose FormatTime and ParseTime in Data.Time.Format.Internal
configure.ac view
@@ -1,4 +1,4 @@-AC_INIT([Haskell time package], [1.9.1], [ashley@semantic.org], [time])+AC_INIT([Haskell time package], [1.9.2], [ashley@semantic.org], [time])  # Safety check: Ensure that we are in the correct source directory. AC_CONFIG_SRCDIR([lib/include/HsTime.h])
lib/Data/Time/Calendar/CalendarDiffDays.hs view
@@ -8,14 +8,25 @@ #else import Data.Monoid #endif-#if MIN_VERSION_base(4,9,0)+#if MIN_VERSION_base(4,9,0) && !MIN_VERSION_base(4,11,0) import Data.Semigroup hiding (option) #endif+import Data.Typeable+import Data.Data  data CalendarDiffDays = CalendarDiffDays     { cdMonths :: Integer     , cdDays :: Integer-    } deriving Eq+    } deriving (Eq,+    Data+#if __GLASGOW_HASKELL__ >= 802+    -- ^ @since 1.9.2+#endif+    ,Typeable+#if __GLASGOW_HASKELL__ >= 802+    -- ^ @since 1.9.2+#endif+    )  #if MIN_VERSION_base(4,9,0) -- | Additive
lib/Data/Time/Clock/Internal/NominalDiffTime.hs view
@@ -24,10 +24,14 @@ newtype NominalDiffTime = MkNominalDiffTime Pico deriving (Eq,Ord,Data,Typeable)  -- | Create a 'NominalDiffTime' from a number of seconds.+--+-- @since 1.9.1 secondsToNominalDiffTime :: Pico -> NominalDiffTime secondsToNominalDiffTime = MkNominalDiffTime  -- | Get the seconds in a 'NominalDiffTime'.+--+-- @since 1.9.1 nominalDiffTimeToSeconds :: NominalDiffTime -> Pico nominalDiffTimeToSeconds (MkNominalDiffTime t) = t 
lib/Data/Time/Format/Format/Class.hs view
@@ -28,6 +28,7 @@  -- <http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html> class FormatTime t where+    -- | @since 1.9.1     formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> t -> String)  
lib/Data/Time/Format/Parse/Class.hs view
@@ -21,15 +21,20 @@ -- | The class of types which can be parsed given a UNIX-style time format -- string. class ParseTime t where+    -- | @since 1.9.1     substituteTimeSpecifier :: proxy t -> TimeLocale -> Char -> Maybe String     substituteTimeSpecifier _ _ _ = Nothing     -- | Get the string corresponding to the given format specifier.+    --+    -- @since 1.9.1     parseTimeSpecifier :: proxy t -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String     -- | Builds a time value from a parsed input string.     -- If the input does not include all the information needed to     -- construct a complete value, any missing parts should be taken     -- from 1970-01-01 00:00:00 +0000 (which was a Thursday).     -- In the absence of @%C@ or @%Y@, century is 1969 - 2068.+    --+    -- @since 1.9.1     buildTime :: TimeLocale -- ^ The time locale.               -> [(Char,String)] -- ^ Pairs of format characters and the                                  -- corresponding part of the input.
lib/Data/Time/LocalTime/Internal/CalendarDiffTime.hs view
@@ -7,17 +7,29 @@ #else import Data.Monoid #endif-#if MIN_VERSION_base(4,9,0)+#if MIN_VERSION_base(4,9,0) && !MIN_VERSION_base(4,11,0) import Data.Semigroup hiding (option) #endif import Data.Fixed+import Data.Typeable+import Data.Data import Data.Time.Calendar.CalendarDiffDays import Data.Time.Clock.Internal.NominalDiffTime  data CalendarDiffTime = CalendarDiffTime     { ctMonths :: Integer     , ctTime :: NominalDiffTime-    } deriving (Eq)+    } deriving (Eq,+    Data+#if __GLASGOW_HASKELL__ >= 802+    -- ^ @since 1.9.2+#endif+    ,Typeable+#if __GLASGOW_HASKELL__ >= 802+    -- ^ @since 1.9.2+#endif+    )+ #if MIN_VERSION_base(4,9,0) -- | Additive instance Semigroup CalendarDiffTime where
test/main/Test/TestUtil.hs view
@@ -7,7 +7,7 @@  assertFailure' :: String -> IO a assertFailure' s = do-    assertFailure s+    _ <- assertFailure s -- returns () in some versions     return undefined  assertJust :: Maybe a -> IO a
test/unix/Test/TestUtil.hs view
@@ -7,7 +7,7 @@  assertFailure' :: String -> IO a assertFailure' s = do-    assertFailure s+    _ <- assertFailure s -- returns () in some versions     return undefined  assertJust :: Maybe a -> IO a
time.cabal view
@@ -1,5 +1,5 @@ name:           time-version:        1.9.1+version:        1.9.2 stability:      stable license:        BSD3 license-file:   LICENSE