From 80ace2f30bea2ed850cf400a85fe68b3784751d2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 25 Mar 2016 01:11:24 -0400 Subject: improve type error --- src/Propellor/EnsureProperty.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Propellor/EnsureProperty.hs') diff --git a/src/Propellor/EnsureProperty.hs b/src/Propellor/EnsureProperty.hs index c72f7ecd..00495f87 100644 --- a/src/Propellor/EnsureProperty.hs +++ b/src/Propellor/EnsureProperty.hs @@ -34,7 +34,7 @@ import Propellor.Exception ensureProperty :: ( (Targets inner `NotSuperset` Targets outer) ~ 'CanCombineTargets - , CannotUseEnsurePropertyWithInfo inner ~ 'True + , CannotUse_ensureProperty_WithInfo inner ~ 'True ) => OuterMetaTypes outer -> Property (Sing inner) @@ -42,10 +42,10 @@ ensureProperty ensureProperty _ = catchPropellor . propertySatisfy -- The name of this was chosen to make type errors a more understandable. -type family CannotUseEnsurePropertyWithInfo (l :: [a]) :: Bool -type instance CannotUseEnsurePropertyWithInfo '[] = 'True -type instance CannotUseEnsurePropertyWithInfo (t ': ts) = - Not (t `EqT` 'WithInfo) && CannotUseEnsurePropertyWithInfo ts +type family CannotUse_ensureProperty_WithInfo (l :: [a]) :: Bool +type instance CannotUse_ensureProperty_WithInfo '[] = 'True +type instance CannotUse_ensureProperty_WithInfo (t ': ts) = + Not (t `EqT` 'WithInfo) && CannotUse_ensureProperty_WithInfo ts -- | Constructs a property, like `property`, but provides its -- `OuterMetaTypes`. -- cgit v1.2.3