Silence a GHC 8.2 warning.

The warnings were about NoMonoLocalBinds making type inference
fragile:

tests/V1/tests.hs:1876:17: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘SOP.All SOP.SListI (SOP.GCode a)’
        matches an instance declaration
      instance forall k (f :: k -> Constraint) (xs :: [k]).
               (Generics.SOP.Constraint.AllF f xs, SOP.SListI xs) =>
               SOP.All f xs
        -- Defined in ‘Generics.SOP.Constraint’
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the type signature:
        sopArbitrary :: forall a.
                        (Generic a,
                         SOP.GTo a,
                         SOP.All SOP.SListI (SOP.GCode a),
                         SOP.All2 Arbitrary (SOP.GCode a)) =>
                        Gen a
This commit is contained in:
Mikhail Glushenkov 2017-05-22 20:06:48 +01:00
parent 1c5dff504d
commit 57f18064bf
No known key found for this signature in database
GPG Key ID: 8BB17E73A163F7C4
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,9 @@
#if __GLASGOW_HASKELL__ < 800
{-# OPTIONS_GHC -fcontext-stack=100 #-}
#endif
#if __GLASGOW_HASKELL__ >= 802
{-# LANGUAGE MonoLocalBinds #-}
#endif
module Main where
import Control.Applicative

View File

@ -12,6 +12,9 @@
#if __GLASGOW_HASKELL__ < 800
{-# OPTIONS_GHC -fcontext-stack=100 #-}
#endif
#if __GLASGOW_HASKELL__ >= 802
{-# LANGUAGE MonoLocalBinds #-}
#endif
module Main where
import Control.Applicative