summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Concurrent.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-25 18:39:50 -0400
committerJoey Hess2016-03-25 18:39:50 -0400
commitce8d34d094be30e1432ecaaae81b188671180624 (patch)
tree289e2bba5ca5291c14255c5b5fe6cf6d007a1bcf /src/Propellor/Property/Concurrent.hs
parent860d1dd77e1789a91ed61bdceab667d94c9bd345 (diff)
ported more
Ssh is WIP and failing to compile quite badly
Diffstat (limited to 'src/Propellor/Property/Concurrent.hs')
-rw-r--r--src/Propellor/Property/Concurrent.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Propellor/Property/Concurrent.hs b/src/Propellor/Property/Concurrent.hs
index 8d608a54..a86c839f 100644
--- a/src/Propellor/Property/Concurrent.hs
+++ b/src/Propellor/Property/Concurrent.hs
@@ -77,8 +77,8 @@ concurrently p1 p2 = (combineWith go go p1 p2)
--
-- The above example will run foo and bar concurrently, and once either of
-- those 2 properties finishes, will start running baz.
-concurrentList :: IO Int -> Desc -> PropList -> Property HasInfo
-concurrentList getn d (PropList ps) = infoProperty d go mempty ps
+concurrentList :: SingI metatypes => IO Int -> Desc -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
+concurrentList getn d (Props ps) = property d go `modifyChildren` (++ ps)
where
go = do
n <- liftIO getn
@@ -97,14 +97,10 @@ concurrentList getn d (PropList ps) = infoProperty d go mempty ps
(p:rest) -> return (rest, Just p)
case v of
Nothing -> return r
- -- This use of getSatisfy does not lose any
- -- Info asociated with the property, because
- -- concurrentList sets all the properties as
- -- children, and so propigates their info.
Just p -> do
hn <- asks hostName
r' <- actionMessageOn hn
- (propertyDesc p)
+ (getDesc p)
(getSatisfy p)
worker q (r <> r')