
#14685: Pragma to reset language extensions in module header -------------------------------------+------------------------------------- Reporter: mgsloan | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mgsloan): *Sigh* You think I didn't consider something like that? When convenient, I strongly prefer to write code that is compatible with older versions of the tools we use, unless there is a strong reason to do otherwise. I particularly appreciate it when others do the same.... :| With all prior versions, your suggestion would result in {{{ foo.hs:1:16: error: unknown flag in {-# OPTIONS_GHC #-} pragma: -X }}} With my proposal, it results in {{{ foo.hs:1:1: warning: [-Wunrecognised-pragmas] Unrecognised pragma }}} That said, having `-X` mean the same thing would be consistent with `-i` and the like, so that could be considered. I think that flag convention is really weird, but it is at least consistent. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14685#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler