[GHC] #12142: -Wredundant-constraints warns about constraints introduced via type synonyms.

GHC ghc-devs at haskell.org
Thu Jun 2 16:32:21 UTC 2016


#12142: -Wredundant-constraints warns about constraints introduced via type
synonyms.
-------------------------------------+-------------------------------------
        Reporter:  scshunt           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by ekmett):

 In the interest of not getting drowned in complaints by the users of
 `lens` on GHC 8, we'll likely just add the constraint to `to` and rely on
 `{-# INLINE #-}` dropping it out in practice. This is a common enough
 scenario to warrant us eating the noise on our side.

 Of course, you'll get the same sort of thing if you go to declare a non-
 law abiding traversal as a fold, etc. There i'm afraid the only answer
 will be to squelch the warning. GHC can't see 'laws'.

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


More information about the ghc-tickets mailing list