Re: [GHC] #3449: Unavoidable unused bindings warnings in boot files

2010-06-24 Thread GHC
#3449: Unavoidable unused bindings warnings in boot files
---+
  Reporter:  heatsink  |  Owner:  igloo   
  Type:  bug   | Status:  closed  
  Priority:  normal|  Milestone:  6.14.1  
 Component:  Compiler  |Version:  6.10.4  
Resolution:  fixed |   Keywords:  
Difficulty:  Unknown   | Os:  Unknown/Multiple
  Testcase:  T3449 |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---+
Changes (by igloo):

  * status:  new = closed
  * testcase:  = T3449
  * resolution:  = fixed


Comment:

 Fixed.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3449#comment:3
GHC http://www.haskell.org/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] #3449: Unavoidable unused bindings warnings in boot files

2010-06-23 Thread GHC
#3449: Unavoidable unused bindings warnings in boot files
-+--
Reporter:  heatsink  |Owner:  igloo   
Type:  bug   |   Status:  new 
Priority:  normal|Milestone:  6.14.1  
   Component:  Compiler  |  Version:  6.10.4  
Keywords:|   Difficulty:  Unknown 
  Os:  Unknown/Multiple  | Testcase:  
Architecture:  Unknown/Multiple  |  Failure:  None/Unknown
-+--
Changes (by igloo):

  * owner:  = igloo
  * failure:  = None/Unknown


-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3449#comment:2
GHC http://www.haskell.org/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] #3449: Unavoidable unused bindings warnings in boot files

2009-08-23 Thread GHC
#3449: Unavoidable unused bindings warnings in boot files
-+--
Reporter:  heatsink  |Owner:  
Type:  bug   |   Status:  new 
Priority:  normal|Milestone:  6.14.1  
   Component:  Compiler  |  Version:  6.10.4  
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * difficulty:  = Unknown
  * milestone:  = 6.14.1

Comment:

 Thanks for the report.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3449#comment:1
GHC http://www.haskell.org/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] #3449: Unavoidable unused bindings warnings in boot files

2009-08-21 Thread GHC
#3449: Unavoidable unused bindings warnings in boot files
-+--
Reporter:  heatsink  |  Owner:  
Type:  bug   | Status:  new 
Priority:  normal|  Component:  Compiler
 Version:  6.10.4|   Severity:  minor   
Keywords:|   Testcase:  
  Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-+--
 The {{{-fwarn-unused-binds}}} flag produces warnings for bindings that
 cannot, in fact, be deleted from hs-boot files.  It would be nice not to
 see these warnings.  Definitions in .hs-boot files must match the
 definitions in .hs files, but .hs-boot files don't necessarily use or
 export the same identifiers that the .hs file does.

 Running {{{ghc -c A.hs-boot -fwarn-unused-binds}}} produces warnings for
 this hs-boot file, regardless of whether the identifiers are exported in
 the hs file.
 {{{
 {- A.hs-boot -}
 {-# OPTIONS_GHC -XTypeFamilies #-} -- to demonstrate associated type
 warnings
 module A(Foo, HasFoo) where

 newtype Foo = Foo {unFoo :: Int}
 class HasFoo a where
   data Foo' a
   getFoo :: a - Foo
 }}}

 For identifiers defined on the RHS of an equal sign or 'where'---namely,
 data constructors, field names, class methods, and associated types---I
 suggest silencing unused binding warnings in the boot file.  The rationale
 is that you should be allowed to copy an entire definition into the boot
 file, and regard a binding as unused only if it appears unused in the .hs
 file.

 See also #3283.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3449
GHC http://www.haskell.org/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: Unused bindings

1998-04-03 Thread Sigbjorn Finne


Thanks, this is a known shortcoming. We'll either fix the docs or the
implementation!

--Sigbjorn

Sven Panne writes:
 GHC-3.01 can generate some really useful warnings, but some of those
 generated by -fwarn-unused-binds (which is switched on via -Wall, too)
 are plainly wrong. Silly, but short example:
 
..
 -- Foo.hs --
 module Foo(Bar(..)) where
 
 data Bar = MkBar
 
 instance Show Bar where
showsPrec _ = baz
 
 baz :: Bar - ShowS
 baz MkBar = showString "MkBar"
 ---
 
panne@liesl: ghc -fwarn-unused-binds -c Foo.hs
  
Foo.hs:9: Warning: `baz' is bound but not used
 
ghc: module version changed to 1; reason: no old .hi file
 
 GHC doesn't seem to take instance declarations into account when
 complaining...   :-(