imp: update to modern warning flags

This commit is contained in:
Simon Michael 2022-03-25 20:28:34 -10:00
parent b3aff7a394
commit d9ecd1eb9d
10 changed files with 34 additions and 34 deletions

View File

@ -203,11 +203,11 @@ VERSION=$(shell cat hledger/.version)
WARNINGS:=\ WARNINGS:=\
-Wall \ -Wall \
-fno-warn-unused-do-bind \ -Wno-unused-do-bind \
-fno-warn-name-shadowing \ -Wno-name-shadowing \
-fno-warn-missing-signatures \ -Wno-missing-signatures \
-fno-warn-orphans \ -Wno-orphans \
-fno-warn-type-defaults \ -Wno-type-defaults \
# if you have need to try building in less memory # if you have need to try building in less memory
# GHCLOWMEMFLAGS= #+RTS -M200m -RTS # GHCLOWMEMFLAGS= #+RTS -M200m -RTS

View File

@ -91,7 +91,7 @@ library
Paths_hledger_lib Paths_hledger_lib
hs-source-dirs: hs-source-dirs:
./ ./
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -fno-warn-incomplete-uni-patterns ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -Wno-incomplete-uni-patterns
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
, Glob >=0.9 , Glob >=0.9
@ -141,7 +141,7 @@ test-suite doctest
hs-source-dirs: hs-source-dirs:
./ ./
test test
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -fno-warn-incomplete-uni-patterns ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -Wno-incomplete-uni-patterns
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
, Glob >=0.7 , Glob >=0.7
@ -194,7 +194,7 @@ test-suite unittest
hs-source-dirs: hs-source-dirs:
./ ./
test test
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -fno-warn-incomplete-uni-patterns ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -Wno-incomplete-uni-patterns
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
, Glob >=0.9 , Glob >=0.9

View File

@ -79,13 +79,13 @@ dependencies:
ghc-options: ghc-options:
- -Wall - -Wall
- -fno-warn-unused-do-bind - -Wno-unused-do-bind
- -fno-warn-name-shadowing - -Wno-name-shadowing
- -fno-warn-missing-signatures - -Wno-missing-signatures
- -fno-warn-type-defaults - -Wno-type-defaults
- -fno-warn-orphans - -Wno-orphans
# XXX seems new in 9.2, fix these # XXX seems new in 9.2, fix these
- -fno-warn-incomplete-uni-patterns - -Wno-incomplete-uni-patterns
source-dirs: source-dirs:
#- other/ledger-parse #- other/ledger-parse

View File

@ -62,7 +62,7 @@ executable hledger-ui
Paths_hledger_ui Paths_hledger_ui
hs-source-dirs: hs-source-dirs:
./ ./
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans
cpp-options: -DVERSION="1.25.99" cpp-options: -DVERSION="1.25.99"
build-depends: build-depends:
ansi-terminal >=0.9 ansi-terminal >=0.9

View File

@ -94,11 +94,11 @@ executables:
main: hledger-ui.hs main: hledger-ui.hs
ghc-options: ghc-options:
-Wall -Wall
-fno-warn-unused-do-bind -Wno-unused-do-bind
-fno-warn-name-shadowing -Wno-name-shadowing
-fno-warn-missing-signatures -Wno-missing-signatures
-fno-warn-type-defaults -Wno-type-defaults
-fno-warn-orphans -Wno-orphans
when: when:
- condition: flag(threaded) - condition: flag(threaded)
ghc-options: -threaded ghc-options: -threaded

View File

@ -150,7 +150,7 @@ library
Paths_hledger_web Paths_hledger_web
hs-source-dirs: hs-source-dirs:
./ ./
ghc-options: -Wall -fwarn-tabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints ghc-options: -Wall -Wtabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints
cpp-options: -DVERSION="1.25.99" cpp-options: -DVERSION="1.25.99"
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
@ -211,7 +211,7 @@ executable hledger-web
Paths_hledger_web Paths_hledger_web
hs-source-dirs: hs-source-dirs:
app app
ghc-options: -Wall -fwarn-tabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints ghc-options: -Wall -Wtabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints
cpp-options: -DVERSION="1.25.99" cpp-options: -DVERSION="1.25.99"
build-depends: build-depends:
base base
@ -231,7 +231,7 @@ test-suite test
main-is: test.hs main-is: test.hs
hs-source-dirs: hs-source-dirs:
test test
ghc-options: -Wall -fwarn-tabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints ghc-options: -Wall -Wtabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints
cpp-options: -DVERSION="1.25.99" cpp-options: -DVERSION="1.25.99"
build-depends: build-depends:
base base

View File

@ -62,7 +62,7 @@ flags:
ghc-options: ghc-options:
- -Wall - -Wall
- -fwarn-tabs - -Wtabs
- -Wcompat - -Wcompat
- -Wincomplete-uni-patterns - -Wincomplete-uni-patterns
- -Wincomplete-record-updates - -Wincomplete-record-updates

View File

@ -135,7 +135,7 @@ library
Hledger.Cli.CompoundBalanceCommand Hledger.Cli.CompoundBalanceCommand
other-modules: other-modules:
Paths_hledger Paths_hledger
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path
cpp-options: -DVERSION="1.25.99" cpp-options: -DVERSION="1.25.99"
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
@ -186,7 +186,7 @@ executable hledger
Paths_hledger Paths_hledger
hs-source-dirs: hs-source-dirs:
app app
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path
cpp-options: -DVERSION="1.25.99" cpp-options: -DVERSION="1.25.99"
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
@ -236,7 +236,7 @@ test-suite unittest
main-is: unittest.hs main-is: unittest.hs
hs-source-dirs: hs-source-dirs:
test test
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path
cpp-options: -DVERSION="1.25.99" cpp-options: -DVERSION="1.25.99"
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
@ -284,7 +284,7 @@ benchmark bench
main-is: bench.hs main-is: bench.hs
hs-source-dirs: hs-source-dirs:
bench bench
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path
build-depends: build-depends:
Decimal >=0.5.1 Decimal >=0.5.1
, aeson >=1 , aeson >=1

View File

@ -87,11 +87,11 @@ flags:
ghc-options: ghc-options:
- -Wall - -Wall
- -fno-warn-unused-do-bind - -Wno-unused-do-bind
- -fno-warn-name-shadowing - -Wno-name-shadowing
- -fno-warn-missing-signatures - -Wno-missing-signatures
- -fno-warn-type-defaults - -Wno-type-defaults
- -fno-warn-orphans - -Wno-orphans
# avoid "non-portable path" warning on mac, https://github.com/commercialhaskell/stack/issues/3918 # avoid "non-portable path" warning on mac, https://github.com/commercialhaskell/stack/issues/3918
- -optP-Wno-nonportable-include-path - -optP-Wno-nonportable-include-path

View File

@ -26,7 +26,7 @@ extra-deps:
# silence new warnings temporarily # silence new warnings temporarily
ghc-options: ghc-options:
"$locals": -Wno-deprecations -Wno-incomplete-uni-patterns -Wno-incomplete-record-updates "$locals": -Wno-incomplete-uni-patterns -Wno-incomplete-record-updates
nix: nix:
pure: false pure: false