RE: [GHC] #12067: warn-unused-imports does not detect coersions
ben is this a merge onto the 8.0 branch? On the ticket it just looks like a duplicate merge, which is jolly odd. This didn't use to happen... S | -----Original Message----- | From: GHC [mailto:ghc-devs@haskell.org] | Sent: 25 August 2016 16:04 | Cc: ghc-tickets@haskell.org | Subject: Re: [GHC] #12067: warn-unused-imports does not detect | coersions | | #12067: warn-unused-imports does not detect coersions | -------------------------------------+-------------------------------- | -- | -------------------------------------+--- | Reporter: crockeea | Owner: | Type: bug | Status: merge | Priority: normal | Milestone: 8.0.2 | Component: Compiler | Version: 7.10.3 | Resolution: | Keywords: | Operating System: Unknown/Multiple | Architecture: | | Unknown/Multiple | Type of failure: Incorrect | Test Case: | warning at compile-time | | typecheck/should_compile/T12067 | Blocked By: | Blocking: | Related Tickets: #10347 | Differential Rev(s): | Wiki Page: | | -------------------------------------+-------------------------------- | -- | -------------------------------------+--- | | Comment (by Ben Gamari <ben@…>): | | In [changeset:"6c28f24aa8202f79db49b85b815011703d647fd9/ghc" | 6c28f24/ghc]: | {{{ | #!CommitTicketReference repository="ghc" | revision="6c28f24aa8202f79db49b85b815011703d647fd9" | Deal correctly with unused imports for 'coerce' | | We only do newtype unwrapping for Coercible constraints if the | newtype's data constructor is in scope. We were trying to record the | fact that the data constructor was thereby 'used', so that an import | statement would not be flagged as unnecsssary (by -Wunused-imports). | | But the code was simply wrong. It was wrong because it assumed that | only one level of unwrapping happened, whereas | tcTopNormaliseNewTypeTF_maybe actually unwraps multiple layers. | So we need to return a /list/ of data constructors that are used. | | This entailed a bit of refactoring, as usual. | | Fixes Trac #12067 | | (cherry picked from commit 23b80ac41cc945cea0fc6ff9ade6b4be8aa81b7f) | }}} | | -- | Ticket URL: | <https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fghc.h | askell.org%2ftrac%2fghc%2fticket%2f12067%23comment%3a5&data=01%7c01%7c | simonpj%40microsoft.com%7c68b37c7d124e4b0a744d08d3ccf915f0%7c72f988bf8 | 6f141af91ab2d7cd011db47%7c1&sdata=vyQiwFoTB3ZXhI9%2fSxBlj8kE5cjEYw7gSR | 7jG575YvI%3d> | GHC | <https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.h | askell.org%2fghc%2f&data=01%7c01%7csimonpj%40microsoft.com%7c68b37c7d1 | 24e4b0a744d08d3ccf915f0%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=2 | kFm1kxgSfvvlh%2f%2f3h53C4IPcBdY%2fo5k9wzmyXTO%2fjY%3d> | The Glasgow Haskell Compiler
Simon Peyton Jones via ghc-devs <ghc-devs@haskell.org> writes:
ben is this a merge onto the 8.0 branch? On the ticket it just looks like a duplicate merge, which is jolly odd. This didn't use to happen...
Indeed, I enabled commit notifications on the stable branches earlier today in hopes that it would reduce the book-keeping costs associated with their maintenance. While it has been a bit easier, I was hoping that there would be some indication of which branch the commit is on in the Trac message. Would you prefer that I again disable these notifications on the stable branches? Cheers, - Ben
I was hoping that there would be some indication of which branch the commit is on in the Trac message. Would you prefer that I again disable these notifications on the stable branches? Unless there is a clear indication of which branch, it's just confusing so better disabled. In my view - others may want to chime in. Simon -----Original Message----- From: Ben Gamari [mailto:ben@smart-cactus.org] Sent: 25 August 2016 23:09 To: Simon Peyton Jones <simonpj@microsoft.com>; ghc-devs@haskell.org Subject: RE: [GHC] #12067: warn-unused-imports does not detect coersions Simon Peyton Jones via ghc-devs <ghc-devs@haskell.org<mailto:ghc-devs@haskell.org>> writes:
ben is this a merge onto the 8.0 branch? On the ticket it just looks
like a duplicate merge, which is jolly odd. This didn't use to
happen...
Indeed, I enabled commit notifications on the stable branches earlier today in hopes that it would reduce the book-keeping costs associated with their maintenance. While it has been a bit easier, I was hoping that there would be some indication of which branch the commit is on in the Trac message. Would you prefer that I again disable these notifications on the stable branches? Cheers, - Ben
participants (2)
-
Ben Gamari -
Simon Peyton Jones