Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,323
    • Issues 4,323
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 363
    • Merge Requests 363
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3820

Closed
Open
Opened Jan 14, 2010 by guest@trac-guest

Pragma for suppressing 'orphan instance' warnings per instance

Additionally to #2515 (closed) I'd like to suppress orphan instances warnings individually. I do not always like to disable orphan instance warnings globally for a module, since some of the warnings may point to an instance that can actually be moved to a more appropriate module.

Syntax could be

{-# NOWARN orphan #-}
instance C T where
   ...

or simply

{-# NOWARN #-}
instance C T where
   ...

(Before GHC-6.12 a general local NOWARN pragma could also help to minimize wrong warnings about unused imported modules. And sometimes I also like to disable 'unused identifier' warning for some top-level functions, that shall be type checked, but not exported, because their API is still not mature.)

Trac metadata
Trac field Value
Version 6.12.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC ghc@henning-thielemann.de
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#3820