diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-24 20:41:46 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-24 20:41:46 -0400 |
| commit | 027864bd1a18f2240f56cd3fb499c4d5d8caa45a (patch) | |
| tree | 4ec2757777a4dfa2f62946bcabe663f73330881f /src | |
| parent | e3a44ab5825466f9db9c4749497445bd0af1068e (diff) | |
ported
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Scheduled.hs | 6 |
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 |
