From 475b936c5111619225bc36c6706e6a987d2f709d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Apr 2018 12:22:50 -0400 Subject: 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. --- src/Propellor/Property/Scheduled.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3