packages feed

cron 0.4.1 → 0.4.1.1

raw patch · 4 files changed

+11/−8 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- System.Cron.Internal.Check: [domF] :: Expanded -> EField
- System.Cron.Internal.Check: [dowF] :: Expanded -> EField
- System.Cron.Internal.Check: [hourF] :: Expanded -> EField
- System.Cron.Internal.Check: [minF] :: Expanded -> EField
- System.Cron.Internal.Check: [monthF] :: Expanded -> EField
- System.Cron.Internal.Check: instance GHC.Show.Show System.Cron.Internal.Check.Expanded
- System.Cron.Schedule: [unSchedule] :: ScheduleT m a -> StateT Jobs (ExceptT ScheduleError m) a
- System.Cron.Schedule: instance GHC.Base.Functor m => GHC.Base.Functor (System.Cron.Schedule.ScheduleT m)
- System.Cron.Schedule: instance GHC.Base.Monad m => Control.Monad.Error.Class.MonadError System.Cron.Schedule.ScheduleError (System.Cron.Schedule.ScheduleT m)
- System.Cron.Schedule: instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState System.Cron.Schedule.Jobs (System.Cron.Schedule.ScheduleT m)
- System.Cron.Schedule: instance GHC.Base.Monad m => GHC.Base.Applicative (System.Cron.Schedule.ScheduleT m)
- System.Cron.Schedule: instance GHC.Base.Monad m => GHC.Base.Monad (System.Cron.Schedule.ScheduleT m)
- System.Cron.Schedule: instance GHC.Base.Monad m => System.Cron.Schedule.MonadSchedule (System.Cron.Schedule.ScheduleT m)
- System.Cron.Schedule: instance GHC.Show.Show System.Cron.Schedule.Job
- System.Cron.Schedule: instance GHC.Show.Show System.Cron.Schedule.ScheduleError
- System.Cron.Types: [cronCommand] :: CronCommand -> Text
- System.Cron.Types: [crontabEntries] :: Crontab -> [CrontabEntry]
- System.Cron.Types: [dayOfMonth] :: CronSchedule -> DayOfMonthSpec
- System.Cron.Types: [dayOfWeek] :: CronSchedule -> DayOfWeekSpec
- System.Cron.Types: [hour] :: CronSchedule -> HourSpec
- System.Cron.Types: [minute] :: CronSchedule -> MinuteSpec
- System.Cron.Types: [month] :: CronSchedule -> MonthSpec
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.BaseField
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.CronCommand
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.CronField
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.CronSchedule
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.Crontab
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.CrontabEntry
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.DayOfMonthSpec
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.DayOfWeekSpec
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.HourSpec
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.MinuteSpec
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.MonthSpec
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.RangeField
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.SpecificField
- System.Cron.Types: instance GHC.Classes.Eq System.Cron.Types.StepField
- System.Cron.Types: instance GHC.Classes.Ord System.Cron.Types.CronCommand
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.BaseField
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.CronCommand
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.CronField
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.CronSchedule
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.Crontab
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.CrontabEntry
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.DayOfMonthSpec
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.DayOfWeekSpec
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.HourSpec
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.MinuteSpec
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.MonthSpec
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.RangeField
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.SpecificField
- System.Cron.Types: instance GHC.Show.Show System.Cron.Types.StepField
- System.Cron.Types: instance System.Cron.Types.ShowT Data.Text.Internal.Text
- System.Cron.Types: instance System.Cron.Types.ShowT GHC.Types.Int
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.BaseField
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.CronCommand
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.CronField
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.CronSchedule
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.Crontab
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.CrontabEntry
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.DayOfMonthSpec
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.DayOfWeekSpec
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.HourSpec
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.MinuteSpec
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.MonthSpec
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.RangeField
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.SpecificField
- System.Cron.Types: instance System.Cron.Types.ShowT System.Cron.Types.StepField
+ System.Cron.Internal.Check: domF :: Expanded -> EField
+ System.Cron.Internal.Check: dowF :: Expanded -> EField
+ System.Cron.Internal.Check: hourF :: Expanded -> EField
+ System.Cron.Internal.Check: instance Show Expanded
+ System.Cron.Internal.Check: minF :: Expanded -> EField
+ System.Cron.Internal.Check: monthF :: Expanded -> EField
+ System.Cron.Schedule: instance (Monad m, Functor m) => Applicative (ScheduleT m)
+ System.Cron.Schedule: instance Functor m => Functor (ScheduleT m)
+ System.Cron.Schedule: instance Monad m => Monad (ScheduleT m)
+ System.Cron.Schedule: instance Monad m => MonadError ScheduleError (ScheduleT m)
+ System.Cron.Schedule: instance Monad m => MonadSchedule (ScheduleT m)
+ System.Cron.Schedule: instance Monad m => MonadState Jobs (ScheduleT m)
+ System.Cron.Schedule: instance Show Job
+ System.Cron.Schedule: instance Show ScheduleError
+ System.Cron.Schedule: unSchedule :: ScheduleT m a -> StateT Jobs (ExceptT ScheduleError m) a
+ System.Cron.Types: cronCommand :: CronCommand -> Text
+ System.Cron.Types: crontabEntries :: Crontab -> [CrontabEntry]
+ System.Cron.Types: dayOfMonth :: CronSchedule -> DayOfMonthSpec
+ System.Cron.Types: dayOfWeek :: CronSchedule -> DayOfWeekSpec
+ System.Cron.Types: hour :: CronSchedule -> HourSpec
+ System.Cron.Types: instance Eq BaseField
+ System.Cron.Types: instance Eq CronCommand
+ System.Cron.Types: instance Eq CronField
+ System.Cron.Types: instance Eq CronSchedule
+ System.Cron.Types: instance Eq Crontab
+ System.Cron.Types: instance Eq CrontabEntry
+ System.Cron.Types: instance Eq DayOfMonthSpec
+ System.Cron.Types: instance Eq DayOfWeekSpec
+ System.Cron.Types: instance Eq HourSpec
+ System.Cron.Types: instance Eq MinuteSpec
+ System.Cron.Types: instance Eq MonthSpec
+ System.Cron.Types: instance Eq RangeField
+ System.Cron.Types: instance Eq SpecificField
+ System.Cron.Types: instance Eq StepField
+ System.Cron.Types: instance Ord CronCommand
+ System.Cron.Types: instance Show BaseField
+ System.Cron.Types: instance Show CronCommand
+ System.Cron.Types: instance Show CronField
+ System.Cron.Types: instance Show CronSchedule
+ System.Cron.Types: instance Show Crontab
+ System.Cron.Types: instance Show CrontabEntry
+ System.Cron.Types: instance Show DayOfMonthSpec
+ System.Cron.Types: instance Show DayOfWeekSpec
+ System.Cron.Types: instance Show HourSpec
+ System.Cron.Types: instance Show MinuteSpec
+ System.Cron.Types: instance Show MonthSpec
+ System.Cron.Types: instance Show RangeField
+ System.Cron.Types: instance Show SpecificField
+ System.Cron.Types: instance Show StepField
+ System.Cron.Types: instance ShowT BaseField
+ System.Cron.Types: instance ShowT CronCommand
+ System.Cron.Types: instance ShowT CronField
+ System.Cron.Types: instance ShowT CronSchedule
+ System.Cron.Types: instance ShowT Crontab
+ System.Cron.Types: instance ShowT CrontabEntry
+ System.Cron.Types: instance ShowT DayOfMonthSpec
+ System.Cron.Types: instance ShowT DayOfWeekSpec
+ System.Cron.Types: instance ShowT HourSpec
+ System.Cron.Types: instance ShowT Int
+ System.Cron.Types: instance ShowT MinuteSpec
+ System.Cron.Types: instance ShowT MonthSpec
+ System.Cron.Types: instance ShowT RangeField
+ System.Cron.Types: instance ShowT SpecificField
+ System.Cron.Types: instance ShowT StepField
+ System.Cron.Types: instance ShowT Text
+ System.Cron.Types: minute :: CronSchedule -> MinuteSpec
+ System.Cron.Types: month :: CronSchedule -> MonthSpec

Files

changelog view
@@ -1,3 +1,5 @@+# 0.4.1.1+* Fix test suite for Stackage. # 0.4.1 * Compatibility release to get cron building with GHC < 7.10 again. # 0.4.0
cron.cabal view
@@ -1,5 +1,5 @@ Name:                cron-Version:             0.4.1+Version:             0.4.1.1 Description:   Cron data structure and Attoparsec parser. The idea is to embed it in larger   systems which want to roll their own scheduled tasks in a format that people
test/System/Test/Cron.hs view
@@ -273,8 +273,10 @@   , localOption (QuickCheckTests 20) $ testProperty "returns the first minute in the future that matches" $ \cs t ->       case nextMatch cs t of         Just res ->-          let Just actual = find (scheduleMatches cs) ((takeWhile (<= res) (nextMinutes t)))-          in res `sameMinute` actual+          let mactual = find (scheduleMatches cs) ((takeWhile (<= res) (nextMinutes t)))+          in case mactual of+             Just actual -> res `sameMinute` actual+             Nothing -> counterexample ("Could not find a next minute match for " <> show t <> ", expected " <> show res) False         Nothing -> property True   , testProperty "a schedule that produces Just for one t will produce it for any t" $ \cs t1 t2 -> isJust (nextMatch cs t1) ==>       counterexample ("nextMatch produced Just for " <> show t1 <> " but not " <> show t2) @@ -300,7 +302,7 @@ roundToMinute :: DiffTime -> DiffTime roundToMinute n = secondsToDiffTime (nInt - (nInt `mod` 60))   where-    nInt = round n+    nInt = truncate n   envSet :: CrontabEntry
test/System/Test/Cron/Parser.hs view
@@ -200,10 +200,9 @@   --------------------------------------------------------------------------------assertNoParse :: (Eq a, Show a)-                 => Parser a-                 -> Text-                 -> Assertion+assertNoParse :: Parser a+              -> Text+              -> Assertion assertNoParse parser txt = isLeft (parseOnly parser txt) @?= True