forked from serokell/universum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[serokell#208]
redundant constraint
test
Problem: in `ghc-8.6.3` your code can produce `redundant constraint` warning if you derive `Container` for newtype, but in `ghc-9.0.2` and newer no warnings would be produced. Solution: added test, that should be compiled with `ghc-9.0.2` and newer without warnings.
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters