imp: update to modern warning flags
This commit is contained in:
		
							parent
							
								
									b3aff7a394
								
							
						
					
					
						commit
						d9ecd1eb9d
					
				
							
								
								
									
										10
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Makefile
									
									
									
									
									
								
							| @ -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
 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -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 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user