packages feed

polysemy-chronos 0.2.0.1 → 0.2.0.2

raw patch · 5 files changed

+19/−10 lines, 5 filesdep ~polysemyPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: polysemy

API changes (from Hackage documentation)

- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.Calendar Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasDate Chronos.Time Chronos.Date
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasDay Chronos.Date
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasDay Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasDay Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasHour Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasHour Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasHour Chronos.TimeOfDay
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasMinute Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasMinute Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasMinute Chronos.TimeOfDay
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasMonth Chronos.Date
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasMonth Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasMonth Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasNanoSecond Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasNanoSecond Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasNanoSecond Chronos.TimeOfDay
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasSecond Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasSecond Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasSecond Chronos.TimeOfDay
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasYear Chronos.Date
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasYear Chronos.Datetime
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Calendar.HasYear Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Class.Instant.Instant Chronos.Datetime Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Class.Instant.Instant Chronos.Time Chronos.Time
- Polysemy.Chronos.Orphans: instance Polysemy.Time.Data.TimeUnit.TimeUnit Chronos.Timespan
- Polysemy.Chronos.Time: dateToTime :: Date -> Time
- Polysemy.Chronos.Time: negateTimespan :: Timespan -> Timespan
- Polysemy.Chronos.Time: now :: Member (Embed IO) r => Sem r Time
- Polysemy.Chronos.Time: timeToDate :: Time -> Date

Files

changelog.md view
@@ -1,5 +1,9 @@ # Unreleased +# 0.2.0.2++* Bugfix: Chronos treats months as zero-based, while `mkDate` uses 1-base.+ # 0.1.4.0 * Add interpreters that remain at a fixed instant 
lib/Polysemy/Chronos.hs view
@@ -1,5 +1,5 @@ {-|-This package provides an interpreter implementation and instances for 'Chronos' of the 'Polysemy.Time' library.+This package provides an interpreter implementation and instances for "Chronos" of the 'Polysemy.Time' library. -} module Polysemy.Chronos (   -- * Interpreters
lib/Polysemy/Chronos/Orphans.hs view
@@ -1,5 +1,7 @@-{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# options_ghc -fno-warn-orphans #-}+{-# options_haddock prune, hide #-} +-- |Orphans for "Chronos", Internal module Polysemy.Chronos.Orphans where  import qualified Chronos as Chronos@@ -133,7 +135,7 @@   type CalendarDate Datetime = Date   type CalendarTime Datetime = TimeOfDay   mkDate y m d =-    Date (Year (fromIntegral y)) (Month (fromIntegral m)) (DayOfMonth (fromIntegral d))+    Date (Year (fromIntegral y)) (Month (fromIntegral m - 1)) (DayOfMonth (fromIntegral d))   mkTime h m s =     TimeOfDay (fromIntegral h) (fromIntegral m) (s * 1000000000)   mkDatetime y mo d h mi s =
lib/Polysemy/Chronos/Time.hs view
@@ -1,3 +1,6 @@+{-# options_haddock prune #-}++-- |Time interpreters for "Chronos", Internal module Polysemy.Chronos.Time where  import qualified Chronos as Chronos@@ -9,7 +12,7 @@  import Polysemy.Chronos.Orphans () --- |Convenience alias for 'Chronos'.+-- |Convenience alias for "Chronos". type ChronosTime =   Time Chronos.Time Chronos.Date @@ -27,7 +30,7 @@ dateToTime =   dayToTimeMidnight . dateToDay --- |Interpret 'Time' with the types from 'Chronos'.+-- |Interpret 'Time' with the types from "Chronos". interpretTimeChronos ::   Member (Embed IO) r =>   InterpreterFor ChronosTime r@@ -47,7 +50,7 @@       unit {-# inline interpretTimeChronos #-} --- |Interpret 'Time' with the types from 'Chronos', customizing the current time at the start of interpretation.+-- |Interpret 'Time' with the types from "Chronos", customizing the current time at the start of interpretation. interpretTimeChronosAt ::   Member (Embed IO) r =>   Chronos.Time ->@@ -56,7 +59,7 @@   interpretTimeChronos . interceptTimeAt @Timespan t {-# inline interpretTimeChronosAt #-} --- |Interpret 'Time' with the types from 'Chronos', customizing the current time to be constant.+-- |Interpret 'Time' with the types from "Chronos", customizing the current time to be constant. interpretTimeChronosConstant ::   Member (Embed IO) r =>   Chronos.Time ->@@ -65,7 +68,7 @@   interpretTimeChronos . interceptTimeConstant t {-# inline interpretTimeChronosConstant #-} --- |Interpret 'Time' with the types from 'Chronos', customizing the current time to be constantly the time at the+-- |Interpret 'Time' with the types from "Chronos", customizing the current time to be constantly the time at the -- start of interpretation. interpretTimeChronosConstantNow ::   Member (Embed IO) r =>
polysemy-chronos.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           polysemy-chronos-version:        0.2.0.1+version:        0.2.0.2 synopsis:       Polysemy-time Interpreters for Chronos description:    Please see the readme on Github at <https://github.com/tek/polysemy-time> category:       Time@@ -92,7 +92,7 @@   build-depends:       base ==4.*     , chronos >=1.1.1 && <1.2-    , polysemy >=1.3+    , polysemy >=1.4     , polysemy-time   mixins:       base hiding (Prelude)