summaryrefslogtreecommitdiff
path: root/src/Propellor/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Types.hs')
-rw-r--r--src/Propellor/Types.hs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs
index e8e92332..026babf0 100644
--- a/src/Propellor/Types.hs
+++ b/src/Propellor/Types.hs
@@ -224,9 +224,16 @@ type family TightenTargetsAllowed untightened tightened where
If (Targets tightened `IsSubset` Targets untightened
&& NonTargets untightened `IsSubset` NonTargets tightened)
'True
- ( TypeError
- ( 'Text "This use of tightenTargets would widen, not narrow, adding: "
- ':$$: PrettyPrintMetaTypes (Difference (Targets tightened) (Targets untightened))
+ (IfStuck (Targets tightened)
+ (TypeError
+ ('Text "Unable to infer desired Property type in this use of tightenTargets."
+ ':$$: ('Text "Consider adding a type annotation.")
+ )
+ )
+ (TypeError
+ ('Text "This use of tightenTargets would widen, not narrow, adding: "
+ ':$$: PrettyPrintMetaTypes (Difference (Targets tightened) (Targets untightened))
+ )
)
)