summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2017-07-15 18:42:37 -0400
committerJoey Hess2017-07-15 18:42:37 -0400
commitd530acecd938050d1bdd573976f930fb19fe9487 (patch)
treeb97dbda02ab0e5a108584afaee7c55044cdef69e
parent48a72400f5a8336076c50ed005911860e4be1d27 (diff)
improve haddock
-rw-r--r--src/Propellor/Property/Versioned.hs4
-rw-r--r--src/Propellor/Types.hs4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Propellor/Property/Versioned.hs b/src/Propellor/Property/Versioned.hs
index d6517ab9..58d3e8d5 100644
--- a/src/Propellor/Property/Versioned.hs
+++ b/src/Propellor/Property/Versioned.hs
@@ -18,11 +18,11 @@
--
-- > demo :: Versioned Int (RevertableProperty DebianLike DebianLike)
-- > demo ver =
--- > ver ( (== 1) --> Apache.modEnabled "foo"
+-- > ver ( (== 1) --> Apache.modEnabled "foo"
-- > `requires` Apache.modEnabled "foosupport"
-- > <|> (== 2) --> Apache.modEnabled "bar"
-- > <|> (> 2) --> Apache.modEnabled "baz"
--- > )
+-- > )
-- >
-- > foo :: Host
-- > foo = host "foo.example.com" $ props
diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs
index 155662c2..b7c7c7f7 100644
--- a/src/Propellor/Types.hs
+++ b/src/Propellor/Types.hs
@@ -107,6 +107,10 @@ adjustPropertySatisfy (Property t d s i c) f = Property t d (f <$> s) i c
-- | A property that can be reverted. The first Property is run
-- normally and the second is run when it's reverted.
+--
+-- See `Propellor.Property.Versioned.Versioned`
+-- for a way to use RevertableProperty to define different
+-- versions of a host.
data RevertableProperty setupmetatypes undometatypes = RevertableProperty
{ setupRevertableProperty :: Property setupmetatypes
, undoRevertableProperty :: Property undometatypes