diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-11-11 17:29:11 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-11-11 17:29:25 -0400 |
| commit | c0d0e57257fe8dee1f9d37a6d49b6322af985a69 (patch) | |
| tree | be921c1ad45c42e6ed1c987fc51d6e9b7e013689 /src/Propellor/PropAccum.hs | |
| parent | c24acf55af190bc332b29d0ef4a04dda9335b01a (diff) | |
Clean up build warnings about redundant constraints when built with ghc 8.0.
Only a couple of the constraints were really redundant. The rest are
essential to propellor's tracking of Info propigation, so I silenced the
warning for those.
It would be better to only silence the warning for the functions with the
extra constraints, but IIRC warnings can only be silenced on an entire file
basis.
This commit was sponsored by Andreas on Patreon.
Diffstat (limited to 'src/Propellor/PropAccum.hs')
| -rw-r--r-- | src/Propellor/PropAccum.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs index fcac60bf..c7ef946a 100644 --- a/src/Propellor/PropAccum.hs +++ b/src/Propellor/PropAccum.hs @@ -4,6 +4,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.PropAccum ( host @@ -51,6 +52,9 @@ type instance GetMetaTypes (RevertableProperty (MetaTypes t) undo) = MetaTypes t (&) :: ( IsProp p + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. , MetaTypes y ~ GetMetaTypes p , CheckCombinable x y ~ 'CanCombine ) @@ -63,6 +67,9 @@ Props c & p = Props (c ++ [toChildProperty p]) (&^) :: ( IsProp p + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. , MetaTypes y ~ GetMetaTypes p , CheckCombinable x y ~ 'CanCombine ) @@ -73,6 +80,9 @@ Props c &^ p = Props (toChildProperty p : c) -- | Adds a property in reverted form. (!) + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. :: (CheckCombinable x z ~ 'CanCombine) => Props (MetaTypes x) -> RevertableProperty (MetaTypes y) (MetaTypes z) |
