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).
 | ||||
| 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:=\
 | ||||
| 	-Wall \
 | ||||
| 	-Wno-unused-do-bind \
 | ||||
| 	-Wno-name-shadowing \
 | ||||
|   -Wno-incomplete-uni-patterns \
 | ||||
| 	-Wno-missing-signatures \
 | ||||
| 	-Wno-name-shadowing \
 | ||||
| 	-Wno-orphans \
 | ||||
| 	-Wno-type-defaults \
 | ||||
| 	-Wno-unused-do-bind \
 | ||||
| 
 | ||||
| # if you have need to try building in less memory
 | ||||
| # GHCLOWMEMFLAGS= #+RTS -M200m -RTS
 | ||||
|  | ||||
| @ -91,7 +91,7 @@ library | ||||
|       Paths_hledger_lib | ||||
|   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: | ||||
|       Decimal >=0.5.1 | ||||
|     , Glob >=0.9 | ||||
| @ -141,7 +141,7 @@ test-suite doctest | ||||
|   hs-source-dirs: | ||||
|       ./ | ||||
|       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: | ||||
|       Decimal >=0.5.1 | ||||
|     , Glob >=0.7 | ||||
| @ -194,7 +194,7 @@ test-suite unittest | ||||
|   hs-source-dirs: | ||||
|       ./ | ||||
|       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: | ||||
|       Decimal >=0.5.1 | ||||
|     , Glob >=0.9 | ||||
|  | ||||
| @ -79,13 +79,12 @@ dependencies: | ||||
| 
 | ||||
| ghc-options: | ||||
| - -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-missing-signatures | ||||
| - -Wno-name-shadowing | ||||
| - -Wno-orphans | ||||
| - -Wno-type-defaults | ||||
| - -Wno-unused-do-bind | ||||
| 
 | ||||
| source-dirs:  | ||||
| #- other/ledger-parse | ||||
|  | ||||
| @ -62,7 +62,7 @@ executable hledger-ui | ||||
|       Paths_hledger_ui | ||||
|   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" | ||||
|   build-depends: | ||||
|       ansi-terminal >=0.9 | ||||
|  | ||||
| @ -40,6 +40,15 @@ flags: | ||||
| 
 | ||||
| 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: | ||||
| - hledger-lib >=1.25.99 && <1.26 | ||||
| - hledger >=1.25.99 && <1.26 | ||||
| @ -92,13 +101,6 @@ executables: | ||||
|   hledger-ui: | ||||
|     source-dirs: . | ||||
|     main: hledger-ui.hs | ||||
|     ghc-options: | ||||
|       -Wall | ||||
|       -Wno-unused-do-bind | ||||
|       -Wno-name-shadowing | ||||
|       -Wno-missing-signatures | ||||
|       -Wno-type-defaults | ||||
|       -Wno-orphans | ||||
|     when: | ||||
|     - condition: flag(threaded) | ||||
|       ghc-options: -threaded | ||||
|  | ||||
| @ -150,7 +150,7 @@ library | ||||
|       Paths_hledger_web | ||||
|   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" | ||||
|   build-depends: | ||||
|       Decimal >=0.5.1 | ||||
| @ -211,7 +211,7 @@ executable hledger-web | ||||
|       Paths_hledger_web | ||||
|   hs-source-dirs: | ||||
|       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" | ||||
|   build-depends: | ||||
|       base | ||||
| @ -231,7 +231,7 @@ test-suite test | ||||
|   main-is: test.hs | ||||
|   hs-source-dirs: | ||||
|       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" | ||||
|   build-depends: | ||||
|       base | ||||
|  | ||||
| @ -62,11 +62,11 @@ flags: | ||||
| 
 | ||||
| ghc-options: | ||||
| - -Wall | ||||
| - -Wtabs | ||||
| - -Wcompat | ||||
| - -Wincomplete-uni-patterns | ||||
| - -Wincomplete-record-updates | ||||
| # not included in -Wall: | ||||
| - -Wredundant-constraints | ||||
| # not included in -Wall by older GHC versions: | ||||
| - -Wincomplete-record-updates | ||||
| - -Wincomplete-uni-patterns | ||||
| 
 | ||||
| when: | ||||
| - condition: (flag(dev)) || (flag(library-only)) | ||||
|  | ||||
| @ -135,7 +135,7 @@ library | ||||
|       Hledger.Cli.CompoundBalanceCommand | ||||
|   other-modules: | ||||
|       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" | ||||
|   build-depends: | ||||
|       Decimal >=0.5.1 | ||||
| @ -186,7 +186,7 @@ executable hledger | ||||
|       Paths_hledger | ||||
|   hs-source-dirs: | ||||
|       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" | ||||
|   build-depends: | ||||
|       Decimal >=0.5.1 | ||||
| @ -236,7 +236,7 @@ test-suite unittest | ||||
|   main-is: unittest.hs | ||||
|   hs-source-dirs: | ||||
|       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" | ||||
|   build-depends: | ||||
|       Decimal >=0.5.1 | ||||
| @ -284,7 +284,7 @@ benchmark bench | ||||
|   main-is: bench.hs | ||||
|   hs-source-dirs: | ||||
|       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: | ||||
|       Decimal >=0.5.1 | ||||
|     , aeson >=1 | ||||
|  | ||||
| @ -87,12 +87,13 @@ flags: | ||||
| 
 | ||||
| ghc-options: | ||||
| - -Wall | ||||
| - -Wno-unused-do-bind | ||||
| - -Wno-name-shadowing | ||||
| - -Wno-incomplete-uni-patterns | ||||
| - -Wno-missing-signatures | ||||
| - -Wno-type-defaults | ||||
| - -Wno-name-shadowing | ||||
| - -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 | ||||
| 
 | ||||
| dependencies: | ||||
|  | ||||
| @ -24,10 +24,6 @@ extra-deps: | ||||
| # - base64-0.4.2.3@sha256:97bd6f7decaab6110725ef1675a3ed8576233f6bab6599bb813f6caf68d36c94,2876  # doesn't build with 9.2 yet | ||||
| # for Shake.hs: | ||||
| 
 | ||||
| # silence new warnings temporarily | ||||
| ghc-options: | ||||
|   "$locals": -Wno-incomplete-uni-patterns | ||||
| 
 | ||||
| nix: | ||||
|   pure: false | ||||
|   packages: [perl gmp ncurses zlib] | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user