[GHC] #12810: -Wredundant-constraints doesn't factor in associated type families

GHC ghc-devs at haskell.org
Mon Nov 7 09:47:58 UTC 2016


#12810: -Wredundant-constraints doesn't factor in associated type families
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:  duplicate         |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11369            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Associated types are completely equivalent to top-level type families.
 Really the only difference is that you are prompted to provide a type
 instance at the same time as a class instances; and perhaps that the two
 "logically belong together".  But there is no runtime evidence needed, and
 hence no class constraint is needed in function definitions.

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


More information about the ghc-tickets mailing list