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

GHC ghc-devs at haskell.org
Tue Jul 29 12:17:21 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
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:
     Blocked By:                     |  None/Unknown
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 Currently, if I say `{-# LANGUAGE Foo #-}` at the top of my file, it fails
 to compile. This failure seems unnecessary, especially because any new
 language feature `Foo` enables will fail to compile later on down the
 file. Is it possible to have a "stern warning" that is produced even when
 other parts of the file produce errors?

 The reason I'm bringing this up is that, when 7.8 came out with its role
 annotations, users needed CPP in two different places: both to protect the
 `RoleAnnotations` pragma and to protect the role annotations themselves.
 This may be unavoidable on the role annotations directly, but I think we
 can improve the situation around `LANGUAGE` pragmas.

 Is there a downside to this?

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


More information about the ghc-tickets mailing list