Re: [GHC] #7541: Unavoidable duplicate constraint warning
#7541: Unavoidable duplicate constraint warning --+- Reporter: blamario | Owner: Type: bug| Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Blockedby: Blocking: |Related: --+- Comment(by simonpj@…): commit 5a6a223f855538112ec9d089425e34853fb3542b {{{ Author: Simon Peyton Jones simo...@microsoft.com Date: Wed Jan 2 11:57:00 2013 + Add flag -fwarn-duplicate-constraints This fixes Trac #7541, and is on by default. Use -fno-warn-duplicate-constraints to switch it off. compiler/main/DynFlags.hs |5 - compiler/typecheck/TcMType.lhs |9 + docs/users_guide/flags.xml |7 +++ docs/users_guide/using.xml | 19 +++ 4 files changed, 35 insertions(+), 5 deletions(-) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7541#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #7541: Unavoidable duplicate constraint warning
#7541: Unavoidable duplicate constraint warning +--- Reporter: blamario | Owner: Type: bug| Status: closed Priority: normal | Milestone: Component: Compiler |Version: 7.6.1 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Difficulty: Unknown Testcase: typecheck/should_compile/T7541 | Blockedby: Blocking: |Related: +--- Changes (by simonpj): * status: new = closed * difficulty: = Unknown * resolution: = fixed * testcase: = typecheck/should_compile/T7541 Comment: OK I've added a flag to suppress duplicate constraint warnings. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7541#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #7541: Unavoidable duplicate constraint warning
#7541: Unavoidable duplicate constraint warning --+- Reporter: blamario | Owner: Type: bug| Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Blockedby: Blocking: |Related: --+- The duplicate constraint warning can be triggered in a context where it's impossible to remove it, because the constraints come with a type synonym. The following standalone little module reproduces the problem: {{{ {-# LANGUAGE FlexibleContexts, Rank2Types #-} module Test where type Constrained x y r = (Eq x, Eq y) = x - y - r f :: Constrained String String () f = undefined }}} The warning is {{{ Test.hs:7:6: Warning: Duplicate constraint(s): Eq String In the type signature for `f': f :: Constrained String String () }}} The warning is present in 7.4.1 and 7.6.1, and presumably in the versions between as well. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7541 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs