diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2023-03-01 12:32:53 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2023-03-01 12:45:44 +0000 |
commit | 0588a865f19d6049646f6927d744d26b52ae1284 (patch) | |
tree | 024a4d04a8136b0aace57fce8140d211880f1e77 | |
parent | 8b1e94f74b52343b041ba0590e9b2b76b5da2a78 (diff) | |
download | haskell-0588a865f19d6049646f6927d744d26b52ae1284.tar.gz |
Track compile time stderr for compile_and_run tests
Also fixes some tests to not have warnings
120 files changed, 1159 insertions, 22 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 0e3e492870..14a4cae9d2 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1443,12 +1443,21 @@ def do_compile(name: TestName, expected_stderr_file = find_expected_file(name, 'stderr') actual_stderr_file = add_suffix(name, 'comp.stderr') + result = check_compile_stderr(way, name, expected_stderr_file, actual_stderr_file) + if badResult(result): + return result + + + # no problems found, this test passed + return passed() + +def check_compile_stderr(way, name, expected, actual): diff_file_name = in_testdir(add_suffix(name, 'comp.diff')) if not compare_outputs(way, 'stderr', join_normalisers(getTestOpts().extra_errmsg_normaliser, normalise_errmsg), - expected_stderr_file, actual_stderr_file, + expected, actual, diff_file=diff_file_name, whitespace_normaliser=getattr(getTestOpts(), "whitespace_normaliser", @@ -1456,9 +1465,6 @@ def do_compile(name: TestName, stderr = diff_file_name.read_text() diff_file_name.unlink() return failBecause('stderr mismatch', stderr=stderr) - - - # no problems found, this test passed return passed() def compile_cmp_asm(name: TestName, @@ -1544,7 +1550,7 @@ def compile_and_run__(name: TestName, result = extras_build( way, extra_mods, extra_hc_opts ) if badResult(result): return result - extra_hc_opts = result.hc_opts + extra_hc_opts = "-v0 " + result.hc_opts assert extra_hc_opts is not None if way.startswith('ghci'): # interpreted... @@ -1554,6 +1560,12 @@ def compile_and_run__(name: TestName, if badResult(result): return result + expected_stderr_file = find_expected_file(name, 'compile-stderr') + actual_stderr_file = add_suffix(name, 'comp.stderr') + result = check_compile_stderr(way, name, expected_stderr_file, actual_stderr_file) + if badResult(result): + return result + cmd = './' + name; # we don't check the compiler's stderr for a compile-and-run test diff --git a/testsuite/tests/codeGen/should_run/T10245.compile-stderr b/testsuite/tests/codeGen/should_run/T10245.compile-stderr new file mode 100644 index 0000000000..d3e01134c3 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T10245.compile-stderr @@ -0,0 +1,6 @@ + +T10245.hs:6:7: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 9223372036854775808 is out of the Int range -9223372036854775808..9223372036854775807 + Suggested fix: + Perhaps you intended to use NegativeLiterals + If you are trying to write a large negative literal diff --git a/testsuite/tests/codeGen/should_run/T10246.compile-stderr b/testsuite/tests/codeGen/should_run/T10246.compile-stderr new file mode 100644 index 0000000000..8710df6aa3 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T10246.compile-stderr @@ -0,0 +1,12 @@ + +T10246.hs:2:8: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551616 is out of the Int range -9223372036854775808..9223372036854775807 + +T10246.hs:10:16: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551616 is out of the Int range -9223372036854775808..9223372036854775807 + +T10246.hs:15:8: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551616 is out of the Int range -9223372036854775808..9223372036854775807 + +T10246.hs:22:16: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551616 is out of the Int range -9223372036854775808..9223372036854775807 diff --git a/testsuite/tests/codeGen/should_run/T5785.compile-stderr b/testsuite/tests/codeGen/should_run/T5785.compile-stderr new file mode 100644 index 0000000000..09efbeedb9 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T5785.compile-stderr @@ -0,0 +1,45 @@ + +T5785.hs:12:13: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal -1 is out of the Word8 range 0..255 + +T5785.hs:13:13: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal -1 is out of the Word16 range 0..65535 + +T5785.hs:14:13: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal -1 is out of the Word32 range 0..4294967295 + +T5785.hs:15:13: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal -1 is out of the Word64 range 0..18446744073709551615 + +T5785.hs:22:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 2316287658 is out of the Word8 range 0..255 + +T5785.hs:23:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 2316287658 is out of the Word16 range 0..65535 + +T5785.hs:26:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 2316287658 is out of the Int8 range -128..127 + +T5785.hs:27:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 2316287658 is out of the Int16 range -32768..32767 + +T5785.hs:28:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 2316287658 is out of the Int32 range -2147483648..2147483647 + +T5785.hs:32:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 32342316287658 is out of the Word8 range 0..255 + +T5785.hs:33:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 32342316287658 is out of the Word16 range 0..65535 + +T5785.hs:34:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 32342316287658 is out of the Word32 range 0..4294967295 + +T5785.hs:36:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 32342316287658 is out of the Int8 range -128..127 + +T5785.hs:37:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 32342316287658 is out of the Int16 range -32768..32767 + +T5785.hs:38:12: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 32342316287658 is out of the Int32 range -2147483648..2147483647 diff --git a/testsuite/tests/codeGen/should_run/T9533.compile-stderr b/testsuite/tests/codeGen/should_run/T9533.compile-stderr new file mode 100644 index 0000000000..8b2d6418c6 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T9533.compile-stderr @@ -0,0 +1,3 @@ + +T9533.hs:9:8: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal -1 is out of the Word range 0..18446744073709551615 diff --git a/testsuite/tests/codeGen/should_run/T9533b.compile-stderr b/testsuite/tests/codeGen/should_run/T9533b.compile-stderr new file mode 100644 index 0000000000..01aed0e1a1 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T9533b.compile-stderr @@ -0,0 +1,9 @@ + +T9533b.hs:2:8: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551617 is out of the Int range -9223372036854775808..9223372036854775807 + +T9533b.hs:5:14: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551617 is out of the Int range -9223372036854775808..9223372036854775807 + +T9533b.hs:5:14: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551617 is out of the Int range -9223372036854775808..9223372036854775807 diff --git a/testsuite/tests/codeGen/should_run/cgrun051.compile-stderr b/testsuite/tests/codeGen/should_run/cgrun051.compile-stderr new file mode 100644 index 0000000000..e6ca33ce78 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/cgrun051.compile-stderr @@ -0,0 +1,4 @@ + +cgrun051.hs:7:45: warning: [GHC-94210] [-Woverlapping-patterns (in -Wdefault)] + Pattern match has inaccessible right hand side + In a case alternative: T2 x y -> ... diff --git a/testsuite/tests/codeGen/should_run/cgrun062.compile-stderr b/testsuite/tests/codeGen/should_run/cgrun062.compile-stderr new file mode 100644 index 0000000000..f413d07710 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/cgrun062.compile-stderr @@ -0,0 +1,4 @@ + +cgrun062.hs:14:19: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a case alternative: C {f = v} -> ... diff --git a/testsuite/tests/codeGen/should_run/cgrun071.hs b/testsuite/tests/codeGen/should_run/cgrun071.hs index 70a605fd2f..d38e5e6284 100644 --- a/testsuite/tests/codeGen/should_run/cgrun071.hs +++ b/testsuite/tests/codeGen/should_run/cgrun071.hs @@ -34,7 +34,7 @@ popcnt64 (W64# w#) = W# (popCnt64# w#) -- Cribbed from https://gitlab.haskell.org/ghc/ghc/issues/3563 slowPopcnt :: Word -> Word -slowPopcnt x = count' (bitSize x) x 0 +slowPopcnt x = count' (finiteBitSize x) x 0 where count' 0 _ !acc = acc count' n x acc = count' (n-1) (x `shiftR` 1) diff --git a/testsuite/tests/concurrent/should_run/AtomicPrimops.compile-stderr b/testsuite/tests/concurrent/should_run/AtomicPrimops.compile-stderr new file mode 100644 index 0000000000..195d59c01a --- /dev/null +++ b/testsuite/tests/concurrent/should_run/AtomicPrimops.compile-stderr @@ -0,0 +1,3 @@ + +AtomicPrimops.hs:180:28: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal -2576976009 is out of the Word range 0..18446744073709551615 diff --git a/testsuite/tests/concurrent/should_run/T21651.compile-stderr b/testsuite/tests/concurrent/should_run/T21651.compile-stderr new file mode 100644 index 0000000000..15c34725c7 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/T21651.compile-stderr @@ -0,0 +1,4 @@ + +T21651.hs:25:14: warning: [GHC-68441] [-Wdeprecations (in -Wdefault)] + In the use of ‘fdRead’ (imported from System.Posix.IO): + Deprecated: "This function is scheduled to be dropped in favor of 'System.Posix.IO.ByteString.fdRead', because decoding e.g. UTF-8 streams partially is unsafe." diff --git a/testsuite/tests/concurrent/should_run/conc059.compile-stderr b/testsuite/tests/concurrent/should_run/conc059.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/conc059.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar001.compile-stderr b/testsuite/tests/concurrent/should_run/hs_try_putmvar001.compile-stderr new file mode 100644 index 0000000000..1118f37932 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar001.compile-stderr @@ -0,0 +1,17 @@ +hs_try_putmvar001_c.c: In function ‘scheduleCallback’: + +hs_try_putmvar001_c.c:30:30: error: + warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type [-Wincompatible-pointer-types] + 30 | pthread_create(&t, NULL, callback, p); + | ^~~~~~~~ + | | + | void * (*)(struct callback *) +In file included from /home/matt/ghc-9.6-backports/_debug_clean/stage1/lib/../lib/x86_64-linux-ghc-9.6.0.20230201/rts-1.0.2/include/rts/OSThreads.h:27, + from /home/matt/ghc-9.6-backports/_debug_clean/stage1/lib/../lib/x86_64-linux-ghc-9.6.0.20230201/rts-1.0.2/include/Rts.h:238, + + from hs_try_putmvar001_c.c:2:0: error: + +/nix/store/sxdx80lmk4zkhb51f4x5dgqvxgmx55wl-gcc-11.3.0/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/include-fixed/pthread.h:213:36: error: + note: expected ‘void * (*)(void *)’ but argument is of type ‘void * (*)(struct callback *)’ + 213 | void *(*__start_routine) (void *), + | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/testsuite/tests/concurrent/should_run/throwto003.compile-stderr b/testsuite/tests/concurrent/should_run/throwto003.compile-stderr new file mode 100644 index 0000000000..abd5cd4a02 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/throwto003.compile-stderr @@ -0,0 +1,3 @@ + +throwto003.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XDoRec is deprecated: use -XRecursiveDo or pragma {-# LANGUAGE RecursiveDo #-} instead diff --git a/testsuite/tests/deSugar/should_fail/DsStrictFail.compile-stderr b/testsuite/tests/deSugar/should_fail/DsStrictFail.compile-stderr new file mode 100644 index 0000000000..e8f60f9306 --- /dev/null +++ b/testsuite/tests/deSugar/should_fail/DsStrictFail.compile-stderr @@ -0,0 +1,4 @@ + +DsStrictFail.hs:4:12: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding: False = ... diff --git a/testsuite/tests/deSugar/should_run/DsMultiWayIf.compile-stderr b/testsuite/tests/deSugar/should_run/DsMultiWayIf.compile-stderr new file mode 100644 index 0000000000..6057716a47 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/DsMultiWayIf.compile-stderr @@ -0,0 +1,4 @@ + +DsMultiWayIf.hs:13:14: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a multi-way if alternative: | False -> ... diff --git a/testsuite/tests/deSugar/should_run/T20024.compile-stderr b/testsuite/tests/deSugar/should_run/T20024.compile-stderr new file mode 100644 index 0000000000..8c5e7a0b97 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/T20024.compile-stderr @@ -0,0 +1,4 @@ + +T20024.hs:2:20: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding guards: | False = ... diff --git a/testsuite/tests/deSugar/should_run/T3126.compile-stderr b/testsuite/tests/deSugar/should_run/T3126.compile-stderr new file mode 100644 index 0000000000..382647a013 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/T3126.compile-stderr @@ -0,0 +1,5 @@ + +T3126.hs:9:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘+’, ‘*’, ‘abs’, ‘signum’, and (either ‘negate’ or ‘-’) + • In the instance declaration for ‘Num N’ diff --git a/testsuite/tests/deSugar/should_run/T5742.hs b/testsuite/tests/deSugar/should_run/T5742.hs index 957b7c961d..4225fedad6 100644 --- a/testsuite/tests/deSugar/should_run/T5742.hs +++ b/testsuite/tests/deSugar/should_run/T5742.hs @@ -1,10 +1,10 @@ -{-# LANGUAGE DoRec #-} +{-# LANGUAGE RecursiveDo #-} module Main where main = do { x <- foo; print x } foo :: IO Int -foo = do rec +foo = do rec a1 <- return a2 a2 <- return a3 a3 <- return a4 diff --git a/testsuite/tests/deSugar/should_run/T8952.compile-stderr b/testsuite/tests/deSugar/should_run/T8952.compile-stderr new file mode 100644 index 0000000000..1a39db08b7 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/T8952.compile-stderr @@ -0,0 +1,4 @@ + +T8952.hs:7:19: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a case alternative: Nothing -> ... diff --git a/testsuite/tests/deSugar/should_run/dsrun007.compile-stderr b/testsuite/tests/deSugar/should_run/dsrun007.compile-stderr new file mode 100644 index 0000000000..db3269c375 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/dsrun007.compile-stderr @@ -0,0 +1,6 @@ + +dsrun007.hs:5:23: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘C’ not initialised + • In the first argument of ‘unpick’, namely ‘(C {})’ + In the first argument of ‘print’, namely ‘(unpick (C {}))’ + In the expression: print (unpick (C {})) diff --git a/testsuite/tests/deSugar/should_run/dsrun009.compile-stderr b/testsuite/tests/deSugar/should_run/dsrun009.compile-stderr new file mode 100644 index 0000000000..e16fa33558 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/dsrun009.compile-stderr @@ -0,0 +1,5 @@ + +dsrun009.hs:14:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘+’, ‘*’, ‘abs’, and ‘signum’ + • In the instance declaration for ‘Num N’ diff --git a/testsuite/tests/deriving/should_run/T9576.compile-stderr b/testsuite/tests/deriving/should_run/T9576.compile-stderr new file mode 100644 index 0000000000..dce9614e1f --- /dev/null +++ b/testsuite/tests/deriving/should_run/T9576.compile-stderr @@ -0,0 +1,19 @@ + +T9576.hs:6:31: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] + • No instance for ‘Show Foo’ + arising from the first field of ‘MkBar’ (type ‘Foo’) + Possible fix: + use a standalone 'deriving instance' declaration, + so you can specify the instance context yourself + • When deriving the instance for (Show Bar) + +T9576.hs:6:31: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] + • No instance for ‘Show Foo’ arising from a use of ‘showsPrec’ + • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + In the second argument of ‘showParen’, namely + ‘((.) (showString "MkBar ") (showsPrec 11 b1))’ + In the expression: + showParen (a >= 11) ((.) (showString "MkBar ") (showsPrec 11 b1)) + When typechecking the code for ‘showsPrec’ + in a derived instance for ‘Show Bar’: + To see the code I am typechecking, use -ddump-deriv diff --git a/testsuite/tests/ffi/should_run/IncallAffinity.compile-stderr b/testsuite/tests/ffi/should_run/IncallAffinity.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/ffi/should_run/IncallAffinity.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/ffi/should_run/T1288.compile-stderr b/testsuite/tests/ffi/should_run/T1288.compile-stderr new file mode 100644 index 0000000000..2ac2ec02b4 --- /dev/null +++ b/testsuite/tests/ffi/should_run/T1288.compile-stderr @@ -0,0 +1,11 @@ + +T1288_c.c:4:1: error: + warning: ‘stdcall’ attribute ignored [-Wattributes] + 4 | { + | ^ + +T1288.hs:4:1: warning: [GHC-01245] [-Wunsupported-calling-conventions (in -Wdefault)] + • the 'stdcall' calling convention is unsupported on this platform, + treating as ccall + • When checking declaration: + foreign import stdcall safe "test" ctest :: CInt -> IO () diff --git a/testsuite/tests/ffi/should_run/T14624.compile-stderr b/testsuite/tests/ffi/should_run/T14624.compile-stderr new file mode 100644 index 0000000000..8b480a604c --- /dev/null +++ b/testsuite/tests/ffi/should_run/T14624.compile-stderr @@ -0,0 +1,3 @@ + +T14624.hs:45:58: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal 18446744073709551615 is out of the Int# range -9223372036854775808..9223372036854775807 diff --git a/testsuite/tests/ffi/should_run/T2276.compile-stderr b/testsuite/tests/ffi/should_run/T2276.compile-stderr new file mode 100644 index 0000000000..ebe27a3026 --- /dev/null +++ b/testsuite/tests/ffi/should_run/T2276.compile-stderr @@ -0,0 +1,18 @@ + +T2276_c.c:4:1: error: + warning: ‘stdcall’ attribute ignored [-Wattributes] + 4 | { + | ^ + +T2276.hs:4:1: warning: [GHC-01245] [-Wunsupported-calling-conventions (in -Wdefault)] + • the 'stdcall' calling convention is unsupported on this platform, + treating as ccall + • When checking declaration: + foreign import stdcall safe "&test" ptest :: FunPtr (CInt -> IO ()) + +T2276.hs:5:1: warning: [GHC-01245] [-Wunsupported-calling-conventions (in -Wdefault)] + • the 'stdcall' calling convention is unsupported on this platform, + treating as ccall + • When checking declaration: + foreign import stdcall safe "dynamic" ctest + :: FunPtr (CInt -> IO ()) -> CInt -> IO () diff --git a/testsuite/tests/ffi/should_run/T2594.compile-stderr b/testsuite/tests/ffi/should_run/T2594.compile-stderr new file mode 100644 index 0000000000..cb7d5dcf52 --- /dev/null +++ b/testsuite/tests/ffi/should_run/T2594.compile-stderr @@ -0,0 +1,3 @@ + +T2594.hs:1:13: warning: [-Wdeprecated-flags (in -Wdefault)] + -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface #-} instead diff --git a/testsuite/tests/ffi/should_run/T2917a.compile-stderr b/testsuite/tests/ffi/should_run/T2917a.compile-stderr new file mode 100644 index 0000000000..63c78b287d --- /dev/null +++ b/testsuite/tests/ffi/should_run/T2917a.compile-stderr @@ -0,0 +1,52 @@ + +T2917a.hs:22:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + (either ‘peek’ + or + ‘peekElemOff’ + or + ‘peekByteOff’) and (either ‘poke’ + or + ‘pokeElemOff’ + or + ‘pokeByteOff’) + • In the instance declaration for ‘Storable Align32’ + +T2917a.hs:28:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + (either ‘peek’ + or + ‘peekElemOff’ + or + ‘peekByteOff’) and (either ‘poke’ + or + ‘pokeElemOff’ + or + ‘pokeByteOff’) + • In the instance declaration for ‘Storable Align64’ + +T2917a.hs:34:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + (either ‘peek’ + or + ‘peekElemOff’ + or + ‘peekByteOff’) and (either ‘poke’ + or + ‘pokeElemOff’ + or + ‘pokeByteOff’) + • In the instance declaration for ‘Storable Align128’ + +T2917a.hs:40:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + (either ‘peek’ + or + ‘peekElemOff’ + or + ‘peekByteOff’) and (either ‘poke’ + or + ‘pokeElemOff’ + or + ‘pokeByteOff’) + • In the instance declaration for ‘Storable Align256’ diff --git a/testsuite/tests/ffi/should_run/T5402.compile-stderr b/testsuite/tests/ffi/should_run/T5402.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/ffi/should_run/T5402.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/ffi/should_run/T5594.compile-stderr b/testsuite/tests/ffi/should_run/T5594.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/ffi/should_run/T5594.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/ffi/should_run/ffi002.compile-stderr b/testsuite/tests/ffi/should_run/ffi002.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/ffi/should_run/ffi002.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/ffi/should_run/ffi002_c.c b/testsuite/tests/ffi/should_run/ffi002_c.c index 5783fba051..391520b974 100644 --- a/testsuite/tests/ffi/should_run/ffi002_c.c +++ b/testsuite/tests/ffi/should_run/ffi002_c.c @@ -10,7 +10,7 @@ int main(int argc, char *argv[]) hs_init(&argc, &argv); for (i = 0; i < 5; i++) { - printf("%d\n", foo(2500)); + printf("%ld\n", foo(2500)); } hs_exit(); diff --git a/testsuite/tests/ffi/should_run/ffi015.hs b/testsuite/tests/ffi/should_run/ffi015.hs index c70220fa4a..ccf616175b 100644 --- a/testsuite/tests/ffi/should_run/ffi015.hs +++ b/testsuite/tests/ffi/should_run/ffi015.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -#include "ffi015_cbits.h" #-} {-# LANGUAGE ForeignFunctionInterface #-} import Foreign diff --git a/testsuite/tests/ffi/should_run/fptr01.compile-stderr b/testsuite/tests/ffi/should_run/fptr01.compile-stderr new file mode 100644 index 0000000000..be0d6a906a --- /dev/null +++ b/testsuite/tests/ffi/should_run/fptr01.compile-stderr @@ -0,0 +1,6 @@ + +fptr01.hs:7:12: warning: [GHC-28007] [-Wmisplaced-pragmas (in -Wdefault)] + Misplaced INCLUDE pragma + Suggested fix: + Perhaps you meant to place it in the module header? + The module header is the section at the top of the file, before the ‘module’ keyword diff --git a/testsuite/tests/ffi/should_run/fptr01_c.c b/testsuite/tests/ffi/should_run/fptr01_c.c index 07197c4172..ed4702d800 100644 --- a/testsuite/tests/ffi/should_run/fptr01_c.c +++ b/testsuite/tests/ffi/should_run/fptr01_c.c @@ -23,6 +23,6 @@ void h( HsInt *i ) void f_env( HsInt *env, HsInt *i ) { - printf( "f_env %d %d\n", *env, (int)*i ); + printf( "f_env %ld %d\n", *env, (int)*i ); fflush( stdout ); } diff --git a/testsuite/tests/ffi/should_run/fptrfail01.compile-stderr b/testsuite/tests/ffi/should_run/fptrfail01.compile-stderr new file mode 100644 index 0000000000..d4085767ea --- /dev/null +++ b/testsuite/tests/ffi/should_run/fptrfail01.compile-stderr @@ -0,0 +1,6 @@ + +fptrfail01.hs:8:12: warning: [GHC-28007] [-Wmisplaced-pragmas (in -Wdefault)] + Misplaced INCLUDE pragma + Suggested fix: + Perhaps you meant to place it in the module header? + The module header is the section at the top of the file, before the ‘module’ keyword diff --git a/testsuite/tests/generics/T5462Yes2.compile-stderr b/testsuite/tests/generics/T5462Yes2.compile-stderr new file mode 100644 index 0000000000..e5a7972d84 --- /dev/null +++ b/testsuite/tests/generics/T5462Yes2.compile-stderr @@ -0,0 +1,21 @@ + +T5462Yes2.hs:26:28: warning: [GHC-20042] [-Wderiving-defaults (in -Wdefault)] + • Both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled + Defaulting to the DeriveAnyClass strategy for instantiating C1 + • In the newtype declaration for ‘D’ + Suggested fix: + Use DerivingStrategies + to pick a different strategy + +T5462Yes2.hs:31:42: warning: [GHC-20042] [-Wderiving-defaults (in -Wdefault)] + • Both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled + Defaulting to the DeriveAnyClass strategy for instantiating GFunctor + • In the newtype declaration for ‘F’ + Suggested fix: + Use DerivingStrategies + to pick a different strategy + +T5462Yes2.hs:34:23: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + either ‘c21’ or ‘c22’ + • In the instance declaration for ‘C2 H’ diff --git a/testsuite/tests/generics/Uniplate/GUniplate1.compile-stderr b/testsuite/tests/generics/Uniplate/GUniplate1.compile-stderr new file mode 100644 index 0000000000..427deb1505 --- /dev/null +++ b/testsuite/tests/generics/Uniplate/GUniplate1.compile-stderr @@ -0,0 +1,3 @@ + +GUniplate.hs:8:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout b/testsuite/tests/ghci/scripts/ghci024.stdout index 59922be5fd..ea2b56d35d 100644 --- a/testsuite/tests/ghci/scripts/ghci024.stdout +++ b/testsuite/tests/ghci/scripts/ghci024.stdout @@ -14,7 +14,6 @@ other dynamic, non-language, flag settings: -fkeep-going -fshow-warning-groups -fprefer-byte-code - -fbreak-points warning settings: -Wsemigroup -Wcompat-unqualified-imports diff --git a/testsuite/tests/mdo/should_compile/mdo002.hs b/testsuite/tests/mdo/should_compile/mdo002.hs index 3f9533f247..19e63bffc9 100644 --- a/testsuite/tests/mdo/should_compile/mdo002.hs +++ b/testsuite/tests/mdo/should_compile/mdo002.hs @@ -13,11 +13,10 @@ instance Functor X where fmap f (X a) = X (f a) instance Applicative X where - pure = return + pure = X (<*>) = ap instance Monad X where - return = X (X a) >>= f = f a instance MonadFix X where diff --git a/testsuite/tests/mdo/should_fail/mdofail006.hs b/testsuite/tests/mdo/should_fail/mdofail006.hs index 6896ecfd3d..9cfe5277b8 100644 --- a/testsuite/tests/mdo/should_fail/mdofail006.hs +++ b/testsuite/tests/mdo/should_fail/mdofail006.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DoRec #-} +{-# LANGUAGE RecursiveDo #-} -- check that do-rec does not perform segmentation t :: IO [Int] diff --git a/testsuite/tests/mdo/should_run/mdorun003.compile-stderr b/testsuite/tests/mdo/should_run/mdorun003.compile-stderr new file mode 100644 index 0000000000..5fc6c949ed --- /dev/null +++ b/testsuite/tests/mdo/should_run/mdorun003.compile-stderr @@ -0,0 +1,3 @@ + +mdorun003.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XDoRec is deprecated: use -XRecursiveDo or pragma {-# LANGUAGE RecursiveDo #-} instead diff --git a/testsuite/tests/mdo/should_run/mdorun005.hs b/testsuite/tests/mdo/should_run/mdorun005.hs index 1c4ff2766e..237754d763 100644 --- a/testsuite/tests/mdo/should_run/mdorun005.hs +++ b/testsuite/tests/mdo/should_run/mdorun005.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DoRec #-} +{-# LANGUAGE RecursiveDo #-} -- check that do-rec does not perform segmentation -- compare with ../should_fail/mdofail006.hs diff --git a/testsuite/tests/numeric/should_run/T19931.compile-stderr b/testsuite/tests/numeric/should_run/T19931.compile-stderr new file mode 100644 index 0000000000..f2b82c0eb3 --- /dev/null +++ b/testsuite/tests/numeric/should_run/T19931.compile-stderr @@ -0,0 +1,5 @@ + +T19931.hs:12:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘+’, ‘*’, ‘abs’, ‘signum’, and (either ‘negate’ or ‘-’) + • In the instance declaration for ‘Num T’ diff --git a/testsuite/tests/numeric/should_run/add2.hs b/testsuite/tests/numeric/should_run/add2.hs index 8aa320dacb..12248a8493 100644 --- a/testsuite/tests/numeric/should_run/add2.hs +++ b/testsuite/tests/numeric/should_run/add2.hs @@ -18,7 +18,7 @@ f wx@(W# x) wy@(W# y) (# h, l #) -> do let wh = W# h wl = W# l - r = shiftL (fromIntegral wh) (bitSize wh) + r = shiftL (fromIntegral wh) (finiteBitSize wh) + fromIntegral wl putStrLn ("High: " ++ show wh) putStrLn ("Low: " ++ show wl) diff --git a/testsuite/tests/numeric/should_run/arith010.compile-stderr b/testsuite/tests/numeric/should_run/arith010.compile-stderr new file mode 100644 index 0000000000..cda5eb87e5 --- /dev/null +++ b/testsuite/tests/numeric/should_run/arith010.compile-stderr @@ -0,0 +1,6 @@ + +arith010.hs:5:15: warning: [GHC-10190] [-Wempty-enumerations (in -Wdefault)] + Enumeration is empty + +arith010.hs:9:15: warning: [GHC-10190] [-Wempty-enumerations (in -Wdefault)] + Enumeration is empty diff --git a/testsuite/tests/numeric/should_run/arith011.compile-stderr b/testsuite/tests/numeric/should_run/arith011.compile-stderr new file mode 100644 index 0000000000..1e354ed522 --- /dev/null +++ b/testsuite/tests/numeric/should_run/arith011.compile-stderr @@ -0,0 +1,5 @@ + +arith011.hs:196:39: warning: [GHC-68441] [-Wdeprecations (in -Wdefault)] + In the use of ‘bitSize’ + (imported from Data.Bits, but defined in GHC.Bits): + Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead" diff --git a/testsuite/tests/numeric/should_run/mul2.compile-stderr b/testsuite/tests/numeric/should_run/mul2.compile-stderr new file mode 100644 index 0000000000..382fe601d4 --- /dev/null +++ b/testsuite/tests/numeric/should_run/mul2.compile-stderr @@ -0,0 +1,5 @@ + +mul2.hs:21:55: warning: [GHC-68441] [-Wdeprecations (in -Wdefault)] + In the use of ‘bitSize’ + (imported from Data.Bits, but defined in GHC.Bits): + Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead" diff --git a/testsuite/tests/numeric/should_run/quotRem2.hs b/testsuite/tests/numeric/should_run/quotRem2.hs index dc302cbac0..aee8f067f2 100644 --- a/testsuite/tests/numeric/should_run/quotRem2.hs +++ b/testsuite/tests/numeric/should_run/quotRem2.hs @@ -16,7 +16,7 @@ f wxHigh@(W# xHigh) wxLow@(W# xLow) wy@(W# y) = do when debugging $ putStrLn "-----" when debugging $ putStrLn ("Doing " ++ show (wxHigh, wxLow) ++ " `quotRem` " ++ show wy) - let ix = (toInteger wxHigh `shiftL` bitSize wxHigh) + let ix = (toInteger wxHigh `shiftL` finiteBitSize wxHigh) .|. toInteger wxLow wanted = ix `quotRem` toInteger wy when debugging $ putStrLn ("Wanted: " ++ show wanted) diff --git a/testsuite/tests/overloadedrecflds/should_run/hasfieldrun01.compile-stderr b/testsuite/tests/overloadedrecflds/should_run/hasfieldrun01.compile-stderr new file mode 100644 index 0000000000..015a8f91c7 --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_run/hasfieldrun01.compile-stderr @@ -0,0 +1,3 @@ + +hasfieldrun01.hs:2:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/overloadedrecflds/should_run/overloadedlabelsrun02.compile-stderr b/testsuite/tests/overloadedrecflds/should_run/overloadedlabelsrun02.compile-stderr new file mode 100644 index 0000000000..baa5443110 --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_run/overloadedlabelsrun02.compile-stderr @@ -0,0 +1,3 @@ + +overloadedlabelsrun02.hs:12:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS diff --git a/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun01.compile-stderr b/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun01.compile-stderr new file mode 100644 index 0000000000..1d49affd1b --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun01.compile-stderr @@ -0,0 +1,8 @@ + +overloadedrecfldsrun01.hs:22:9: warning: [GHC-02256] [-Wambiguous-fields (in -Wdefault)] + The record update s {x = 3} with type S is ambiguous. + This will not be supported by -XDuplicateRecordFields in future releases of GHC. + +overloadedrecfldsrun01.hs:23:16: warning: [GHC-02256] [-Wambiguous-fields (in -Wdefault)] + The record update (t :: T) {x = False} with type T is ambiguous. + This will not be supported by -XDuplicateRecordFields in future releases of GHC. diff --git a/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun03.compile-stderr b/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun03.compile-stderr new file mode 100644 index 0000000000..8a8ef06f0c --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun03.compile-stderr @@ -0,0 +1,4 @@ + +overloadedrecfldsrun03.hs:20:9: warning: [GHC-02256] [-Wambiguous-fields (in -Wdefault)] + The record update x {bar = True} with type Main.R:FBool is ambiguous. + This will not be supported by -XDuplicateRecordFields in future releases of GHC. diff --git a/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun05.compile-stderr b/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun05.compile-stderr new file mode 100644 index 0000000000..c1008c8511 --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_run/overloadedrecfldsrun05.compile-stderr @@ -0,0 +1,4 @@ + +overloadedrecfldsrun05.hs:15:26: warning: [GHC-02256] [-Wambiguous-fields (in -Wdefault)] + The record update e {foo} with type S is ambiguous. + This will not be supported by -XDuplicateRecordFields in future releases of GHC. diff --git a/testsuite/tests/parser/should_run/LexNegLit.compile-stderr b/testsuite/tests/parser/should_run/LexNegLit.compile-stderr new file mode 100644 index 0000000000..c66aca624b --- /dev/null +++ b/testsuite/tests/parser/should_run/LexNegLit.compile-stderr @@ -0,0 +1,10 @@ + +LexNegLit.hs:10:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘+’, ‘*’, ‘abs’, and ‘signum’ + • In the instance declaration for ‘Num FreeNum’ + +LexNegLit.hs:15:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + either ‘recip’ or ‘/’ + • In the instance declaration for ‘Fractional FreeNum’ diff --git a/testsuite/tests/parser/should_run/ParserMultiWayIf.compile-stderr b/testsuite/tests/parser/should_run/ParserMultiWayIf.compile-stderr new file mode 100644 index 0000000000..0fbb73e3a5 --- /dev/null +++ b/testsuite/tests/parser/should_run/ParserMultiWayIf.compile-stderr @@ -0,0 +1,8 @@ + +ParserMultiWayIf.hs:12:24: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a multi-way if alternative: | False -> ... + +ParserMultiWayIf.hs:15:26: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a multi-way if alternative: | False -> ... diff --git a/testsuite/tests/parser/should_run/T10807.compile-stderr b/testsuite/tests/parser/should_run/T10807.compile-stderr new file mode 100644 index 0000000000..828e509544 --- /dev/null +++ b/testsuite/tests/parser/should_run/T10807.compile-stderr @@ -0,0 +1,8 @@ + +T10807.hs:28:48: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a multi-way if alternative: | otherwise -> ... + +T10807.hs:35:16: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a multi-way if alternative: | otherwise -> ... diff --git a/testsuite/tests/parser/should_run/readRun002.compile-stderr b/testsuite/tests/parser/should_run/readRun002.compile-stderr new file mode 100644 index 0000000000..fa600cc17a --- /dev/null +++ b/testsuite/tests/parser/should_run/readRun002.compile-stderr @@ -0,0 +1,4 @@ + +readRun002.hs:28:24: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a case alternative: -1# -> ... diff --git a/testsuite/tests/perf/should_run/T3586.compile-stderr b/testsuite/tests/perf/should_run/T3586.compile-stderr new file mode 100644 index 0000000000..4e2db8aab1 --- /dev/null +++ b/testsuite/tests/perf/should_run/T3586.compile-stderr @@ -0,0 +1,3 @@ + +T3586.hs:2:13: warning: [-Wdeprecated-flags (in -Wdefault)] + -fvia-C is deprecated: The -fvia-C flag does nothing; it will be removed in a future GHC release diff --git a/testsuite/tests/plugins/test-hooks-plugin.compile-stderr b/testsuite/tests/plugins/test-hooks-plugin.compile-stderr new file mode 100644 index 0000000000..86865e8dc6 --- /dev/null +++ b/testsuite/tests/plugins/test-hooks-plugin.compile-stderr @@ -0,0 +1 @@ +Options = [] diff --git a/testsuite/tests/polykinds/MonoidsFD.compile-stderr b/testsuite/tests/polykinds/MonoidsFD.compile-stderr new file mode 100644 index 0000000000..75627d4967 --- /dev/null +++ b/testsuite/tests/polykinds/MonoidsFD.compile-stderr @@ -0,0 +1,13 @@ + +MonoidsFD.hs:92:3: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘Applicative Wrapper’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +MonoidsFD.hs:97:4: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘return’ definition detected + in the instance declaration for ‘Monad Wrapper’. + ‘return’ will eventually be removed in favour of ‘pure’ + Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return diff --git a/testsuite/tests/polykinds/MonoidsTF.hs b/testsuite/tests/polykinds/MonoidsTF.hs index 8e3b378046..19a19a8924 100644 --- a/testsuite/tests/polykinds/MonoidsTF.hs +++ b/testsuite/tests/polykinds/MonoidsTF.hs @@ -84,7 +84,7 @@ test1 = do { print (mjoin (munit (), Sum 2)) -- We can even provide a special binary operator for the appropriate monoids as follows: -(<+>) :: (Monoidy (→) m, MId (→) m ~ (), MComp (→) m ~ (,)) +(<+>) :: (Monoidy (→) m, MId (→) m ~ (), MComp (→) m ~ (,)) ⇒ m → m → m (<+>) = curry mjoin @@ -103,17 +103,16 @@ instance (MId (→) m ~ (), MComp (→) m ~ (,), Monoidy (→) m) mempty = munit () instance Applicative Wrapper where - pure = return + pure x = runNT munit $ Id x (<*>) = ap instance Monad Wrapper where - return x = runNT munit $ Id x x >>= f = runNT mjoin $ FC (f `fmap` x) -- And so the following works: test3 - = do { print (mappend mempty (Sum 2)) + = do { print (mappend mempty (Sum 2)) -- Sum 2 ; print (mappend (Product 2) (Product 3)) -- Product 6 diff --git a/testsuite/tests/programs/barton-mangler-bug/barton-mangler-bug.compile-stderr b/testsuite/tests/programs/barton-mangler-bug/barton-mangler-bug.compile-stderr new file mode 100644 index 0000000000..d4e6a69dcf --- /dev/null +++ b/testsuite/tests/programs/barton-mangler-bug/barton-mangler-bug.compile-stderr @@ -0,0 +1,63 @@ + +Basic.hs:207:7: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘Foo’ not initialised: + x :: a + y :: b + • In the expression: Foo {} + In an equation for ‘foo’: foo = Foo {} + +Main.hs:18:10: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘Overshoot’ not initialised: + start_delay :: Time + • In the ‘over’ field of a record + In the first argument of ‘toSig’, namely + ‘Pulse_dc + {start_delay = (Sec 1.0), rise_time = (Sec 0.2), + pulse_width = (Sec 3.0), fall_time = (Sec 0.3), + dc_offset = (V (- 1.0)), period = (Sec 10.0), amplitude = (V 5.0), + over = Overshoot + {ringing = (V 0.2), pulse_width = (Sec 3.0), + oscillation = (Hz 2.0), damp_fac = 1.0}, + under = Overshoot + {ringing = (V (- 0.25)), pulse_width = (Sec 3.0), + oscillation = (Hz 2.10), damp_fac = 1.10}}’ + In the expression: + toSig + Pulse_dc + {start_delay = (Sec 1.0), rise_time = (Sec 0.2), + pulse_width = (Sec 3.0), fall_time = (Sec 0.3), + dc_offset = (V (- 1.0)), period = (Sec 10.0), amplitude = (V 5.0), + over = Overshoot + {ringing = (V 0.2), pulse_width = (Sec 3.0), + oscillation = (Hz 2.0), damp_fac = 1.0}, + under = Overshoot + {ringing = (V (- 0.25)), pulse_width = (Sec 3.0), + oscillation = (Hz 2.10), damp_fac = 1.10}} + +Main.hs:22:11: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘Overshoot’ not initialised: + start_delay :: Time + • In the ‘under’ field of a record + In the first argument of ‘toSig’, namely + ‘Pulse_dc + {start_delay = (Sec 1.0), rise_time = (Sec 0.2), + pulse_width = (Sec 3.0), fall_time = (Sec 0.3), + dc_offset = (V (- 1.0)), period = (Sec 10.0), amplitude = (V 5.0), + over = Overshoot + {ringing = (V 0.2), pulse_width = (Sec 3.0), + oscillation = (Hz 2.0), damp_fac = 1.0}, + under = Overshoot + {ringing = (V (- 0.25)), pulse_width = (Sec 3.0), + oscillation = (Hz 2.10), damp_fac = 1.10}}’ + In the expression: + toSig + Pulse_dc + {start_delay = (Sec 1.0), rise_time = (Sec 0.2), + pulse_width = (Sec 3.0), fall_time = (Sec 0.3), + dc_offset = (V (- 1.0)), period = (Sec 10.0), amplitude = (V 5.0), + over = Overshoot + {ringing = (V 0.2), pulse_width = (Sec 3.0), + oscillation = (Hz 2.0), damp_fac = 1.0}, + under = Overshoot + {ringing = (V (- 0.25)), pulse_width = (Sec 3.0), + oscillation = (Hz 2.10), damp_fac = 1.10}} diff --git a/testsuite/tests/programs/cholewo-eval/cholewo-eval.compile-stderr b/testsuite/tests/programs/cholewo-eval/cholewo-eval.compile-stderr new file mode 100644 index 0000000000..cc4a718e3f --- /dev/null +++ b/testsuite/tests/programs/cholewo-eval/cholewo-eval.compile-stderr @@ -0,0 +1,20 @@ + +Arr.lhs:62:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘*’ and ‘fromInteger’ + • In the instance declaration for ‘Num (Vector b)’ + +Arr.lhs:133:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘fromInteger’ + • In the instance declaration for ‘Num (Matrix b)’ + +Arr.lhs:204:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘*’ and ‘fromInteger’ + • In the instance declaration for ‘Num [a]’ + +Arr.lhs:260:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘*’ and ‘fromInteger’ + • In the instance declaration for ‘Num (Array a b)’ diff --git a/testsuite/tests/programs/fun_insts/fun_insts.compile-stderr b/testsuite/tests/programs/fun_insts/fun_insts.compile-stderr new file mode 100644 index 0000000000..0f85d5d22e --- /dev/null +++ b/testsuite/tests/programs/fun_insts/fun_insts.compile-stderr @@ -0,0 +1,10 @@ + +Main.hs:5:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + either ‘==’ or ‘/=’ + • In the instance declaration for ‘Eq (a -> b)’ + +Main.hs:11:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘abs’ and ‘signum’ + • In the instance declaration for ‘Num (a -> b)’ diff --git a/testsuite/tests/programs/galois_raytrace/galois_raytrace.compile-stderr b/testsuite/tests/programs/galois_raytrace/galois_raytrace.compile-stderr new file mode 100644 index 0000000000..2c551d7c92 --- /dev/null +++ b/testsuite/tests/programs/galois_raytrace/galois_raytrace.compile-stderr @@ -0,0 +1,8 @@ + +Illumination.hs:128:1: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In an equation for ‘showBitmap’: showBitmap _ _ _ = ... + +Illumination.hs:142:1: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In an equation for ‘showBitmap'’: showBitmap' _ _ _ = ... diff --git a/testsuite/tests/programs/joao-circular/joao-circular.compile-stderr b/testsuite/tests/programs/joao-circular/joao-circular.compile-stderr new file mode 100644 index 0000000000..cc142d8521 --- /dev/null +++ b/testsuite/tests/programs/joao-circular/joao-circular.compile-stderr @@ -0,0 +1,4 @@ + +Funcs_Parser_Lazy.hs:10:1: warning: [GHC-94817] [-Wtabs (in -Wdefault)] + Tab character found here, and in 346 further locations. + Suggested fix: Please use spaces instead. diff --git a/testsuite/tests/programs/jtod_circint/jtod_circint.compile-stderr b/testsuite/tests/programs/jtod_circint/jtod_circint.compile-stderr new file mode 100644 index 0000000000..c93601062c --- /dev/null +++ b/testsuite/tests/programs/jtod_circint/jtod_circint.compile-stderr @@ -0,0 +1,5 @@ + +Signal.hs:129:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘showSig’ and ‘initial’ + • In the instance declaration for ‘Signal (Stream a)’ diff --git a/testsuite/tests/programs/record_upd/record_upd.compile-stderr b/testsuite/tests/programs/record_upd/record_upd.compile-stderr new file mode 100644 index 0000000000..09bf6620cd --- /dev/null +++ b/testsuite/tests/programs/record_upd/record_upd.compile-stderr @@ -0,0 +1,21 @@ + +Main.hs:22:15: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘MkT3’ not initialised: + op5 :: d0 + • In the second argument of ‘($)’, namely + ‘MkT3 {op4 = op2 $ update1 (1 :: Int) $ MkT1 {op1 = True}}’ + In the second argument of ‘($)’, namely + ‘update2 True + $ MkT3 {op4 = op2 $ update1 (1 :: Int) $ MkT1 {op1 = True}}’ + In the first argument of ‘print’, namely + ‘(op4 + $ update2 True + $ MkT3 {op4 = op2 $ update1 (1 :: Int) $ MkT1 {op1 = True}})’ + +Main.hs:24:28: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘MkT1’ not initialised: + op2 :: a0 + • In the second argument of ‘($)’, namely ‘MkT1 {op1 = True}’ + In the second argument of ‘($)’, namely + ‘update1 (1 :: Int) $ MkT1 {op1 = True}’ + In the ‘op4’ field of a record diff --git a/testsuite/tests/programs/rittri/rittri.compile-stderr b/testsuite/tests/programs/rittri/rittri.compile-stderr new file mode 100644 index 0000000000..2b0e14e334 --- /dev/null +++ b/testsuite/tests/programs/rittri/rittri.compile-stderr @@ -0,0 +1,5 @@ + +Main.hs:21:16: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict (in -Wdefault)] + The prefix use of a ‘$’ would denote an untyped splice + were the TemplateHaskell extension enabled. + Suggested fix: Add whitespace after the ‘$’. diff --git a/testsuite/tests/programs/thurston-modular-arith/thurston-modular-arith.compile-stderr b/testsuite/tests/programs/thurston-modular-arith/thurston-modular-arith.compile-stderr new file mode 100644 index 0000000000..bf7edbf492 --- /dev/null +++ b/testsuite/tests/programs/thurston-modular-arith/thurston-modular-arith.compile-stderr @@ -0,0 +1,5 @@ + +Main.hs:57:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘abs’ and ‘signum’ + • In the instance declaration for ‘Num (Mod s a)’ diff --git a/testsuite/tests/quotes/TH_spliceViewPat/TH_spliceViewPat.compile-stderr b/testsuite/tests/quotes/TH_spliceViewPat/TH_spliceViewPat.compile-stderr new file mode 100644 index 0000000000..78dc5ad881 --- /dev/null +++ b/testsuite/tests/quotes/TH_spliceViewPat/TH_spliceViewPat.compile-stderr @@ -0,0 +1,23 @@ + +A.hs:8:7: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘QuasiQuoter’ not initialised: + quoteExp :: String -> Q Exp + quoteType :: String -> Q Type + quoteDec :: String -> Q [Dec] + • In the expression: + QuasiQuoter + {quotePat = \ s -> viewP [| (* 2) |] (varP . mkName $ s)} + In an equation for ‘foo’: + foo + = QuasiQuoter + {quotePat = \ s -> viewP [| (...) |] (varP . mkName $ s)} + +A.hs:11:7: warning: [GHC-20125] [-Wmissing-fields (in -Wdefault)] + • Fields of ‘QuasiQuoter’ not initialised: + quoteExp :: String -> Q Exp + quoteType :: String -> Q Type + quoteDec :: String -> Q [Dec] + • In the expression: + QuasiQuoter {quotePat = \ _ -> [p| ((* 3) -> fixed_var) |]} + In an equation for ‘bar’: + bar = QuasiQuoter {quotePat = \ _ -> [p| ((...) -> fixed_var) |]} diff --git a/testsuite/tests/rebindable/rebindable2.compile-stderr b/testsuite/tests/rebindable/rebindable2.compile-stderr new file mode 100644 index 0000000000..ef40a00694 --- /dev/null +++ b/testsuite/tests/rebindable/rebindable2.compile-stderr @@ -0,0 +1,20 @@ + +rebindable2.hs:27:13: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘(Applicative TM)’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +rebindable2.hs:32:17: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘return’ definition detected + in the instance declaration for ‘(Monad TM)’. + ‘return’ will eventually be removed in favour of ‘pure’ + Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +rebindable2.hs:36:17: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘(>>)’ definition detected + in the instance declaration for ‘(Monad TM)’. + ‘(>>)’ will eventually be removed in favour of ‘(*>)’ + Either remove definition for ‘(>>)’ (recommended) or define as ‘(>>) = (*>)’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return diff --git a/testsuite/tests/rts/T3236.compile-stderr b/testsuite/tests/rts/T3236.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/T3236.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/T6006.compile-stderr b/testsuite/tests/rts/T6006.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/T6006.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/T8124.compile-stderr b/testsuite/tests/rts/T8124.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/T8124.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/atomicinc.compile-stderr b/testsuite/tests/rts/atomicinc.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/atomicinc.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/atomicxchg.compile-stderr b/testsuite/tests/rts/atomicxchg.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/atomicxchg.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/continuations/cont_nondet_handler.compile-stderr b/testsuite/tests/rts/continuations/cont_nondet_handler.compile-stderr new file mode 100644 index 0000000000..f458ac863f --- /dev/null +++ b/testsuite/tests/rts/continuations/cont_nondet_handler.compile-stderr @@ -0,0 +1,5 @@ + +cont_nondet_handler.hs:30:45: warning: [GHC-58008] [-Wgadt-mono-local-binds (in -Wdefault)] + Pattern matching on GADTs without MonoLocalBinds is fragile. + Suggested fix: + Enable any of the following extensions: GADTs, TypeFamilies diff --git a/testsuite/tests/rts/ipe/ipeMap.compile-stderr b/testsuite/tests/rts/ipe/ipeMap.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/ipe/ipeMap.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/testblockalloc.compile-stderr b/testsuite/tests/rts/testblockalloc.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/testblockalloc.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/testmblockalloc.compile-stderr b/testsuite/tests/rts/testmblockalloc.compile-stderr new file mode 100644 index 0000000000..3028d7b882 --- /dev/null +++ b/testsuite/tests/rts/testmblockalloc.compile-stderr @@ -0,0 +1,2 @@ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/rts/testwsdeque.compile-stderr b/testsuite/tests/rts/testwsdeque.compile-stderr new file mode 100644 index 0000000000..7251e4cec1 --- /dev/null +++ b/testsuite/tests/rts/testwsdeque.compile-stderr @@ -0,0 +1,35 @@ +testwsdeque.c: In function ‘work’: + +testwsdeque.c:117:23: error: + warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘void *’ [-Wformat=] + 117 | barf("FAIL: %ld %d %d", p, n, val); + | ~~^ ~ + | | | + | long int void * + | %p + +testwsdeque.c:117:29: error: + warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘StgWord’ {aka ‘long unsigned int’} [-Wformat=] + 117 | barf("FAIL: %ld %d %d", p, n, val); + | ~^ ~~~ + | | | + | int StgWord {aka long unsigned int} + | %ld +testwsdeque.c: In function ‘main’: + +testwsdeque.c:155:42: error: + warning: passing argument 3 of ‘createOSThread’ from incompatible pointer type [-Wincompatible-pointer-types] + 155 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); + | ^~~~~ + | | + | void (*)(void *) +In file included from /home/matt/ghc-9.6-backports/_debug_clean/stage1/lib/../lib/x86_64-linux-ghc-9.6.0.20230201/rts-1.0.2/include/Rts.h:238, + + from testwsdeque.c:3:0: error: + +/home/matt/ghc-9.6-backports/_debug_clean/stage1/lib/../lib/x86_64-linux-ghc-9.6.0.20230201/rts-1.0.2/include/rts/OSThreads.h:193:51: error: + note: expected ‘void * (*)(void *)’ but argument is of type ‘void (*)(void *)’ + 193 | OSThreadProc *startProc, void *param); + | ~~~~~~~~~~~~~~^~~~~~~~~ +Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main. + Call hs_init_ghc() from your main() function to set these options. diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang04.compile-stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang04.compile-stderr new file mode 100644 index 0000000000..d5679c4509 --- /dev/null +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang04.compile-stderr @@ -0,0 +1,5 @@ + +SafeLang04.hs:12:11: warning: [GHC-95396] [-Winline-rule-shadowing (in -Wdefault)] + Rule "lookupx/T" may never fire + because ‘lookupx’ might inline first + Suggested fix: Add an INLINE[n] or NOINLINE[n] pragma for ‘lookupx’ diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang05.compile-stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang05.compile-stderr new file mode 100644 index 0000000000..1152b2a982 --- /dev/null +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang05.compile-stderr @@ -0,0 +1,7 @@ + +<no location info>: warning: + -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving + +SafeLang05.hs:14:11: warning: [GHC-56147] + Rule "lookupx/T" ignored + Defining user rules is disabled under Safe Haskell diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang09.compile-stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang09.compile-stderr new file mode 100644 index 0000000000..594a2e275c --- /dev/null +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang09.compile-stderr @@ -0,0 +1,3 @@ + +SafeLang09_B.hs:2:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang11.compile-stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang11.compile-stderr new file mode 100644 index 0000000000..5b73f09b96 --- /dev/null +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang11.compile-stderr @@ -0,0 +1,3 @@ + +<no location info>: warning: + -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang15.compile-stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang15.compile-stderr new file mode 100644 index 0000000000..5b73f09b96 --- /dev/null +++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang15.compile-stderr @@ -0,0 +1,3 @@ + +<no location info>: warning: + -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving diff --git a/testsuite/tests/simplCore/T9646/T9646.compile-stderr b/testsuite/tests/simplCore/T9646/T9646.compile-stderr new file mode 100644 index 0000000000..cb512bd63b --- /dev/null +++ b/testsuite/tests/simplCore/T9646/T9646.compile-stderr @@ -0,0 +1,20 @@ + +StrictPrim.hs:21:5: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘Applicative (StrictPrim s)’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +StrictPrim.hs:35:5: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘return’ definition detected + in the instance declaration for ‘Monad (StrictPrim s)’. + ‘return’ will eventually be removed in favour of ‘pure’ + Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +StrictPrim.hs:38:5: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘(>>)’ definition detected + in the instance declaration for ‘Monad (StrictPrim s)’. + ‘(>>)’ will eventually be removed in favour of ‘(*>)’ + Either remove definition for ‘(>>)’ (recommended) or define as ‘(>>) = (*>)’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return diff --git a/testsuite/tests/simplCore/should_run/T13172.compile-stderr b/testsuite/tests/simplCore/should_run/T13172.compile-stderr new file mode 100644 index 0000000000..18757471e4 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T13172.compile-stderr @@ -0,0 +1,3 @@ + +T13172.hs:11:15: warning: [GHC-97441] [-Woverflowed-literals (in -Wdefault)] + Literal -1 is out of the Word range 0..18446744073709551615 diff --git a/testsuite/tests/simplCore/should_run/T17744.compile-stderr b/testsuite/tests/simplCore/should_run/T17744.compile-stderr new file mode 100644 index 0000000000..8860609d27 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T17744.compile-stderr @@ -0,0 +1,24 @@ + +T17744A.hs:19:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + either ‘<*>’ or ‘liftA2’ + • In the instance declaration for ‘Applicative (Parser t)’ + +T17744A.hs:20:4: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘Applicative (Parser t)’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +T17744A.hs:23:4: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘return’ definition detected + in the instance declaration for ‘Monad (Parser t)’. + ‘return’ will eventually be removed in favour of ‘pure’ + Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +T17744A.hs:29:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘empty’ and ‘<|>’ + • In the instance declaration for + ‘Alternative (Parser LeftBiasedLocal)’ diff --git a/testsuite/tests/simplCore/should_run/T3591.compile-stderr b/testsuite/tests/simplCore/should_run/T3591.compile-stderr new file mode 100644 index 0000000000..f74fb771cc --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T3591.compile-stderr @@ -0,0 +1,29 @@ + +T3591.hs:24:33: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T3591.hs:78:5: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘Applicative Identity’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +T3591.hs:82:5: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘return’ definition detected + in the instance declaration for ‘Monad Identity’. + ‘return’ will eventually be removed in favour of ‘pure’ + Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +T3591.hs:92:3: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘Applicative (Trampoline m s)’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +T3591.hs:96:4: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘return’ definition detected + in the instance declaration for ‘Monad (Trampoline m s)’. + ‘return’ will eventually be removed in favour of ‘pure’ + Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return diff --git a/testsuite/tests/simplCore/should_run/T5315.compile-stderr b/testsuite/tests/simplCore/should_run/T5315.compile-stderr new file mode 100644 index 0000000000..929da1fce5 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T5315.compile-stderr @@ -0,0 +1,16 @@ + +T5315.hs:48:1: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In an equation for ‘hHead’: hHead _ = ... + +T5315.hs:52:1: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In an equation for ‘hTail’: hTail _ = ... + +T5315.hs:78:3: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a case alternative: _ -> ... + +T5315.hs:87:3: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a case alternative: _ -> ... diff --git a/testsuite/tests/simplCore/should_run/simplrun005.compile-stderr b/testsuite/tests/simplCore/should_run/simplrun005.compile-stderr new file mode 100644 index 0000000000..eee9d8abe3 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/simplrun005.compile-stderr @@ -0,0 +1,5 @@ + +simplrun005.hs:29:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘abs’ and ‘signum’ + • In the instance declaration for ‘Num Nat’ diff --git a/testsuite/tests/th/T10697_source.compile-stderr b/testsuite/tests/th/T10697_source.compile-stderr new file mode 100644 index 0000000000..8d48c5a935 --- /dev/null +++ b/testsuite/tests/th/T10697_source.compile-stderr @@ -0,0 +1,15 @@ + +T10697_sourceUtil.hs:35:11: warning: + • UNPACK pragma lacks '!' on the first argument of ‘E9’ + • In the definition of data constructor ‘E9’ + In the data type declaration for ‘E9’ + +T10697_source.hs:15:2: warning: + • UNPACK pragma lacks '!' on the first argument of ‘A9’ + • In the definition of data constructor ‘A9’ + In the data type declaration for ‘A9’ + +T10697_source.hs:17:2: warning: + • UNPACK pragma lacks '!' on the first argument of ‘C9’ + • In the definition of data constructor ‘C9’ + In the data type declaration for ‘B9’ diff --git a/testsuite/tests/th/T12403.compile-stderr b/testsuite/tests/th/T12403.compile-stderr new file mode 100644 index 0000000000..7fad5788d6 --- /dev/null +++ b/testsuite/tests/th/T12403.compile-stderr @@ -0,0 +1,5 @@ +T12403.hs:9:2-12: Splicing declarations return [] ======> +T12403.hs:12:18-49: Splicing expression + reify ''T >>= stringE . pprint + ======> + "data Main.T = Main.T ((# , #) GHC.Types.Int GHC.Types.Int)" diff --git a/testsuite/tests/th/T21920.compile-stderr b/testsuite/tests/th/T21920.compile-stderr new file mode 100644 index 0000000000..b30811f915 --- /dev/null +++ b/testsuite/tests/th/T21920.compile-stderr @@ -0,0 +1,12 @@ + +T21920.hs:8:29: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] + • No instance for ‘Num Char’ arising from a use of ‘+’ + • In the second argument of ‘const’, namely ‘('a' + 'a')’ + In the expression: const [| True |] ('a' + 'a') + In the untyped splice: $(const [| True |] ('a' + 'a')) + +T21920.hs:11:32: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] + • No instance for ‘Num Char’ arising from a use of ‘+’ + • In the second argument of ‘const’, namely ‘('a' + 'a')’ + In the expression: const [|| True ||] ('a' + 'a') + In the Template Haskell splice $$(const [|| True ||] ('a' + 'a')) diff --git a/testsuite/tests/typecheck/should_run/Defer01.compile-stderr b/testsuite/tests/typecheck/should_run/Defer01.compile-stderr new file mode 100644 index 0000000000..780c377632 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/Defer01.compile-stderr @@ -0,0 +1,68 @@ + +Defer01.hs:11:40: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match type ‘Char’ with ‘[Char]’ + Expected: String + Actual: Char + • In the first argument of ‘putStr’, namely ‘','’ + In the second argument of ‘(>>)’, namely ‘putStr ','’ + In the expression: putStr "Hello World" >> putStr ',' + +Defer01.hs:14:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type ‘Int’ with actual type ‘Char’ + • In the expression: 'p' + In an equation for ‘a’: a = 'p' + +Defer01.hs:25:1: warning: [GHC-94210] [-Woverlapping-patterns (in -Wdefault)] + Pattern match has inaccessible right hand side + In an equation for ‘c’: c (C2 x) = ... + +Defer01.hs:25:4: warning: [GHC-40564] [-Winaccessible-code (in -Wdefault)] + • Inaccessible code in + a pattern with constructor: C2 :: Bool -> C Bool, + in an equation for ‘c’ + Couldn't match type ‘Int’ with ‘Bool’ + • In the pattern: C2 x + In an equation for ‘c’: c (C2 x) = True + +Defer01.hs:31:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’ + • The function ‘e’ is applied to one value argument, + but its type ‘Char’ has none + In the expression: e 'q' + In an equation for ‘f’: f = e 'q' + • Relevant bindings include f :: t (bound at Defer01.hs:31:1) + +Defer01.hs:34:8: warning: [GHC-25897] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type ‘Char’ with actual type ‘a’ + ‘a’ is a rigid type variable bound by + the type signature for: + h :: forall a. a -> (Char, Char) + at Defer01.hs:33:1-21 + • In the expression: x + In the expression: (x, 'c') + In an equation for ‘h’: h x = (x, 'c') + • Relevant bindings include + x :: a (bound at Defer01.hs:34:3) + h :: a -> (Char, Char) (bound at Defer01.hs:34:1) + +Defer01.hs:39:17: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type ‘Bool’ with actual type ‘T a’ + • In the first argument of ‘not’, namely ‘(K a)’ + In the first argument of ‘seq’, namely ‘(not (K a))’ + In the expression: seq (not (K a)) () + • Relevant bindings include + a :: a (bound at Defer01.hs:39:3) + i :: a -> () (bound at Defer01.hs:39:1) + +Defer01.hs:47:7: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type ‘Bool’ with actual type ‘Int’ + • In the expression: x + In an equation for ‘k’: k x = x + +Defer01.hs:50:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type: IO a0 + with actual type: Char -> IO () + • Probable cause: ‘putChar’ is applied to too few arguments + In the first argument of ‘(>>)’, namely ‘putChar’ + In the expression: putChar >> putChar 'p' + In an equation for ‘l’: l = putChar >> putChar 'p' diff --git a/testsuite/tests/typecheck/should_run/StrictPats.compile-stderr b/testsuite/tests/typecheck/should_run/StrictPats.compile-stderr new file mode 100644 index 0000000000..0b9fc593cc --- /dev/null +++ b/testsuite/tests/typecheck/should_run/StrictPats.compile-stderr @@ -0,0 +1,24 @@ + +StrictPats.hs:64:9: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding: !True = ... + +StrictPats.hs:68:9: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding: True = ... + +StrictPats.hs:72:9: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding: 3# = ... + +StrictPats.hs:76:9: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding: !3# = ... + +StrictPats.hs:88:9: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding: (# _ | #) = ... + +StrictPats.hs:96:9: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In a pattern binding: (# _x | #) = ... diff --git a/testsuite/tests/typecheck/should_run/T10846.compile-stderr b/testsuite/tests/typecheck/should_run/T10846.compile-stderr new file mode 100644 index 0000000000..65305de448 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T10846.compile-stderr @@ -0,0 +1,8 @@ + +T10846.hs:10:30: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)] + • Found type wildcard ‘_’ standing for ‘String’ + • In the type signature: f2 :: (?loc :: CallStack) => _ + +T10846.hs:13:27: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)] + • Found extra-constraints wildcard standing for ‘() :: Constraint’ + • In the type signature: f3 :: (?loc :: CallStack, _) => String diff --git a/testsuite/tests/typecheck/should_run/T11230.compile-stderr b/testsuite/tests/typecheck/should_run/T11230.compile-stderr new file mode 100644 index 0000000000..1f135135a5 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T11230.compile-stderr @@ -0,0 +1,15 @@ + +T11230.hs:15:24: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match type ‘Char’ with ‘Bool’ + Expected: Representational Char -> Representational Bool + Actual: Representational Char -> Representational Char + • In the expression: id + In an equation for ‘testRepresentational’: + testRepresentational = id + +T11230.hs:19:15: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match type ‘Char’ with ‘Bool’ + Expected: Phantom Char -> Phantom Bool + Actual: Phantom Char -> Phantom Char + • In the expression: id + In an equation for ‘testPhantom’: testPhantom = id diff --git a/testsuite/tests/typecheck/should_run/T13838.compile-stderr b/testsuite/tests/typecheck/should_run/T13838.compile-stderr new file mode 100644 index 0000000000..321b481597 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T13838.compile-stderr @@ -0,0 +1,12 @@ + +T13838.hs:6:1: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type: IO t0 + with actual type: () -> () + • When checking the type of the IO action ‘main’ + +T13838.hs:6:1: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type: IO t0 + with actual type: () -> () + • Probable cause: ‘main’ is applied to too few arguments + In the expression: main + When checking the type of the IO action ‘main’ diff --git a/testsuite/tests/typecheck/should_run/T14236.compile-stderr b/testsuite/tests/typecheck/should_run/T14236.compile-stderr new file mode 100644 index 0000000000..419f28bcea --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T14236.compile-stderr @@ -0,0 +1,15 @@ + +T14236.hs:8:7: warning: [GHC-58008] [-Wgadt-mono-local-binds (in -Wdefault)] + Pattern matching on GADTs without MonoLocalBinds is fragile. + Suggested fix: + Enable any of the following extensions: GADTs, TypeFamilies + +T14236.hs:11:7: warning: [GHC-58008] [-Wgadt-mono-local-binds (in -Wdefault)] + Pattern matching on GADTs without MonoLocalBinds is fragile. + Suggested fix: + Enable any of the following extensions: GADTs, TypeFamilies + +T14236.hs:14:7: warning: [GHC-58008] [-Wgadt-mono-local-binds (in -Wdefault)] + Pattern matching on GADTs without MonoLocalBinds is fragile. + Suggested fix: + Enable any of the following extensions: GADTs, TypeFamilies diff --git a/testsuite/tests/typecheck/should_run/T1735.compile-stderr b/testsuite/tests/typecheck/should_run/T1735.compile-stderr new file mode 100644 index 0000000000..2bd38b415f --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T1735.compile-stderr @@ -0,0 +1,28 @@ + +T1735.hs:5:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T1735_Help/Xml.hs:4:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T1735_Help/Instances.hs:2:36: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T1735_Help/Basics.hs:1:36: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T1735_Help/Context.hs:1:36: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T1735_Help/State.hs:10:5: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘return’ definition detected + in the instance declaration for ‘Monad (StateT s m)’. + ‘return’ will eventually be removed in favour of ‘pure’ + Either remove definition for ‘return’ (recommended) or define as ‘return = pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +T1735_Help/State.hs:22:5: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘Applicative (StateT s m)’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return diff --git a/testsuite/tests/typecheck/should_run/T2722.compile-stderr b/testsuite/tests/typecheck/should_run/T2722.compile-stderr new file mode 100644 index 0000000000..da2abcabd2 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T2722.compile-stderr @@ -0,0 +1,10 @@ + +T2722.hs:19:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + either ‘first’ or ‘***’ + • In the instance declaration for ‘Arrow IOSLA’ + +T2722.hs:22:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘.’ + • In the instance declaration for ‘Category IOSLA’ diff --git a/testsuite/tests/typecheck/should_run/T3731-short.compile-stderr b/testsuite/tests/typecheck/should_run/T3731-short.compile-stderr new file mode 100644 index 0000000000..cb4017aa50 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T3731-short.compile-stderr @@ -0,0 +1,31 @@ + +T3731-short.hs:4:15: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T3731-short.hs:33:10: warning: [-Wsimplifiable-class-constraints (in -Wdefault)] + • The constraint ‘Data Expression’ matches + instance (Data [Expression], Sat Expression) => Data Expression + -- Defined at T3731-short.hs:36:10 + This makes type inference for inner bindings fragile; + either use MonoLocalBinds, or simplify it using the instance + • In the instance declaration for ‘Data Proposition’ + +T3731-short.hs:36:10: warning: [-Wsimplifiable-class-constraints (in -Wdefault)] + • The constraint ‘Sat Expression’ matches + instance Default t => Sat t -- Defined at T3731-short.hs:24:10 + This makes type inference for inner bindings fragile; + either use MonoLocalBinds, or simplify it using the instance + • In the instance declaration for ‘Data Expression’ + +T3731-short.hs:36:10: warning: [-Wsimplifiable-class-constraints (in -Wdefault)] + • The constraint ‘Data [Expression]’ matches + instance (Sat [a], Data a) => Data [a] + -- Defined at T3731-short.hs:17:10 + This makes type inference for inner bindings fragile; + either use MonoLocalBinds, or simplify it using the instance + • In the instance declaration for ‘Data Expression’ + +T3731-short.hs:47:15: warning: [GHC-63397] [-Wname-shadowing (in -Wall)] + This binding for ‘exp’ shadows the existing binding + imported from ‘Prelude’ at T3731-short.hs:9:8-11 + (and originally defined in ‘GHC.Float’) diff --git a/testsuite/tests/typecheck/should_run/T4809.compile-stderr b/testsuite/tests/typecheck/should_run/T4809.compile-stderr new file mode 100644 index 0000000000..0711b70ec9 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T4809.compile-stderr @@ -0,0 +1,24 @@ + +T4809_XMLGenerator.hs:2:66: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T4809_XMLGenerator.hs:41:3: warning: [-Wnoncanonical-monad-instances (in -Wdefault)] + Noncanonical ‘pure = return’ definition detected + in the instance declaration for ‘Applicative (XMLGenT m)’. + Move definition from ‘return’ to ‘pure’ + See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return + +T4809_XMLGenerator.hs:44:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘empty’ and ‘<|>’ + • In the instance declaration for ‘Alternative (XMLGenT m)’ + +T4809_IdentityT.hs:24:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘pure’ and (either ‘<*>’ or ‘liftA2’) + • In the instance declaration for ‘Applicative (IdentityT m)’ + +T4809_IdentityT.hs:25:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘empty’ and ‘<|>’ + • In the instance declaration for ‘Alternative (IdentityT m)’ diff --git a/testsuite/tests/typecheck/should_run/T5751.compile-stderr b/testsuite/tests/typecheck/should_run/T5751.compile-stderr new file mode 100644 index 0000000000..09b0bc8366 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T5751.compile-stderr @@ -0,0 +1,12 @@ + +T5751.hs:1:79: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T5751.hs:31:8: warning: [-Wsimplifiable-class-constraints (in -Wdefault)] + • The constraint ‘Widgets m’ matches + instance (XMLGenerator m, MonadRender m) => Widgets m + -- Defined at T5751.hs:28:10 + This makes type inference for inner bindings fragile; + either use MonoLocalBinds, or simplify it using the instance + • In the type signature: + web :: (MonadIO m, Widgets m, XMLGenerator m) => m () diff --git a/testsuite/tests/typecheck/should_run/T5759.compile-stderr b/testsuite/tests/typecheck/should_run/T5759.compile-stderr new file mode 100644 index 0000000000..f4682ce6ac --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T5759.compile-stderr @@ -0,0 +1,8 @@ + +T5759.hs:1:56: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +T5759.hs:14:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘+’, ‘*’, ‘abs’, ‘signum’, and (either ‘negate’ or ‘-’) + • In the instance declaration for ‘Num a’ diff --git a/testsuite/tests/typecheck/should_run/T7023.compile-stderr b/testsuite/tests/typecheck/should_run/T7023.compile-stderr new file mode 100644 index 0000000000..a332d8682e --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T7023.compile-stderr @@ -0,0 +1,8 @@ + +T7023.hs:5:11: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match type ‘Int’ with ‘[Char]’ + Expected: String + Actual: Int + • In the expression: 1 :: Int + In the expression: ["x", 1 :: Int] + In an equation for ‘a’: a = ["x", 1 :: Int] diff --git a/testsuite/tests/typecheck/should_run/T9497a-run.compile-stderr b/testsuite/tests/typecheck/should_run/T9497a-run.compile-stderr new file mode 100644 index 0000000000..c339e62030 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T9497a-run.compile-stderr @@ -0,0 +1,17 @@ + +T9497a-run.hs:2:8: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] + • Found hole: _main :: IO () + Or perhaps ‘_main’ is mis-spelled, or not in scope + • In an equation for ‘main’: main = _main + • Relevant bindings include + main :: IO () (bound at T9497a-run.hs:2:1) + Valid hole fits include + main :: IO () (bound at T9497a-run.hs:2:1) + readLn :: forall a. Read a => IO a + with readLn @() + (imported from ‘Prelude’ at T9497a-run.hs:1:1 + (and originally defined in ‘System.IO’)) + mempty :: forall a. Monoid a => a + with mempty @(IO ()) + (imported from ‘Prelude’ at T9497a-run.hs:1:1 + (and originally defined in ‘GHC.Base’)) diff --git a/testsuite/tests/typecheck/should_run/church.compile-stderr b/testsuite/tests/typecheck/should_run/church.compile-stderr new file mode 100644 index 0000000000..04bdaadbd2 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/church.compile-stderr @@ -0,0 +1,5 @@ + +church.hs:17:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘abs’ and ‘signum’ + • In the instance declaration for ‘Num Ch’ diff --git a/testsuite/tests/typecheck/should_run/tcrun006.compile-stderr b/testsuite/tests/typecheck/should_run/tcrun006.compile-stderr new file mode 100644 index 0000000000..50a39f086e --- /dev/null +++ b/testsuite/tests/typecheck/should_run/tcrun006.compile-stderr @@ -0,0 +1,3 @@ + +tcrun006.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/typecheck/should_run/tcrun028.compile-stderr b/testsuite/tests/typecheck/should_run/tcrun028.compile-stderr new file mode 100644 index 0000000000..35575c0586 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/tcrun028.compile-stderr @@ -0,0 +1,16 @@ + +tcrun028.hs:36:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘ccat’ + • In the instance declaration for ‘ConcatPS Id a a’ + +tcrun028.hs:37:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘ccat’ + • In the instance declaration for ‘ConcatPS (Pop t a) b (Pop t c)’ + +tcrun028.hs:38:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] + • No explicit implementation for + ‘ccat’ + • In the instance declaration for + ‘ConcatPS (Push t a) b (Push t c)’ diff --git a/testsuite/tests/typecheck/should_run/tcrun029.compile-stderr b/testsuite/tests/typecheck/should_run/tcrun029.compile-stderr new file mode 100644 index 0000000000..264d23c885 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/tcrun029.compile-stderr @@ -0,0 +1,3 @@ + +tcrun029.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/typecheck/should_run/testeq2.compile-stderr b/testsuite/tests/typecheck/should_run/testeq2.compile-stderr new file mode 100644 index 0000000000..b217ddaf8e --- /dev/null +++ b/testsuite/tests/typecheck/should_run/testeq2.compile-stderr @@ -0,0 +1,21 @@ + +testeq2.hs:4:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +testeq2.hs:29:11: warning: [-Wsimplifiable-class-constraints (in -Wdefault)] + • The constraint ‘TypeEq t t' b’ matches + instance forall k1 k2 k3 (x :: k1) (y :: k2) (b :: k3). + TypeEq' () x y b => + TypeEq x y b + -- Defined at testeq2.hs:51:10 + This makes type inference for inner bindings fragile; + either use MonoLocalBinds, or simplify it using the instance + • In the type signature: typeEq :: TypeEq t t' b => t -> t' -> b + +testeq2.hs:56:10: warning: [-Wsimplifiable-class-constraints (in -Wdefault)] + • The constraint ‘TypeCast b HTrue’ matches + instance TypeCast' () a b => TypeCast a b + -- Defined at testeq2.hs:39:10 + This makes type inference for inner bindings fragile; + either use MonoLocalBinds, or simplify it using the instance + • In the instance declaration for ‘TypeEq' () x x b’ diff --git a/testsuite/tests/typecheck/testeq1/typecheck.testeq1.compile-stderr b/testsuite/tests/typecheck/testeq1/typecheck.testeq1.compile-stderr new file mode 100644 index 0000000000..975a6ea5ef --- /dev/null +++ b/testsuite/tests/typecheck/testeq1/typecheck.testeq1.compile-stderr @@ -0,0 +1,9 @@ + +Main.hs:2:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +FakePrelude.hs:2:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS + +TypeEq.hs:3:33: warning: [-Wdeprecated-flags (in -Wdefault)] + -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS diff --git a/testsuite/tests/unboxedsums/unboxedsums3.compile-stderr b/testsuite/tests/unboxedsums/unboxedsums3.compile-stderr new file mode 100644 index 0000000000..dba67e72c0 --- /dev/null +++ b/testsuite/tests/unboxedsums/unboxedsums3.compile-stderr @@ -0,0 +1,10 @@ + +unboxedsums3.hs:11:16: warning: [GHC-68441] [-Wdeprecations (in -Wdefault)] + In the use of type constructor or class ‘Void#’ + (imported from GHC.Types): + Deprecated: "Void# is now an alias for the unboxed tuple (# #)." + +unboxedsums3.hs:19:23: warning: [GHC-68441] [-Wdeprecations (in -Wdefault)] + In the use of type constructor or class ‘Void#’ + (imported from GHC.Types): + Deprecated: "Void# is now an alias for the unboxed tuple (# #)." diff --git a/testsuite/tests/unboxedsums/unpack_sums_8.compile-stderr b/testsuite/tests/unboxedsums/unpack_sums_8.compile-stderr new file mode 100644 index 0000000000..6847f9951f --- /dev/null +++ b/testsuite/tests/unboxedsums/unpack_sums_8.compile-stderr @@ -0,0 +1,5 @@ + +unpack_sums_8.hs:25:16: warning: + • UNPACK pragma lacks '!' on the first argument of ‘BoxVoid’ + • In the definition of data constructor ‘BoxVoid’ + In the data type declaration for ‘BoxVoid’ |