Enable -Wcompat=error in the testsuite
authorVladislav Zavialov <vlad.z.4096@gmail.com>
Mon, 15 Oct 2018 17:52:12 +0000 (13:52 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 15 Oct 2018 23:24:16 +0000 (19:24 -0400)
commit165d3d5ddaecc7dbe7f5ac051834a7619463efb0
tree6ae7967d95ddc071a6dda7e3307f4a16cbf2229f
parent058c2813d882266309e8045af7a72eedecbf2dbb
Enable -Wcompat=error in the testsuite

Enabling -Werror=compat in the testsuite allows us to easily see the
impact that a new warning has on code. It also means that in the period
between adding the warning and making the actual breaking change, all
new test cases that are being added to the testsuite will be
forwards-compatible. This is good because it will make the actual
breaking change contain less irrelevant testsuite updates.

Things that -Wcompat warns about are things that are going to break in
the future, so we can be proactive and keep our testsuite
forwards-compatible.

This patch consists of two main changes:

* Add `TEST_HC_OPTS += -Werror=compat` to the testsuite configuration.
* Fix all broken test cases.

Test Plan: Validate

Reviewers: hvr, goldfire, bgamari, simonpj, RyanGlScott

Reviewed By: goldfire, RyanGlScott

Subscribers: rwbarton, carter

GHC Trac Issues: #15278

Differential Revision: https://phabricator.haskell.org/D5200
302 files changed:
libraries/base/tests/CatPairs.hs
testsuite/mk/test.mk
testsuite/tests/deSugar/should_compile/T10767.hs
testsuite/tests/deSugar/should_compile/T12944.hs
testsuite/tests/deSugar/should_run/dsrun010.hs
testsuite/tests/dependent/should_compile/Dep1.hs
testsuite/tests/dependent/should_compile/Dep3.hs
testsuite/tests/dependent/should_compile/KindEqualities.hs
testsuite/tests/dependent/should_compile/KindEqualities2.hs
testsuite/tests/dependent/should_compile/KindLevels.hs
testsuite/tests/dependent/should_compile/RaeJobTalk.hs
testsuite/tests/dependent/should_compile/T11311.hs
testsuite/tests/dependent/should_compile/T11635.hs
testsuite/tests/dependent/should_compile/T15264.hs
testsuite/tests/dependent/should_compile/T15346.hs
testsuite/tests/dependent/should_compile/T9632.hs
testsuite/tests/dependent/should_compile/mkGADTVars.hs
testsuite/tests/dependent/should_run/T11311.hs
testsuite/tests/deriving/should_compile/T11416.hs
testsuite/tests/deriving/should_compile/T11732c.hs
testsuite/tests/deriving/should_compile/T11833.hs
testsuite/tests/deriving/should_compile/T12144_1.hs
testsuite/tests/deriving/should_compile/T13297.hs
testsuite/tests/deriving/should_compile/T13758.hs
testsuite/tests/deriving/should_compile/T14933.hs
testsuite/tests/deriving/should_compile/T8165.hs
testsuite/tests/deriving/should_compile/T8678.hs
testsuite/tests/deriving/should_compile/T9359.hs
testsuite/tests/deriving/should_compile/deriving-via-standalone.hs
testsuite/tests/determinism/determ004/determ004.hs
testsuite/tests/driver/T13803/E.hs
testsuite/tests/gadt/Gadt23_AST.hs
testsuite/tests/gadt/Session.hs
testsuite/tests/gadt/T14320.hs
testsuite/tests/gadt/T9380.hs
testsuite/tests/gadt/gadt20.hs
testsuite/tests/gadt/gadt22.hs
testsuite/tests/gadt/gadt8.hs
testsuite/tests/gadt/josef.hs
testsuite/tests/gadt/karl1.hs
testsuite/tests/gadt/karl2.hs
testsuite/tests/generics/T10604/T10604_deriving.hs
testsuite/tests/generics/T8479.hs
testsuite/tests/generics/T9563.hs
testsuite/tests/ghci/scripts/GhciKinds.hs
testsuite/tests/ghci/scripts/T12550.script
testsuite/tests/ghci/scripts/T4175.hs
testsuite/tests/ghci/scripts/T4175.stdout
testsuite/tests/ghci/scripts/T5417.stdout
testsuite/tests/ghci/scripts/T5417a.hs
testsuite/tests/ghci/scripts/T6018ghcifail.script
testsuite/tests/ghci/scripts/T9293.stdout
testsuite/tests/ghci/scripts/TypeAppData.script
testsuite/tests/ghci/scripts/TypeAppData.stdout
testsuite/tests/ghci/scripts/ghci024.stdout
testsuite/tests/ghci/scripts/ghci050.script
testsuite/tests/ghci/scripts/ghci050.stderr
testsuite/tests/ghci/scripts/ghci057.stdout
testsuite/tests/indexed-types/should_compile/ATLoop_help.hs
testsuite/tests/indexed-types/should_compile/Class1.hs
testsuite/tests/indexed-types/should_compile/GADT12.hs
testsuite/tests/indexed-types/should_compile/GADT13.hs
testsuite/tests/indexed-types/should_compile/Ind2_help.hs
testsuite/tests/indexed-types/should_compile/InstContextNorm.hs
testsuite/tests/indexed-types/should_compile/Kind.hs
testsuite/tests/indexed-types/should_compile/OversatDecomp.hs
testsuite/tests/indexed-types/should_compile/Refl.hs
testsuite/tests/indexed-types/should_compile/Refl2.hs
testsuite/tests/indexed-types/should_compile/Roman1.hs
testsuite/tests/indexed-types/should_compile/Simple1.hs
testsuite/tests/indexed-types/should_compile/Simple16.hs
testsuite/tests/indexed-types/should_compile/Simple19.hs
testsuite/tests/indexed-types/should_compile/Simple24.hs
testsuite/tests/indexed-types/should_compile/Simple3.hs
testsuite/tests/indexed-types/should_compile/Simple4.hs
testsuite/tests/indexed-types/should_compile/Simple5.hs
testsuite/tests/indexed-types/should_compile/Simple6.hs
testsuite/tests/indexed-types/should_compile/Simple7.hs
testsuite/tests/indexed-types/should_compile/Simple9.hs
testsuite/tests/indexed-types/should_compile/Sock.hs
testsuite/tests/indexed-types/should_compile/T10139.hs
testsuite/tests/indexed-types/should_compile/T10318.hs
testsuite/tests/indexed-types/should_compile/T10753.hs
testsuite/tests/indexed-types/should_compile/T10931.hs
testsuite/tests/indexed-types/should_compile/T11361.hs
testsuite/tests/indexed-types/should_compile/T11581.hs
testsuite/tests/indexed-types/should_compile/T12526.hs
testsuite/tests/indexed-types/should_compile/T13662.hs
testsuite/tests/indexed-types/should_compile/T14131.hs
testsuite/tests/indexed-types/should_compile/T2291.hs
testsuite/tests/indexed-types/should_compile/T2448.hs
testsuite/tests/indexed-types/should_compile/T2715.hs
testsuite/tests/indexed-types/should_compile/T2767.hs
testsuite/tests/indexed-types/should_compile/T2850.hs
testsuite/tests/indexed-types/should_compile/T2944.hs
testsuite/tests/indexed-types/should_compile/T3220.hs
testsuite/tests/indexed-types/should_compile/T3590.hs
testsuite/tests/indexed-types/should_compile/T3787.hs
testsuite/tests/indexed-types/should_compile/T3851.hs
testsuite/tests/indexed-types/should_compile/T4120.hs
testsuite/tests/indexed-types/should_compile/T4160.hs
testsuite/tests/indexed-types/should_compile/T4185.hs
testsuite/tests/indexed-types/should_compile/T4200.hs
testsuite/tests/indexed-types/should_compile/T4356.hs
testsuite/tests/indexed-types/should_compile/T4484.hs
testsuite/tests/indexed-types/should_compile/T5591b.hs
testsuite/tests/indexed-types/should_compile/T7082.hs
testsuite/tests/indexed-types/should_compile/T7280.hs
testsuite/tests/indexed-types/should_compile/T7282.hs
testsuite/tests/indexed-types/should_compile/T7474.hs
testsuite/tests/indexed-types/should_compile/T7489.hs
testsuite/tests/indexed-types/should_compile/T8913.hs
testsuite/tests/indexed-types/should_compile/T8978.hs
testsuite/tests/indexed-types/should_compile/T9316.hs
testsuite/tests/indexed-types/should_compile/T9840.hs
testsuite/tests/indexed-types/should_compile/T9840.hs-boot
testsuite/tests/indexed-types/should_compile/ind1.hs
testsuite/tests/indexed-types/should_compile/red-black-delete.hs
testsuite/tests/indexed-types/should_fail/ClosedFam3.hs-boot
testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
testsuite/tests/indexed-types/should_fail/NonLinearSigErr.hs
testsuite/tests/indexed-types/should_fail/OverA.hs
testsuite/tests/indexed-types/should_fail/OverDirectThisModA.hs
testsuite/tests/indexed-types/should_fail/OverIndirectThisModA.hs
testsuite/tests/indexed-types/should_fail/SimpleFail10.hs
testsuite/tests/indexed-types/should_fail/SimpleFail4.hs
testsuite/tests/indexed-types/should_fail/SimpleFail4.stderr
testsuite/tests/indexed-types/should_fail/T7354b.hs
testsuite/tests/indexed-types/should_fail/T8227.hs
testsuite/tests/indexed-types/should_fail/T8227.stderr
testsuite/tests/indexed-types/should_fail/T8227a.hs
testsuite/tests/indexed-types/should_fail/T9580a.hs
testsuite/tests/indexed-types/should_run/GMapAssoc.hs
testsuite/tests/indexed-types/should_run/GMapTop.hs
testsuite/tests/indexed-types/should_run/T11465a.hs
testsuite/tests/monadfail/MonadFailWarnings.hs
testsuite/tests/monadfail/MonadFailWarningsDisabled.hs
testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs
testsuite/tests/parser/should_compile/DumpRenamedAst.hs
testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
testsuite/tests/parser/should_compile/T10379.hs
testsuite/tests/parser/should_compile/T13747.hs
testsuite/tests/parser/should_compile/read026.hs
testsuite/tests/parser/should_compile/read050.hs
testsuite/tests/parser/should_compile/read051.hs
testsuite/tests/partial-sigs/should_compile/T13482.hs
testsuite/tests/partial-sigs/should_compile/T13482.stderr
testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.hs
testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
testsuite/tests/patsyn/should_compile/T10997_1a.hs
testsuite/tests/patsyn/should_compile/T12968.hs
testsuite/tests/patsyn/should_compile/T8966.hs
testsuite/tests/patsyn/should_compile/T8968-1.hs
testsuite/tests/patsyn/should_compile/T8968-2.hs
testsuite/tests/perf/compiler/T5030.hs
testsuite/tests/perf/compiler/T5837.hs
testsuite/tests/pmcheck/should_compile/EmptyCase002.hs
testsuite/tests/pmcheck/should_compile/EmptyCase002.stderr
testsuite/tests/pmcheck/should_compile/EmptyCase003.hs
testsuite/tests/pmcheck/should_compile/EmptyCase003.stderr
testsuite/tests/pmcheck/should_compile/EmptyCase004.hs
testsuite/tests/pmcheck/should_compile/EmptyCase004.stderr
testsuite/tests/pmcheck/should_compile/EmptyCase006.hs
testsuite/tests/pmcheck/should_compile/EmptyCase006.stderr
testsuite/tests/pmcheck/should_compile/EmptyCase007.hs
testsuite/tests/pmcheck/should_compile/EmptyCase007.stderr
testsuite/tests/pmcheck/should_compile/EmptyCase008.hs
testsuite/tests/pmcheck/should_compile/EmptyCase008.stderr
testsuite/tests/pmcheck/should_compile/EmptyCase009.hs
testsuite/tests/pmcheck/should_compile/EmptyCase009.stderr
testsuite/tests/pmcheck/should_compile/EmptyCase010.hs
testsuite/tests/pmcheck/should_compile/EmptyCase010.stderr
testsuite/tests/pmcheck/should_compile/T8970.hs
testsuite/tests/polykinds/Freeman.hs
testsuite/tests/polykinds/PolyInstances.hs
testsuite/tests/polykinds/PolyKinds01.hs
testsuite/tests/polykinds/PolyKinds09.hs
testsuite/tests/polykinds/RedBlack.hs
testsuite/tests/polykinds/T10670.hs
testsuite/tests/polykinds/T11362.hs
testsuite/tests/polykinds/T11480a.hs
testsuite/tests/polykinds/T11821.hs
testsuite/tests/polykinds/T14172a.hs
testsuite/tests/polykinds/T14723.hs
testsuite/tests/polykinds/T14873.hs
testsuite/tests/polykinds/T5862.hs
testsuite/tests/polykinds/T5937.hs
testsuite/tests/polykinds/T5938.hs
testsuite/tests/polykinds/T6002.hs
testsuite/tests/polykinds/T6049.hs
testsuite/tests/polykinds/T6068.hs
testsuite/tests/polykinds/T6081.hs
testsuite/tests/polykinds/T6093.hs
testsuite/tests/polykinds/T6118.hs
testsuite/tests/polykinds/T6137.hs
testsuite/tests/polykinds/T7053a.hs
testsuite/tests/polykinds/T7176.hs
testsuite/tests/polykinds/T7332.hs
testsuite/tests/polykinds/T7347.hs
testsuite/tests/polykinds/T7404.hs
testsuite/tests/polykinds/T7438a.hs
testsuite/tests/polykinds/T7481.hs
testsuite/tests/polykinds/T7601.hs
testsuite/tests/polykinds/T7908.hs
testsuite/tests/polykinds/T7916.hs
testsuite/tests/polykinds/T7973.hs
testsuite/tests/polykinds/T9200.hs
testsuite/tests/polykinds/T9574.hs
testsuite/tests/polykinds/T9725.hs
testsuite/tests/polykinds/T9750.hs
testsuite/tests/rebindable/rebindable2.hs
testsuite/tests/rebindable/rebindable3.hs
testsuite/tests/rebindable/rebindable4.hs
testsuite/tests/rebindable/rebindable5.hs
testsuite/tests/rename/should_compile/T15149A.hs
testsuite/tests/roles/should_compile/Roles1.hs
testsuite/tests/simplCore/should_compile/T11562.hs
testsuite/tests/simplCore/should_compile/T11644.hs
testsuite/tests/simplCore/should_compile/T13410.hs
testsuite/tests/simplCore/should_compile/T14270a.hs
testsuite/tests/simplCore/should_compile/T15186.hs
testsuite/tests/simplCore/should_compile/T15517a.hs
testsuite/tests/simplCore/should_compile/T5303.hs
testsuite/tests/simplCore/should_compile/T7785.hs
testsuite/tests/simplCore/should_compile/simpl011.hs
testsuite/tests/simplCore/should_run/T3591.hs
testsuite/tests/th/T10828.hs
testsuite/tests/th/T10891.hs
testsuite/tests/th/T11463.hs
testsuite/tests/th/T11484.hs
testsuite/tests/th/T12646.hs
testsuite/tests/th/T13123.hs
testsuite/tests/th/T13782.hs
testsuite/tests/th/T14817.hs
testsuite/tests/th/T14817.stderr
testsuite/tests/th/T3920.hs
testsuite/tests/th/T5452.hs
testsuite/tests/th/T5882.hs
testsuite/tests/th/T5886a.hs
testsuite/tests/th/T8031.hs
testsuite/tests/th/T8953.hs
testsuite/tests/th/T9199.hs
testsuite/tests/th/T9692.hs
testsuite/tests/th/TH_RichKinds.hs
testsuite/tests/th/TH_tf1.hs
testsuite/tests/typecheck/should_compile/T10195.hs
testsuite/tests/typecheck/should_compile/T10432.hs
testsuite/tests/typecheck/should_compile/T10564.hs
testsuite/tests/typecheck/should_compile/T10592.hs
testsuite/tests/typecheck/should_compile/T11401.hs
testsuite/tests/typecheck/should_compile/T11811.hs
testsuite/tests/typecheck/should_compile/T12797.hs
testsuite/tests/typecheck/should_compile/T12911.hs
testsuite/tests/typecheck/should_compile/T13333.hs
testsuite/tests/typecheck/should_compile/T13585a.hs
testsuite/tests/typecheck/should_compile/T13881.hs
testsuite/tests/typecheck/should_compile/T1470.hs
testsuite/tests/typecheck/should_compile/T14732.hs
testsuite/tests/typecheck/should_compile/T14763.hs
testsuite/tests/typecheck/should_compile/T15368.hs
testsuite/tests/typecheck/should_compile/T15368.stderr
testsuite/tests/typecheck/should_compile/T15370.hs
testsuite/tests/typecheck/should_compile/T4310.hs
testsuite/tests/typecheck/should_compile/T4952.hs
testsuite/tests/typecheck/should_compile/T5595.hs
testsuite/tests/typecheck/should_compile/T5655.hs
testsuite/tests/typecheck/should_compile/T6011.hs
testsuite/tests/typecheck/should_compile/T6018.hs
testsuite/tests/typecheck/should_compile/T6018.hs-boot
testsuite/tests/typecheck/should_compile/T6018.stderr
testsuite/tests/typecheck/should_compile/T6018a.hs
testsuite/tests/typecheck/should_compile/T7196.hs
testsuite/tests/typecheck/should_compile/T7875.hs
testsuite/tests/typecheck/should_compile/T7891.hs
testsuite/tests/typecheck/should_compile/T7903.hs
testsuite/tests/typecheck/should_compile/T7903.stderr
testsuite/tests/typecheck/should_compile/Tc245_A.hs
testsuite/tests/typecheck/should_compile/Tc251_Help.hs
testsuite/tests/typecheck/should_compile/Vta1.hs
testsuite/tests/typecheck/should_compile/tc190.hs
testsuite/tests/typecheck/should_compile/tc247.hs
testsuite/tests/typecheck/should_compile/tc250.hs
testsuite/tests/typecheck/should_compile/tc252.hs
testsuite/tests/typecheck/should_compile/tc253.hs
testsuite/tests/typecheck/should_compile/tc255.hs
testsuite/tests/typecheck/should_compile/tc256.hs
testsuite/tests/typecheck/should_compile/tc257.hs
testsuite/tests/typecheck/should_fail/ContextStack2.hs
testsuite/tests/typecheck/should_fail/T6018Afail.hs
testsuite/tests/typecheck/should_fail/T6018Bfail.hs
testsuite/tests/typecheck/should_fail/T6018fail.hs
testsuite/tests/typecheck/should_fail/T6018fail.stderr
testsuite/tests/typecheck/should_fail/tcfail188.hs
testsuite/tests/typecheck/should_run/T3500a.hs
testsuite/tests/typecheck/should_run/T9858c.hs
testsuite/tests/typecheck/should_run/TypeOf.hs
testsuite/tests/typecheck/should_run/TypeRep.hs
testsuite/tests/warnings/should_compile/StarBinder.hs
testsuite/tests/warnings/should_compile/StarBinder.stderr
testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs [deleted file]
testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
testsuite/tests/wcompat-warnings/all.T