summaryrefslogtreecommitdiff
path: root/src/Propellor/Property.hs
diff options
context:
space:
mode:
authorJoey Hess2015-10-27 14:34:10 -0400
committerJoey Hess2015-10-27 14:37:02 -0400
commit56c3394144abbb9862dc67379d3253c76ae4df97 (patch)
tree7e643b1f938343f883f6379382440516e6d3a5db /src/Propellor/Property.hs
parent77e3a5d4d968f3567b1b8e62996e0e6c803ab642 (diff)
Explicit Info/NoInfo for RevertableProperty (API change)
RevertableProperty used to be assumed to contain info, but this is now made explicit, with RevertableProperty HasInfo or RevertableProperty NoInfo. Transition guide: - If you define a RevertableProperty, expect some type check failures like: "Expecting one more argument to ‘RevertableProperty’". - Change it to "RevertableProperty NoInfo" - The compiler will then tell you if it needs "HasInfo" instead. - If you have code that uses the RevertableProperty constructor that fails to type check, use the more powerful <!> operator
Diffstat (limited to 'src/Propellor/Property.hs')
-rw-r--r--src/Propellor/Property.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs
index d80d9c1f..e967cac9 100644
--- a/src/Propellor/Property.hs
+++ b/src/Propellor/Property.hs
@@ -201,7 +201,7 @@ withOS :: Desc -> (Maybe System -> Propellor Result) -> Property NoInfo
withOS desc a = property desc $ a =<< getOS
-- | Undoes the effect of a RevertableProperty.
-revert :: RevertableProperty -> RevertableProperty
+revert :: RevertableProperty i -> RevertableProperty i
revert (RevertableProperty p1 p2) = RevertableProperty p2 p1
makeChange :: IO () -> Propellor Result