Skip to content

Commit

Permalink
Merge pull request serokell#263 from serokell/dk318/serokell#208-redu…
Browse files Browse the repository at this point in the history
…ndant-constraint-test

[serokell#208] `redundant constraint` test
  • Loading branch information
DK318 authored Apr 28, 2022
2 parents 4396fa9 + e1c7903 commit 86b30df
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions test/Test/Universum/Issue208.hs
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion universum.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86b30df

Please sign in to comment.