summaryrefslogtreecommitdiff
path: root/src/Propellor/Types
diff options
context:
space:
mode:
authorJoey Hess2016-03-20 12:09:40 -0400
committerJoey Hess2016-03-20 12:09:40 -0400
commit5b517effceed913b3fcc0e6b43ee2cbc614f7b63 (patch)
tree13c903c022bc85c76d1a9cc61b5337051221a824 /src/Propellor/Types
parent72005752b3a86303217cb67add37ca5d515da8ae (diff)
fix tightenTargets
Diffstat (limited to 'src/Propellor/Types')
-rw-r--r--src/Propellor/Types/Target.hs17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/Propellor/Types/Target.hs b/src/Propellor/Types/Target.hs
index 3b21d1f8..1c0f79ee 100644
--- a/src/Propellor/Types/Target.hs
+++ b/src/Propellor/Types/Target.hs
@@ -135,9 +135,10 @@ outerPropTypes (Property proptypes _) = OuterPropTypes proptypes
-- with HasInfo in its PropTypes. Doing so would cause the info associated
-- with the property to be lost.
ensureProperty
- :: ((Targets inner `NotSuperset` Targets outer) ~ CanCombineTargets
- , CannotUseEnsurePropertyWithInfo inner ~ True
- )
+ ::
+ ( (Targets inner `NotSuperset` Targets outer) ~ CanCombineTargets
+ , CannotUseEnsurePropertyWithInfo inner ~ True
+ )
=> OuterPropTypes outer
-> Property (WithTypes inner)
-> IO ()
@@ -152,10 +153,12 @@ type instance CannotUseEnsurePropertyWithInfo (t ': ts) = Not (t `EqT` WithInfo)
--
-- Anything else in the PropType list is passed through unchanged.
tightenTargets
- :: ( combined ~ Concat (NonTargets old) (Intersect (Targets old) newtargets)
- , CannotCombineTargets old new combined ~ CanCombineTargets
- )
- => Targeting newtargets
+ ::
+ ( combined ~ Concat (NonTargets old) (Intersect (Targets old) (Targets new))
+ , CannotCombineTargets old new combined ~ CanCombineTargets
+ , Sing combined
+ )
+ => WithTypes new
-> Property (WithTypes old)
-> Property (WithTypes combined)
tightenTargets _ (Property old a) = Property sing a