From d530acecd938050d1bdd573976f930fb19fe9487 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Jul 2017 18:42:37 -0400 Subject: improve haddock --- src/Propellor/Property/Versioned.hs | 4 ++-- src/Propellor/Types.hs | 4 ++++ 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 -- cgit v1.2.3