[GHC] #9378: Make unknown LANGUAGE pragmas a warning, not an error

GHC ghc-devs at haskell.org
Tue Jul 29 13:58:11 UTC 2014


#9378: Make unknown LANGUAGE pragmas a warning, not an error
-------------------------------------+-------------------------------------
              Reporter:  goldfire    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.2
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 This is a good observation, but I don't think it blocks the original
 request. If I understand correctly, if unrecognized `LANGUAGE` pragmas are
 a warning, then Cabal might refuse to build something that would, in fact,
 compile. This doesn't seem deadly. In packages I've released, I've
 (rightly or wrongly) not specified any extensions in the cabal file.
 (Except for `TemplateHaskell`, which I understand is necessary for other
 reasons.) Admittedly, now that you've made me aware of the undocumented
 `other-extensions` entry, I might change my practice to indeed list the
 extensions.

 But, if I'm releasing a package that should compile under multiple GHCs, I
 would either protect the extension entry in the .cabal file or just omit
 that particular extension. It is still much easier to put a conditional in
 one place in a .cabal file than in every source file. Of course, one could
 list the extension of interest in `default-extensions` and omit it from
 the files, but then that has poor interaction with GHCi.

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


More information about the ghc-tickets mailing list