[GHC] #3085: warn about language extensions that are not used

GHC ghc-devs at haskell.org
Wed Dec 3 22:38:47 UTC 2014


#3085: warn about language extensions that are not used
-------------------------------------+-------------------------------------
              Reporter:              |            Owner:
  PVerswyvelen                       |           Status:  new
                  Type:  feature     |        Milestone:  7.10.1
  request                            |          Version:  6.10.1
              Priority:  normal      |         Keywords:  warnings
             Component:  Compiler    |  extensions language
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:  #9757
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I think it might be difficult, or at least tiresome, to implement this.

 In lots of places we test the language extension flags, to say
 {{{
  if <extn-needed> and not extn-flag then raise error
 }}}
 To implement this feature, every such test would need to look more like
 {{{
  if <extn-needed> then
     if <extn-flag-on> then  record extn-flag-needed
                       else  raise error
 }}}
 Presumably the "record extn-flag-needed" is some kind of mutable state
 carried in the monad, accumulating which extensions are used.

 I'm sure it's possible, but the are ''many'' such tests, so you'd have to
 touch a lot of code.

 Simonb

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


More information about the ghc-tickets mailing list