Ticket #17 (new feature request: None)

Opened 11 years ago

Last modified 3 years ago

Separate warnings for unused local and top-level bindings

Reported by: magunter Owned by:
Priority: lowest Milestone: _|_
Component: Compiler Version: None
Keywords: -fwarn-unused-binds Cc: mboes@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo) (diff)

I'd like separate warnings for local and top-level
unused binds.  I often have "unused" top-level
functions which I use from ghci.  I'd like to avoid
warnings for
these while retaining the warnings for unused local
bindings (which can always be eliminated by prefix the
name with an underscore.)


Change History

  Changed 11 years ago by magunter

  • summary changed from RFE:Separate unused-binds local/top-levl to RFE:Separate unused-binds local/top-level

  Changed 9 years ago by simonmar

Logged In: YES 
user_id=48280

Moved to feature requests

  Changed 6 years ago by igloo

  • difficulty set to Unknown
  • milestone set to _|_
  • os set to Unknown
  • architecture set to Unknown
  • description modified (diff)

  Changed 6 years ago by SamB

  • keywords -fwarn-unused-binds added

  Changed 4 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

  Changed 4 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

  Changed 3 years ago by igloo

  • owner changed from nobody to igloo
  • status changed from assigned to new

  Changed 3 years ago by igloo

  • owner igloo deleted

  Changed 3 years ago by simonmar

  • component changed from None to Compiler

follow-up: ↓ 12   Changed 3 years ago by byorgey

  • failure set to None/Unknown
  • summary changed from RFE:Separate unused-binds local/top-level to Separate warnings for unused local and top-level bindings

Would any developers care to guess at the difficulty of this feature? Could this make a good project for someone just starting to get their feet wet hacking on ghc?

  Changed 3 years ago by mboes

  • cc mboes@… added

I doubt the usefulness of this feature since any top-level function that is mentioned in the export list of the module won't trigger a warning. It is confusing to see dead code in a module and so top-level functions that aren't used should probably just be commented out.

However, this feature does come handy when using records: it often happens that a field name isn't used in a module, hence triggering a warning.

in reply to: ↑ 10   Changed 3 years ago by igloo

Replying to byorgey:

Would any developers care to guess at the difficulty of this feature? Could this make a good project for someone just starting to get their feet wet hacking on ghc?

I'd say so. It would probably be worth discussing the design on the cvs-ghc list first, though.

Note: See TracTickets for help on using tickets.