imp: consistent ghc warnings
This commit is contained in:
		
							parent
							
								
									4951ca5aa9
								
							
						
					
					
						commit
						db1818ac4a
					
				
							
								
								
									
										9
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								Makefile
									
									
									
									
									
								
							| @ -199,15 +199,18 @@ DOCSOURCEFILES:= \ | |||||||
| # We use hledger CLI's current version (XXX for all packages, which isn't quite right).
 | # We use hledger CLI's current version (XXX for all packages, which isn't quite right).
 | ||||||
| VERSION=$(shell cat hledger/.version) | VERSION=$(shell cat hledger/.version) | ||||||
| 
 | 
 | ||||||
| # flags for ghc builds
 | # Flags for ghc builds.
 | ||||||
| 
 | 
 | ||||||
|  | # Warnings to see during dev tasks like make ghci*. See also the warnings in package.yamls.
 | ||||||
|  | # XXX redundant with package.yamls ?
 | ||||||
| WARNINGS:=\
 | WARNINGS:=\
 | ||||||
| 	-Wall \
 | 	-Wall \
 | ||||||
| 	-Wno-unused-do-bind \
 |   -Wno-incomplete-uni-patterns \
 | ||||||
| 	-Wno-name-shadowing \
 |  | ||||||
| 	-Wno-missing-signatures \
 | 	-Wno-missing-signatures \
 | ||||||
|  | 	-Wno-name-shadowing \
 | ||||||
| 	-Wno-orphans \
 | 	-Wno-orphans \
 | ||||||
| 	-Wno-type-defaults \
 | 	-Wno-type-defaults \
 | ||||||
|  | 	-Wno-unused-do-bind \
 | ||||||
| 
 | 
 | ||||||
| # 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 -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -Wno-incomplete-uni-patterns |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind | ||||||
|   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 -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -Wno-incomplete-uni-patterns |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind | ||||||
|   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 -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -Wno-incomplete-uni-patterns |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind | ||||||
|   build-depends: |   build-depends: | ||||||
|       Decimal >=0.5.1 |       Decimal >=0.5.1 | ||||||
|     , Glob >=0.9 |     , Glob >=0.9 | ||||||
|  | |||||||
| @ -79,13 +79,12 @@ dependencies: | |||||||
| 
 | 
 | ||||||
| ghc-options: | ghc-options: | ||||||
| - -Wall | - -Wall | ||||||
| - -Wno-unused-do-bind |  | ||||||
| - -Wno-name-shadowing |  | ||||||
| - -Wno-missing-signatures |  | ||||||
| - -Wno-type-defaults |  | ||||||
| - -Wno-orphans |  | ||||||
| # XXX seems new in 9.2, fix these |  | ||||||
| - -Wno-incomplete-uni-patterns | - -Wno-incomplete-uni-patterns | ||||||
|  | - -Wno-missing-signatures | ||||||
|  | - -Wno-name-shadowing | ||||||
|  | - -Wno-orphans | ||||||
|  | - -Wno-type-defaults | ||||||
|  | - -Wno-unused-do-bind | ||||||
| 
 | 
 | ||||||
| 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 -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind | ||||||
|   cpp-options: -DVERSION="1.25.99" |   cpp-options: -DVERSION="1.25.99" | ||||||
|   build-depends: |   build-depends: | ||||||
|       ansi-terminal >=0.9 |       ansi-terminal >=0.9 | ||||||
|  | |||||||
| @ -40,6 +40,15 @@ flags: | |||||||
| 
 | 
 | ||||||
| cpp-options: -DVERSION="1.25.99" | cpp-options: -DVERSION="1.25.99" | ||||||
| 
 | 
 | ||||||
|  | ghc-options: | ||||||
|  | - -Wall | ||||||
|  | - -Wno-incomplete-uni-patterns | ||||||
|  | - -Wno-missing-signatures | ||||||
|  | - -Wno-name-shadowing | ||||||
|  | - -Wno-orphans | ||||||
|  | - -Wno-type-defaults | ||||||
|  | - -Wno-unused-do-bind | ||||||
|  | 
 | ||||||
| dependencies: | dependencies: | ||||||
| - hledger-lib >=1.25.99 && <1.26 | - hledger-lib >=1.25.99 && <1.26 | ||||||
| - hledger >=1.25.99 && <1.26 | - hledger >=1.25.99 && <1.26 | ||||||
| @ -92,13 +101,6 @@ executables: | |||||||
|   hledger-ui: |   hledger-ui: | ||||||
|     source-dirs: . |     source-dirs: . | ||||||
|     main: hledger-ui.hs |     main: hledger-ui.hs | ||||||
|     ghc-options: |  | ||||||
|       -Wall |  | ||||||
|       -Wno-unused-do-bind |  | ||||||
|       -Wno-name-shadowing |  | ||||||
|       -Wno-missing-signatures |  | ||||||
|       -Wno-type-defaults |  | ||||||
|       -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 -Wtabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints |   ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns | ||||||
|   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 -Wtabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints |   ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns | ||||||
|   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 -Wtabs -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints |   ghc-options: -Wall -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns | ||||||
|   cpp-options: -DVERSION="1.25.99" |   cpp-options: -DVERSION="1.25.99" | ||||||
|   build-depends: |   build-depends: | ||||||
|       base |       base | ||||||
|  | |||||||
| @ -62,11 +62,11 @@ flags: | |||||||
| 
 | 
 | ||||||
| ghc-options: | ghc-options: | ||||||
| - -Wall | - -Wall | ||||||
| - -Wtabs | # not included in -Wall: | ||||||
| - -Wcompat |  | ||||||
| - -Wincomplete-uni-patterns |  | ||||||
| - -Wincomplete-record-updates |  | ||||||
| - -Wredundant-constraints | - -Wredundant-constraints | ||||||
|  | # not included in -Wall by older GHC versions: | ||||||
|  | - -Wincomplete-record-updates | ||||||
|  | - -Wincomplete-uni-patterns | ||||||
| 
 | 
 | ||||||
| when: | when: | ||||||
| - condition: (flag(dev)) || (flag(library-only)) | - condition: (flag(dev)) || (flag(library-only)) | ||||||
|  | |||||||
| @ -135,7 +135,7 @@ library | |||||||
|       Hledger.Cli.CompoundBalanceCommand |       Hledger.Cli.CompoundBalanceCommand | ||||||
|   other-modules: |   other-modules: | ||||||
|       Paths_hledger |       Paths_hledger | ||||||
|   ghc-options: -Wall -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind -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 -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind -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 -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind -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 -Wno-unused-do-bind -Wno-name-shadowing -Wno-missing-signatures -Wno-type-defaults -Wno-orphans -optP-Wno-nonportable-include-path |   ghc-options: -Wall -Wno-incomplete-uni-patterns -Wno-missing-signatures -Wno-name-shadowing -Wno-orphans -Wno-type-defaults -Wno-unused-do-bind -optP-Wno-nonportable-include-path | ||||||
|   build-depends: |   build-depends: | ||||||
|       Decimal >=0.5.1 |       Decimal >=0.5.1 | ||||||
|     , aeson >=1 |     , aeson >=1 | ||||||
|  | |||||||
| @ -87,12 +87,13 @@ flags: | |||||||
| 
 | 
 | ||||||
| ghc-options: | ghc-options: | ||||||
| - -Wall | - -Wall | ||||||
| - -Wno-unused-do-bind | - -Wno-incomplete-uni-patterns | ||||||
| - -Wno-name-shadowing |  | ||||||
| - -Wno-missing-signatures | - -Wno-missing-signatures | ||||||
| - -Wno-type-defaults | - -Wno-name-shadowing | ||||||
| - -Wno-orphans | - -Wno-orphans | ||||||
| # avoid "non-portable path" warning on mac, https://github.com/commercialhaskell/stack/issues/3918 | - -Wno-type-defaults | ||||||
|  | - -Wno-unused-do-bind | ||||||
|  | # avoid stack's "non-portable path" warning/error on mac, https://github.com/commercialhaskell/stack/issues/3918 | ||||||
| - -optP-Wno-nonportable-include-path | - -optP-Wno-nonportable-include-path | ||||||
| 
 | 
 | ||||||
| dependencies: | dependencies: | ||||||
|  | |||||||
| @ -24,10 +24,6 @@ extra-deps: | |||||||
| # - base64-0.4.2.3@sha256:97bd6f7decaab6110725ef1675a3ed8576233f6bab6599bb813f6caf68d36c94,2876  # doesn't build with 9.2 yet | # - base64-0.4.2.3@sha256:97bd6f7decaab6110725ef1675a3ed8576233f6bab6599bb813f6caf68d36c94,2876  # doesn't build with 9.2 yet | ||||||
| # for Shake.hs: | # for Shake.hs: | ||||||
| 
 | 
 | ||||||
| # silence new warnings temporarily |  | ||||||
| ghc-options: |  | ||||||
|   "$locals": -Wno-incomplete-uni-patterns |  | ||||||
| 
 |  | ||||||
| nix: | nix: | ||||||
|   pure: false |   pure: false | ||||||
|   packages: [perl gmp ncurses zlib] |   packages: [perl gmp ncurses zlib] | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user