summaryrefslogtreecommitdiff
path: root/src/Propellor/Property.hs
diff options
context:
space:
mode:
authorJoey Hess2015-10-16 12:30:34 -0400
committerJoey Hess2015-10-16 12:30:34 -0400
commit51634a1bfc091b0c2e005e58266771dab0710ffe (patch)
treeb0ae2dc87cf6d3a21bc81dbd4dcb0b63afb1d612 /src/Propellor/Property.hs
parent5cbbc8fbc5cfe0862ac278b63bb5f16f35998ee8 (diff)
parente5b5a190b7de979cd889c92ecff530417534864e (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property.hs')
-rw-r--r--src/Propellor/Property.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs
index 667dc52b..342db1a5 100644
--- a/src/Propellor/Property.hs
+++ b/src/Propellor/Property.hs
@@ -173,7 +173,12 @@ trivial p = adjustPropertySatisfy p $ \satisfy -> do
-- | Makes a property that is satisfied differently depending on the host's
-- operating system.
--
--- Note that the operating system may not be declared for some hosts.
+-- Note that the operating system may not be declared for all hosts.
+--
+-- > myproperty = withOS "foo installed" $ \o -> case o of
+-- > (Just (System (Debian suite) arch)) -> ...
+-- > (Just (System (Ubuntu release) arch)) -> ...
+-- > Nothing -> ...
withOS :: Desc -> (Maybe System -> Propellor Result) -> Property NoInfo
withOS desc a = property desc $ a =<< getOS