summaryrefslogtreecommitdiff
path: root/src/Propellor/Property.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-24 17:25:58 -0400
committerJoey Hess2016-03-24 17:28:20 -0400
commit83cd812ab5ac787769b34f59d1763f3c8648f06a (patch)
tree23b056fbe8616d34b623b58181e56225fcb939d6 /src/Propellor/Property.hs
parent3d6a0d8663d32344a9f0761a144bfcacf9667378 (diff)
convert ensureProperty
Moved to its own module to keep everything related in one place.
Diffstat (limited to 'src/Propellor/Property.hs')
-rw-r--r--src/Propellor/Property.hs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs
index e5ccf9b1..27d17135 100644
--- a/src/Propellor/Property.hs
+++ b/src/Propellor/Property.hs
@@ -18,7 +18,8 @@ module Propellor.Property (
-- * Constructing properties
, Propellor
, property
- --, ensureProperty
+ , property'
+ , ensureProperty
--, withOS
, unsupportedOS
, makeChange
@@ -49,8 +50,10 @@ import Prelude
import Propellor.Types
import Propellor.Types.ResultCheck
+import Propellor.Types.MetaTypes
import Propellor.Info
import Propellor.Exception
+import Propellor.EnsureProperty
import Utility.Exception
import Utility.Monad
import Utility.Misc
@@ -159,13 +162,6 @@ describe = setDesc
(==>) = flip describe
infixl 1 ==>
--- | For when code running in the Propellor monad needs to ensure a
--- Property.
---
--- This can only be used on a Property that has NoInfo.
---ensureProperty :: Property NoInfo -> Propellor Result
---ensureProperty = catchPropellor . propertySatisfy
-
-- | Tries the first property, but if it fails to work, instead uses
-- the second.
fallback :: (Combines p1 p2) => p1 -> p2 -> CombinedType p1 p2