diff --git a/test/Test/Universum/Issue208.hs b/test/Test/Universum/Issue208.hs new file mode 100644 index 00000000..f5181183 --- /dev/null +++ b/test/Test/Universum/Issue208.hs @@ -0,0 +1,23 @@ +{-# LANGUAGE + GeneralizedNewtypeDeriving + , UndecidableInstances + , FlexibleContexts + , GADTs + , DerivingStrategies + , CPP +#-} +module Test.Universum.Issue208 + () where + +#if __GLASGOW_HASKELL__ >= 900 + +import Universum (Container) + +-- In ghc-8.6.3 this code will produce a @redundant constraint@ warning. +-- In ghc-9.0.2 and newer no warnings would be produced. +-- Issue #208: https://github.com/serokell/universum/issues/208 + +newtype Test = Test [Int] + deriving newtype (Container) + +#endif diff --git a/universum.cabal b/universum.cabal index 81857333..1f04237b 100644 --- a/universum.cabal +++ b/universum.cabal @@ -121,7 +121,9 @@ test-suite universum-test hs-source-dirs: test main-is: Spec.hs - other-modules: Test.Universum.Property + other-modules: + Test.Universum.Issue208 + Test.Universum.Property build-depends: universum , bytestring