Thanks Peter. I'd love to have this feature also. I go back every so often and try removing each of the extensions listed in my LANGUAGE pragma. Didn't occur to me that the compiler could be doing it for me. Regards, - Conal
Okay, I submitted it as a GHC feature request. Thanks for the feedback.On Wed, Mar 11, 2009 at 5:16 PM, Creighton Hogg <wchogg@gmail.com> wrote:
2009/3/11 Peter Verswyvelen <bugfact@gmail.com>:
So you mean something like if you put {-# LANGUAGE> When I put
> {-# OPTIONS_GHC -Wall -Werror #-}
> in my source file, I don't get compiler (GHC) warnings about redundant
> language extensions that I enabled.
> It would be nice if the compiler gave warnings about this, since after
> refactoring, some language extensions might not be needed anymore, and hence
> should be removed since fewer language extensions mean more stable and
> portable code no?
> What do you think?
GeneralizedNewtypeDeriving #-} in a file, but never do newtype
deriving, it would warn you?
I have no idea how hard that'd be to implement, but that sounds kind
of cool. Useful for both refactoring and when you've inherited old
code.
Cheers,
C
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe