From 334abae31277b9f47b85813d7b2fd783e5b3b12d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 25 Jan 2015 13:28:04 -0400 Subject: fix combines instance The old one caused the actions to run in the right order, but with the wrong description. This problem was found by comparing the [Host] between this branch and current joeyconfig, and printing out their properties, info, and also their list of child properties. The only other difference found is that onChange orders the child property list differently. That does not have any real effect and would be difficult to change, so I've left it as-is. --- src/Propellor/Types.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Types.hs') diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs index afdbaec7..9a0e22ab 100644 --- a/src/Propellor/Types.hs +++ b/src/Propellor/Types.hs @@ -250,7 +250,8 @@ instance Combines (Property HasInfo) (Property NoInfo) where IProperty d1 (a2 <> a1) i1 (toIProperty y : cs1) instance Combines (Property NoInfo) (Property HasInfo) where - requires x y = requires y x + requires (SProperty d1 a1 cs1) y@(IProperty _d2 a2 _i2 _cs2) = + IProperty d1 (a2 <> a1) mempty (y : map toIProperty cs1) instance Combines (Property NoInfo) (Property NoInfo) where requires (SProperty d1 a1 cs1) y@(SProperty _d2 a2 _cs2) = -- cgit v1.2.3