-Werror -Woverlapping-patterns -fglasgow-exts ?

Dear Cafe, I want to chase overlapping patterns in a larger code base. So I use -Werror -Woverlapping-patterns . But the code also needs -fglasgow-exts and this makes compilation stop right at the beginning, with "warning: -fglasgow-exts is deprecated: ..." which will be turned into an error because of -Werror -Wno-warnings-deprecations does not help, apparently that warning is not a deprecation. Is there a way to get -Werror for specific warnings? - J.

A lot of us would like to get -Werror for only some errors. I don't
think it exists yet. But why are you still using -fglasgow-exts? If
you use LANGUAGE pragmas instead, everything should work.
David
On Tue, Feb 21, 2017 at 8:15 AM, Johannes Waldmann
it seems that adding "-w" helps (turn off all warnings). - J _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

You can use Cabal's default-extensions field to enable extensions in all modules. On Tue, 21 Feb 2017 at 18:29 Johannes Waldmann < johannes.waldmann@htwk-leipzig.de> wrote:
But why are you still using -fglasgow-exts?
legacy code base
If you use LANGUAGE pragmas instead ...
I'd love to - if this refactoring can be automated (I have 2k modules in this project :-)
- J.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Tue, Feb 21, 2017 at 12:21:08PM -0500, David Feuer wrote:
A lot of us would like to get -Werror for only some errors. I don't think it exists yet.
It's implemented in GHC HEAD: https://ghc.haskell.org/trac/ghc/ticket/11219 I'm not sure whether it supports flag deprecation warnings though. Maciej

A tool to automatically select and add (almost) only the necessary
extensions to code that compiles successfully with -fglasgow-exts would be
quite nice to have, especially if it could run on a whole package. The
easiest thing would probably be to compile the module and then add
extensions included in -fglasgow-exts based on error messages, repeating
until the module compiles successfully. The included extension I'm familiar
with that seems hardest to handle is ScopedTypeVariables, as that can (in
some cases) change the meaning of code that compiles either way. So the
easiest thing would be to just include it unconditionally.
On Feb 22, 2017 7:08 PM, "Maciej Bielecki"
On Tue, Feb 21, 2017 at 12:21:08PM -0500, David Feuer wrote:
A lot of us would like to get -Werror for only some errors. I don't think it exists yet.
It's implemented in GHC HEAD: https://ghc.haskell.org/trac/ ghc/ticket/11219
I'm not sure whether it supports flag deprecation warnings though.
Maciej
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (4)
-
Adam Bergmark
-
David Feuer
-
Johannes Waldmann
-
Maciej Bielecki