diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-25 01:11:24 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-25 01:11:24 -0400 |
| commit | 80ace2f30bea2ed850cf400a85fe68b3784751d2 (patch) | |
| tree | 5cd4aa5e075d444c8844f867cf59735303957429 /src | |
| parent | 639ac5cad21d60387007e66338864eff4d018786 (diff) | |
improve type error
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/EnsureProperty.hs | 10 |
1 files changed, 5 insertions, 5 deletions
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`. |
