[GHC] #13841: ADOPT pragma for silencing orphan instances warnings per instance

GHC ghc-devs at haskell.org
Sat Jun 17 14:07:08 UTC 2017


#13841: ADOPT pragma for silencing orphan instances warnings per instance
-------------------------------------+-------------------------------------
           Reporter:  cocreature     |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Currently GHC only allows enabling and disabling the warnings about orphan
 instances on a module level. I’d like to have an ADOPT pragma that allows
 disabling the warning for specific instance:


 {{{#!haskell
 instance {-# ADOPT #-} C Int
 }}}

 Apart from disabling the warning about orphan instances for this specific
 instance, this pragma should have no effect.

 I already hacked together a [https://github.com/cocreature/ghc/tree/adopt-
 pragma prototype] and I’m willing to clean that up and submit a diff if
 other people like this.

 This does change the surface language but disabling a warning seem too
 small of an effect for the ghc proposals process (I’m happy to make a
 proposal if you disagree).

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13841>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list