diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-24 15:21:48 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-24 15:21:48 -0400 |
| commit | 413c74cdd336eeae59aea9660e6fc7331d599a1b (patch) | |
| tree | da184ed2c6f8deaa6aa8089f47d80b526d31a74d /src | |
| parent | 7ee3157ab1922fd2f7158fd40927dca8a83ad4b0 (diff) | |
simplify
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Types.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs index 6c1412c1..25269969 100644 --- a/src/Propellor/Types.hs +++ b/src/Propellor/Types.hs @@ -30,6 +30,7 @@ module Propellor.Types , propertyDesc , propertyChildren , RevertableProperty(..) + , ChildProperty , IsProp(..) , Combines(..) , CombinedType @@ -230,17 +231,14 @@ instance IsProp ChildProperty where i <> mconcat (map getInfoRecursive c) instance IsProp (RevertableProperty setupmetatypes undometatypes) where - setDesc = setDescR + -- | Sets the description of both sides. + setDesc (RevertableProperty p1 p2) d = + RevertableProperty (setDesc p1 d) (setDesc p2 ("not " ++ d)) getDesc (RevertableProperty p1 _) = getDesc p1 -- toProp (RevertableProperty p1 _) = p1 -- | Return the Info of the currently active side. getInfoRecursive (RevertableProperty p1 _p2) = getInfoRecursive p1 --- | Sets the description of both sides. -setDescR :: IsProp (Property setupmetatypes) => RevertableProperty setupmetatypes undometatypes -> Desc -> RevertableProperty setupmetatypes undometatypes -setDescR (RevertableProperty p1 p2) d = - RevertableProperty (setDesc p1 d) (setDesc p2 ("not " ++ d)) - -- | Type level calculation of the type that results from combining two -- types of properties. type family CombinedType x y |
