Re: [GHC] #7167: Make it a warning (not error) to hide an import that isn't exported

2012-09-01 Thread GHC
#7167: Make it a warning (not error) to hide an import that isn't exported
--+-
  Reporter:  simonpj  |  Owner:  pcapriotti  
  Type:  bug  | Status:  closed  
  Priority:  highest  |  Milestone:  7.6.1   
 Component:  Compiler |Version:  7.4.2   
Resolution:  fixed|   Keywords:  
Os:  Unknown/Multiple |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown | Difficulty:  Unknown 
  Testcase:  rename/should_compile/T7167  |  Blockedby:  
  Blocking:   |Related:  
--+-
Changes (by pcapriotti):

  * status:  merge => closed
  * resolution:  => fixed


Comment:

 Merged as 68fd5dcd5118816e03d6c5e23533faa298d34834.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7167: Make it a warning (not error) to hide an import that isn't exported

2012-08-25 Thread GHC
#7167: Make it a warning (not error) to hide an import that isn't exported
-+--
Reporter:  simonpj   |   Owner:  pcapriotti 
Type:  bug   |  Status:  merge  
Priority:  highest   |   Milestone:  7.6.1  
   Component:  Compiler  | Version:  7.4.2  
Keywords:|  Os:  Unknown/Multiple   
Architecture:  Unknown/Multiple  | Failure:  None/Unknown   
  Difficulty:  Unknown   |Testcase:  rename/should_compile/T7167
   Blockedby:|Blocking: 
 Related:|  
-+--
Changes (by pcapriotti):

  * status:  new => merge
  * testcase:  => rename/should_compile/T7167


Comment:

 Documentation patch here:

 {{{
 commit 4eb02c17fc814275a4294afe5c9f38eff8c6a489
 Author: Paolo Capriotti 
 Date:   Sat Aug 25 20:33:36 2012 +0100

 Update documentation for -fwarn-dodgy-imports.
 }}}

 The bug in data family imports mentioned in the commit above is as
 follows. Given a module DodgyA:

 {{{
 {-# LANGUAGE TypeFamilies #-}

 module DodgyA(C(..), X(..)) where

 class C a where
   data X a

 instance C Int where
   data X Int = X1 Bool
 }}}

 the following import triggered a "dodgy import" warning:

 {{{
 import DodgyA (X(..))
 }}}

 even though the `X1` constructor is exported. This has been fixed by the
 refactoring, and is now checked by the testcase
 `rename/should_compile/dodgy`.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7167: Make it a warning (not error) to hide an import that isn't exported

2012-08-25 Thread GHC
#7167: Make it a warning (not error) to hide an import that isn't exported
-+--
Reporter:  simonpj   |   Owner:  pcapriotti  
Type:  bug   |  Status:  new 
Priority:  highest   |   Milestone:  7.6.1   
   Component:  Compiler  | Version:  7.4.2   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--

Comment(by p.capriotti@…):

 commit 3d7c81a4be00a6d72b321b4811ab316ea3301a60
 {{{
 Author: Paolo Capriotti 
 Date:   Thu Aug 23 12:54:45 2012 +0100

 Make badImportItem into a warning (#7167)

 Also fix a bug where a dodgy import warning was emitted for data
 families with a single constructor.

  compiler/rename/RnNames.lhs |  191
 ++-
  1 files changed, 116 insertions(+), 75 deletions(-)
 }}}

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7167: Make it a warning (not error) to hide an import that isn't exported

2012-08-22 Thread GHC
#7167: Make it a warning (not error) to hide an import that isn't exported
-+--
Reporter:  simonpj   |   Owner:  pcapriotti  
Type:  bug   |  Status:  new 
Priority:  highest   |   Milestone:  7.6.1   
   Component:  Compiler  | Version:  7.4.2   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by conrad):

 * cc: conrad@… (added)


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7167: Make it a warning (not error) to hide an import that isn't exported

2012-08-21 Thread GHC
#7167: Make it a warning (not error) to hide an import that isn't exported
-+--
Reporter:  simonpj   |   Owner:  pcapriotti  
Type:  bug   |  Status:  new 
Priority:  highest   |   Milestone:  7.6.1   
   Component:  Compiler  | Version:  7.4.2   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by jwlato):

 * cc: jwlato@… (added)


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7167: Make it a warning (not error) to hide an import that isn't exported

2012-08-20 Thread GHC
#7167: Make it a warning (not error) to hide an import that isn't exported
-+--
Reporter:  simonpj   |   Owner:  pcapriotti  
Type:  bug   |  Status:  new 
Priority:  highest   |   Milestone:  7.6.1   
   Component:  Compiler  | Version:  7.4.2   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by simonpj):

  * owner:  => pcapriotti


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #7167: Make it a warning (not error) to hide an import that isn't exported

2012-08-20 Thread GHC
#7167: Make it a warning (not error) to hide an import that isn't exported
-+--
Reporter:  simonpj   |   Owner:  
Type:  bug   |  Status:  new 
Priority:  highest   |   Milestone:  7.6.1   
   Component:  Compiler  | Version:  7.4.2   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
 We often see build failures like
 {{{
 Module `Prelude' does not export `catch'
 }}}
 elicited by an `import` statement
 {{{
   import Prelude hiding( catch )
 }}}
 John Lato and others suggest making this a warning, not an error.  Simon
 and I agree and we propose to do this for GHC 7.6, thus:

  * Warn, rather than error, when a `hiding` clause mentions something that
 the module does not export.
  * Suppress with warning with `-fno-warn-dodgy-imports`, an existing
 warning-suppression flag.
  * Document the change, in the `-fwarn-docugy-imports` flag, and the
 release notes.

 We propose to make this change without a language extension.  Doing so is
 technically wrong, since H2010 says it's an error to mention something in
 `hiding` that isn't exported, but it seems too heavyweight to make a
 language extension just for this; and in any case it would have to be on
 by default to be any use in practice.

 Paolo, can you do all this?
  * The relevant function is `RnNames.filterImports`.
  * I suggest you make `lookup_ie` return `TcRn [(LIE Name,AvailInfo)]`
 rather than the `MaybeErr ...` that it currently returns.
  * The `want_hiding` flag is `True` if this is a hiding clause; in that
 case `bad_ie` should warn (unless the warning is suppressed) rather than
 error.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs