summaryrefslogtreecommitdiff
path: root/src/Propellor/EnsureProperty.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-25 15:28:31 -0400
committerJoey Hess2016-03-25 15:28:31 -0400
commit1edce2b72614e2e8eceefde97436db024799ff20 (patch)
treebee36dec11710fae9cb93fe6d6f7e32293f26e01 /src/Propellor/EnsureProperty.hs
parent9768434f5fa2f2ed0bbb0212763a76471186a3cd (diff)
ported Property.Apt
Diffstat (limited to 'src/Propellor/EnsureProperty.hs')
-rw-r--r--src/Propellor/EnsureProperty.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Propellor/EnsureProperty.hs b/src/Propellor/EnsureProperty.hs
index 21f8acce..c4b5fde1 100644
--- a/src/Propellor/EnsureProperty.hs
+++ b/src/Propellor/EnsureProperty.hs
@@ -7,7 +7,7 @@
module Propellor.EnsureProperty
( ensureProperty
, property'
- , OuterMetaTypes
+ , OuterMetaTypes(..)
) where
import Propellor.Types
@@ -33,8 +33,8 @@ import Propellor.Exception
-- with the property to be lost.
ensureProperty
::
- ( (Targets inner `NotSuperset` Targets outer) ~ 'CanCombine
- , CannotUse_ensureProperty_WithInfo inner ~ 'True
+ ( Cannot_ensureProperty_WithInfo inner ~ 'True
+ , (Targets inner `NotSuperset` Targets outer) ~ 'CanCombine
)
=> OuterMetaTypes outer
-> Property (MetaTypes inner)
@@ -42,10 +42,10 @@ ensureProperty
ensureProperty _ = catchPropellor . getSatisfy
-- The name of this was chosen to make type errors a more understandable.
-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
+type family Cannot_ensureProperty_WithInfo (l :: [a]) :: Bool
+type instance Cannot_ensureProperty_WithInfo '[] = 'True
+type instance Cannot_ensureProperty_WithInfo (t ': ts) =
+ Not (t `EqT` 'WithInfo) && Cannot_ensureProperty_WithInfo ts
-- | Constructs a property, like `property`, but provides its
-- `OuterMetaTypes`.