summaryrefslogtreecommitdiff
path: root/src/Propellor/PropAccum.hs
diff options
context:
space:
mode:
authorJoey Hess2019-07-02 14:39:51 -0400
committerJoey Hess2019-07-02 14:52:22 -0400
commit1c12b89a671152d7da4630b41b48815eefc8c2fe (patch)
tree32834084533111b921e92a5106d781454f9d36ef /src/Propellor/PropAccum.hs
parent60a655ebe4e0dfdfbca9681cd204f60eb432b40b (diff)
use ConstraintKinds
This is just a bit prettier code than manually needing to use constraint ~ True
Diffstat (limited to 'src/Propellor/PropAccum.hs')
-rw-r--r--src/Propellor/PropAccum.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs
index 3fc83202..ea85f04f 100644
--- a/src/Propellor/PropAccum.hs
+++ b/src/Propellor/PropAccum.hs
@@ -66,7 +66,7 @@ type family NoteFor symbol :: ErrorMessage where
-- this constraint appears redundant, but is actually
-- crucial.
, MetaTypes y ~ GetMetaTypes p
- , CheckCombinableNote x y (NoteFor ('Text "&")) ~ 'True
+ , CheckCombinableNote x y (NoteFor ('Text "&"))
)
=> Props (MetaTypes x)
-> p
@@ -81,7 +81,7 @@ Props c & p = Props (c ++ [toChildProperty p])
-- this constraint appears redundant, but is actually
-- crucial.
, MetaTypes y ~ GetMetaTypes p
- , CheckCombinableNote x y (NoteFor ('Text "&^")) ~ 'True
+ , CheckCombinableNote x y (NoteFor ('Text "&^"))
)
=> Props (MetaTypes x)
-> p
@@ -93,7 +93,7 @@ Props c &^ p = Props (toChildProperty p : c)
-- -Wredundant-constraints is turned off because
-- this constraint appears redundant, but is actually
-- crucial.
- :: (CheckCombinableNote x z (NoteFor ('Text "!")) ~ 'True)
+ :: CheckCombinableNote x z (NoteFor ('Text "!"))
=> Props (MetaTypes x)
-> RevertableProperty (MetaTypes y) (MetaTypes z)
-> Props (MetaTypes (Combine x z))