[GHC] #7408: Do not warn on unused newtype constructors when used with FFI
GHC
cvs-ghc at haskell.org
Mon Nov 26 13:31:30 CET 2012
#7408: Do not warn on unused newtype constructors when used with FFI
---------------------------------+------------------------------------------
Reporter: SimonHengel | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by simonpj):
* difficulty: => Unknown
Comment:
commit c8f4f50983bbb26b2d753e56ba61f5a307ff412f
{{{
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Nov 26 12:05:21 2012 +0000
Accurately report usage of newtype data constructors in FFI
declarations
See Note [Newtype constructor usage in foreign declarations] in
TcForeign.
It's quite non-trivial to say which newtype constructor are used in
foreign import/export declarations, and I had to do a bit of
refactoring
to achieve it. (Say hello to the X5 bus from Oxford to Cambridge.)
It's a bit tiresome, with some more plumbing, but not hard.
Trac #7048 triggered this change.
compiler/rename/RnNames.lhs | 6 +-
compiler/typecheck/TcForeign.lhs | 164
+++++++++++++++++++-----------------
compiler/typecheck/TcRnDriver.lhs | 29 ++++++-
compiler/typecheck/TcRnTypes.lhs | 38 ++++++---
4 files changed, 142 insertions(+), 95 deletions(-)
}}}
(The "7048" should be "7408".)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7408#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list