[GHC] #10100: Bogus "redundant constraint" warning with functional dependencies

GHC ghc-devs at haskell.org
Thu Aug 23 11:29:35 UTC 2018


#10100: Bogus "redundant constraint" warning with functional dependencies
-------------------------------------+-------------------------------------
        Reporter:  jstolarek         |                Owner:  simonpj
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  typecheck/should_compile/T10100
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"4293a80a3ea835412737911bcb2a6703e9af378b/ghc"
 4293a80a/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="4293a80a3ea835412737911bcb2a6703e9af378b"
 Accommodate API change in transSuperClasses

 In this patch

     commit 6eabb6ddb7c53784792ee26b1e0657bde7eee7fb
     Author: Simon Peyton Jones <simonpj at microsoft.com>
     Date:   Tue Dec 15 14:26:13 2015 +0000

     Allow recursive (undecidable) superclasses

 I changed (transSuperClasses p) to return only the
 superclasses of p, but not p itself. (Previously it always
 returned p as well.)

 The use of transSuperClasses in TcErrors.warnRedundantConstraints
 really needs 'p' in the result -- but I faild to fix this
 call site, and instead crippled the test for Trac #10100.

 This patch sets things right

 * Accomodates the API change
 * Re-enables T10100
 * And thereby fixes Trac #11474
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10100#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list