diff options
author | Joey Hess <joeyh@joeyh.name> | 2018-04-22 12:22:50 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2018-04-22 12:22:50 -0400 |
commit | 475b936c5111619225bc36c6706e6a987d2f709d (patch) | |
tree | 87b0ad8958d88bf91bb1310729251b30f898a928 | |
parent | 337a83c2778e8e1aacd071cb8a3c46e5f975a786 (diff) |
simplify constraints for new ghc
ghc started warning about the IsProp (Property i) constraint;
removing it the code builds.
This may break building with older ghc.
-rw-r--r-- | src/Propellor/Property/Scheduled.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Propellor/Property/Scheduled.hs b/src/Propellor/Property/Scheduled.hs index 729a3749..4a756c41 100644 --- a/src/Propellor/Property/Scheduled.hs +++ b/src/Propellor/Property/Scheduled.hs @@ -21,7 +21,7 @@ import qualified Data.Map as M -- -- This uses the description of the Property to keep track of when it was -- last run. -period :: (IsProp (Property i)) => Property i -> Recurrance -> Property i +period :: Property i -> Recurrance -> Property i period prop recurrance = flip describe desc $ adjustPropertySatisfy prop $ \satisfy -> do lasttime <- liftIO $ getLastChecked (getDesc prop) nexttime <- liftIO $ fmap startTime <$> nextTime schedule lasttime @@ -37,7 +37,7 @@ period prop recurrance = flip describe desc $ adjustPropertySatisfy prop $ \sati desc = getDesc prop ++ " (period " ++ fromRecurrance recurrance ++ ")" -- | Like period, but parse a human-friendly string. -periodParse :: (IsProp (Property i)) => Property i -> String -> Property i +periodParse :: Property i -> String -> Property i periodParse prop s = case toRecurrance s of Just recurrance -> period prop recurrance Nothing -> adjustPropertySatisfy prop $ \_ -> do |