summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Scheduled.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-24 20:41:46 -0400
committerJoey Hess2016-03-24 20:41:46 -0400
commit027864bd1a18f2240f56cd3fb499c4d5d8caa45a (patch)
tree4ec2757777a4dfa2f62946bcabe663f73330881f /src/Propellor/Property/Scheduled.hs
parente3a44ab5825466f9db9c4749497445bd0af1068e (diff)
ported
Diffstat (limited to 'src/Propellor/Property/Scheduled.hs')
-rw-r--r--src/Propellor/Property/Scheduled.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Property/Scheduled.hs b/src/Propellor/Property/Scheduled.hs
index 64a530bc..534e1e88 100644
--- a/src/Propellor/Property/Scheduled.hs
+++ b/src/Propellor/Property/Scheduled.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-}
module Propellor.Property.Scheduled
( period
@@ -36,10 +36,10 @@ period prop recurrance = flip describe desc $ adjustPropertySatisfy prop $ \sati
desc = propertyDesc prop ++ " (period " ++ fromRecurrance recurrance ++ ")"
-- | Like period, but parse a human-friendly string.
-periodParse :: Property NoInfo -> String -> Property NoInfo
+periodParse :: (IsProp (Property i)) => Property i -> String -> Property i
periodParse prop s = case toRecurrance s of
Just recurrance -> period prop recurrance
- Nothing -> property "periodParse" $ do
+ Nothing -> adjustPropertySatisfy prop $ \_ -> do
liftIO $ warningMessage $ "failed periodParse: " ++ s
noChange