#3085: warn about language extensions that are not used
---------------------------------------------+------------------------------
    Reporter:  PVerswyvelen                  |        Owner:                  
        Type:  feature request               |       Status:  new             
    Priority:  normal                        |    Milestone:                  
   Component:  Compiler                      |      Version:  6.10.1          
    Severity:  normal                        |   Resolution:                  
    Keywords:  warnings extensions language  |   Difficulty:  Unknown         
    Testcase:                                |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple              |  
---------------------------------------------+------------------------------
Comment (by simonmar):

 Replying to [comment:5 simonpj]:
 > For the most part, the fact that GHC ''consults'' a flag is enough to
 indicate that changing its state would affect compilation.  (That's not
 quite true -- in some places we read flags and pass on a couple of
 booleans that may or may not be needed -- but it is largely true.)
 >
 > So while it's not entirely trivial, I suspect we could get close to what
 you want, at least for the language extensions.   If someone wants to
 volunteer to do this, I can advise. Unless I'm missing something.

 Perhaps I'm being pessimistic, but I have a bad feeling about this if we
 have to implement it for every language extension, everywhere that
 language extension is used.  It'll give rise to a slew of bug reports for
 the places we don't quite get it right.  This is a feature that requires
 changes all over the compiler, and introduces a new tax on language
 extensions.

 In contrast, the "try removing the extension and see if it still works"
 method is foolproof and doesn't require any changes to the compiler.
 Someone could implement that using the GHC API...

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3085#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to