summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorJosh Meredith <joshmeredith2008@gmail.com>2019-12-04 23:39:28 +1100
committerJosh Meredith <joshmeredith2008@gmail.com>2019-12-04 23:39:28 +1100
commita8435165b84c32fd2ebdd1281dd6ee077e07ad5a (patch)
tree791936d014aeaa26174c2dcbef34c14f3329dd04 /testsuite/tests
parent7805441b4d5e22eb63a501e1e40383d10380dc92 (diff)
parentf03a41d4bf9418ee028ecb51654c928b2da74edd (diff)
downloadhaskell-wip/binary-readerT.tar.gz
Merge branch 'master' into wip/binary-readerTwip/binary-readerT
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/annotations/should_compile/th/annth_compunits.stdout2
-rw-r--r--testsuite/tests/annotations/should_compile/th/annth_make.stdout2
-rw-r--r--testsuite/tests/annotations/should_run/annrun01.stdout2
-rw-r--r--testsuite/tests/arrows/should_compile/T5333.hs2
-rw-r--r--testsuite/tests/codeGen/should_run/all.T1
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun079.hs98
-rw-r--r--testsuite/tests/concurrent/prog001/Arithmetic.hs2
-rw-r--r--testsuite/tests/cps/cps021.cmm2
-rw-r--r--testsuite/tests/deSugar/should_compile/T12944.hs2
-rw-r--r--testsuite/tests/deriving/should_fail/T7148a.hs4
-rw-r--r--testsuite/tests/gadt/T9096.hs6
-rw-r--r--testsuite/tests/gadt/all.T1
-rw-r--r--testsuite/tests/ghc-api/T6145.hs10
-rw-r--r--testsuite/tests/ghc-api/annotations/Makefile4
-rw-r--r--testsuite/tests/ghc-api/annotations/T10268.stdout2
-rw-r--r--testsuite/tests/ghc-api/annotations/T10276.stdout10
-rw-r--r--testsuite/tests/ghc-api/annotations/T10358.stdout4
-rw-r--r--testsuite/tests/ghc-api/annotations/T10399.stdout7
-rw-r--r--testsuite/tests/ghc-api/annotations/T17519.stdout25
-rw-r--r--testsuite/tests/ghc-api/annotations/Test17519.hs6
-rw-r--r--testsuite/tests/ghc-api/annotations/all.T2
-rw-r--r--testsuite/tests/ghc-api/annotations/stringSource.hs10
-rw-r--r--testsuite/tests/ghc-api/annotations/t11430.hs2
-rw-r--r--testsuite/tests/ghci/linking/dyn/Makefile2
-rw-r--r--testsuite/tests/module/mod183.stderr2
-rw-r--r--testsuite/tests/module/mod69.stderr4
-rw-r--r--testsuite/tests/module/mod70.stderr4
-rw-r--r--testsuite/tests/numeric/should_compile/T16402.hs19
-rw-r--r--testsuite/tests/numeric/should_compile/T16402.stderr36
-rw-r--r--testsuite/tests/numeric/should_compile/all.T1
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/T11103.stderr8
-rw-r--r--testsuite/tests/parser/should_compile/Proposal229f_instances.hs25
-rw-r--r--testsuite/tests/parser/should_compile/T1087.hs14
-rw-r--r--testsuite/tests/parser/should_compile/T16619.stderr3
-rw-r--r--testsuite/tests/parser/should_compile/all.T17
-rw-r--r--testsuite/tests/parser/should_compile/proposal-229a.hs8
-rw-r--r--testsuite/tests/parser/should_compile/proposal-229b.hs10
-rw-r--r--testsuite/tests/parser/should_compile/proposal-229d.hs6
-rw-r--r--testsuite/tests/parser/should_compile/proposal-229e.hs18
-rw-r--r--testsuite/tests/parser/should_compile/proposal-229f.hs13
-rw-r--r--testsuite/tests/parser/should_compile/proposal-229f.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/T14588.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/T16270.stderr18
-rw-r--r--testsuite/tests/parser/should_fail/T17162.hs13
-rw-r--r--testsuite/tests/parser/should_fail/T17162.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/T3811b.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/T3811c.stderr9
-rw-r--r--testsuite/tests/parser/should_fail/T3811f.stderr6
-rw-r--r--testsuite/tests/parser/should_fail/all.T2
-rw-r--r--testsuite/tests/parser/should_fail/proposal-229c.hs6
-rw-r--r--testsuite/tests/parser/should_fail/proposal-229c.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/strictnessDataCon_A.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr30
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T12033.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr2
-rw-r--r--testsuite/tests/perf/should_run/T8763.hs6
-rw-r--r--testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs2
-rw-r--r--testsuite/tests/plugins/plugins10.stdout2
-rw-r--r--testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs2
-rw-r--r--testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs1
-rw-r--r--testsuite/tests/pmcheck/should_compile/CyclicSubst.hs2
-rw-r--r--testsuite/tests/pmcheck/should_compile/pmc009.hs4
-rw-r--r--testsuite/tests/pmcheck/should_compile/pmc009.stderr2
-rw-r--r--testsuite/tests/printer/Ppr047.hs1
-rw-r--r--testsuite/tests/printer/T13199.stdout32
-rw-r--r--testsuite/tests/printer/T13550.stdout4
-rw-r--r--testsuite/tests/printer/T13942.stdout4
-rw-r--r--testsuite/tests/printer/T14289.stdout4
-rw-r--r--testsuite/tests/printer/T14289b.stdout4
-rw-r--r--testsuite/tests/printer/T14289c.stdout4
-rw-r--r--testsuite/tests/printer/all.T2
-rw-r--r--testsuite/tests/programs/Makefile-OLD2
-rw-r--r--testsuite/tests/programs/andy_cherry/DataTypes.hs2
-rw-r--r--testsuite/tests/programs/andy_cherry/Interp.hs2
-rw-r--r--testsuite/tests/programs/seward-space-leak/Main.lhs4
-rw-r--r--testsuite/tests/rename/should_fail/T12879.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail016.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail016a.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail051.stderr2
-rw-r--r--testsuite/tests/roles/should_compile/T16718.stderr2
-rw-r--r--testsuite/tests/runghc/T17171a.stderr4
-rw-r--r--testsuite/tests/runghc/all.T7
-rw-r--r--testsuite/tests/safeHaskell/check/Check06.hs2
-rw-r--r--testsuite/tests/safeHaskell/check/Check06_A.hs2
-rw-r--r--testsuite/tests/safeHaskell/check/Check07_A.hs2
-rw-r--r--testsuite/tests/safeHaskell/check/Check07_B.hs2
-rw-r--r--testsuite/tests/safeHaskell/check/Check08_A.hs2
-rw-r--r--testsuite/tests/safeHaskell/check/Check08_B.hs2
-rw-r--r--testsuite/tests/safeHaskell/check/all.T2
-rw-r--r--testsuite/tests/safeHaskell/check/pkg01/M_SafePkg5.hs2
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags21.hs2
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags22.hs2
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags23.hs2
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags24.hs2
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags25.hs2
-rw-r--r--testsuite/tests/safeHaskell/flags/SafeFlags26.hs2
-rw-r--r--testsuite/tests/safeHaskell/safeInfered/all.T4
-rw-r--r--testsuite/tests/saks/should_compile/T17164.stderr2
-rw-r--r--testsuite/tests/saks/should_compile/saks027.stderr2
-rw-r--r--testsuite/tests/th/ClosedFam1TH.stderr2
-rw-r--r--testsuite/tests/th/T10279.stderr2
-rw-r--r--testsuite/tests/th/T10598_TH.stderr16
-rw-r--r--testsuite/tests/th/T10603.stderr2
-rw-r--r--testsuite/tests/th/T10638.stderr8
-rw-r--r--testsuite/tests/th/T10796b.stderr2
-rw-r--r--testsuite/tests/th/T10810.stderr2
-rw-r--r--testsuite/tests/th/T10828a.stderr2
-rw-r--r--testsuite/tests/th/T10828b.stderr2
-rw-r--r--testsuite/tests/th/T11452.stderr2
-rw-r--r--testsuite/tests/th/T12045TH1.stderr8
-rw-r--r--testsuite/tests/th/T12387.stderr2
-rw-r--r--testsuite/tests/th/T12411.stderr10
-rw-r--r--testsuite/tests/th/T12478_4.stderr2
-rw-r--r--testsuite/tests/th/T12530.stderr2
-rw-r--r--testsuite/tests/th/T13776.stderr14
-rw-r--r--testsuite/tests/th/T13837.stderr2
-rw-r--r--testsuite/tests/th/T13856.stderr2
-rw-r--r--testsuite/tests/th/T13968.stderr2
-rw-r--r--testsuite/tests/th/T14204.stderr2
-rw-r--r--testsuite/tests/th/T14646.stderr2
-rw-r--r--testsuite/tests/th/T14681.stderr4
-rw-r--r--testsuite/tests/th/T14817.stderr2
-rw-r--r--testsuite/tests/th/T14869.stderr10
-rw-r--r--testsuite/tests/th/T14875.stderr2
-rw-r--r--testsuite/tests/th/T14888.stderr6
-rw-r--r--testsuite/tests/th/T15243.stderr14
-rw-r--r--testsuite/tests/th/T15270A.stderr6
-rw-r--r--testsuite/tests/th/T15270B.stderr6
-rw-r--r--testsuite/tests/th/T15324.stderr2
-rw-r--r--testsuite/tests/th/T15331.stderr2
-rw-r--r--testsuite/tests/th/T15360b.stderr8
-rw-r--r--testsuite/tests/th/T15365.stderr2
-rw-r--r--testsuite/tests/th/T15481.stderr2
-rw-r--r--testsuite/tests/th/T15502.stderr-ws-324
-rw-r--r--testsuite/tests/th/T15502.stderr-ws-644
-rw-r--r--testsuite/tests/th/T15518.stderr2
-rw-r--r--testsuite/tests/th/T15550.stderr2
-rw-r--r--testsuite/tests/th/T15572.stderr8
-rw-r--r--testsuite/tests/th/T15738.stderr2
-rw-r--r--testsuite/tests/th/T16133.stderr4
-rw-r--r--testsuite/tests/th/T16183.stderr2
-rw-r--r--testsuite/tests/th/T16326_TH.stderr2
-rw-r--r--testsuite/tests/th/T16666.stderr2
-rw-r--r--testsuite/tests/th/T16895a.stderr2
-rw-r--r--testsuite/tests/th/T16895b.stderr6
-rw-r--r--testsuite/tests/th/T16895c.stderr6
-rw-r--r--testsuite/tests/th/T16895d.stderr6
-rw-r--r--testsuite/tests/th/T16895e.stderr6
-rw-r--r--testsuite/tests/th/T17270.hs15
-rw-r--r--testsuite/tests/th/T17379a.stderr2
-rw-r--r--testsuite/tests/th/T17379b.stderr2
-rw-r--r--testsuite/tests/th/T17380.stderr4
-rw-r--r--testsuite/tests/th/T17394.stderr4
-rw-r--r--testsuite/tests/th/T17461.stderr2
-rw-r--r--testsuite/tests/th/T2597b.stderr8
-rw-r--r--testsuite/tests/th/T2674.stderr2
-rw-r--r--testsuite/tests/th/T3177a.stderr2
-rw-r--r--testsuite/tests/th/T3319.stderr2
-rw-r--r--testsuite/tests/th/T3395.stderr20
-rw-r--r--testsuite/tests/th/T3600.stderr2
-rw-r--r--testsuite/tests/th/T3899.stderr2
-rw-r--r--testsuite/tests/th/T4436.stderr4
-rw-r--r--testsuite/tests/th/T5217.stderr2
-rw-r--r--testsuite/tests/th/T5290.stderr10
-rw-r--r--testsuite/tests/th/T5358.stderr4
-rw-r--r--testsuite/tests/th/T5508.stderr2
-rw-r--r--testsuite/tests/th/T5700.stderr2
-rw-r--r--testsuite/tests/th/T5795.stderr10
-rw-r--r--testsuite/tests/th/T5883.stderr2
-rw-r--r--testsuite/tests/th/T5971.stderr12
-rw-r--r--testsuite/tests/th/T5976.stderr2
-rw-r--r--testsuite/tests/th/T5984.stderr11
-rw-r--r--testsuite/tests/th/T6018th.stderr6
-rw-r--r--testsuite/tests/th/T7241.stderr6
-rw-r--r--testsuite/tests/th/T7477.stderr2
-rw-r--r--testsuite/tests/th/T7484.stderr2
-rw-r--r--testsuite/tests/th/T7532.stderr2
-rw-r--r--testsuite/tests/th/T7667a.stderr8
-rw-r--r--testsuite/tests/th/T8412.stderr6
-rw-r--r--testsuite/tests/th/T8577.stderr12
-rw-r--r--testsuite/tests/th/T8624.stdout2
-rw-r--r--testsuite/tests/th/T8759.stderr2
-rw-r--r--testsuite/tests/th/T8932.stderr2
-rw-r--r--testsuite/tests/th/T8987.stderr2
-rw-r--r--testsuite/tests/th/TH_1tuple.stderr2
-rw-r--r--testsuite/tests/th/TH_Promoted1Tuple.stderr2
-rw-r--r--testsuite/tests/th/TH_PromotedList.stderr2
-rw-r--r--testsuite/tests/th/TH_PromotedTuple.stderr6
-rw-r--r--testsuite/tests/th/TH_RichKinds.stderr6
-rw-r--r--testsuite/tests/th/TH_RichKinds2.stderr2
-rw-r--r--testsuite/tests/th/TH_Roles1.stderr8
-rw-r--r--testsuite/tests/th/TH_StaticPointers02.stderr22
-rw-r--r--testsuite/tests/th/TH_TyInstWhere1.stderr6
-rw-r--r--testsuite/tests/th/TH_TyInstWhere2.stderr4
-rw-r--r--testsuite/tests/th/TH_dupdecl.stderr6
-rw-r--r--testsuite/tests/th/TH_exn1.stderr4
-rw-r--r--testsuite/tests/th/TH_exn2.stderr4
-rw-r--r--testsuite/tests/th/TH_fail.stderr2
-rw-r--r--testsuite/tests/th/TH_foreignCallingConventions.stderr12
-rw-r--r--testsuite/tests/th/TH_foreignInterruptible.stderr7
-rw-r--r--testsuite/tests/th/TH_genEx.stderr4
-rw-r--r--testsuite/tests/th/TH_implicitParamsErr1.stderr2
-rw-r--r--testsuite/tests/th/TH_implicitParamsErr2.stderr2
-rw-r--r--testsuite/tests/th/TH_implicitParamsErr3.stderr2
-rw-r--r--testsuite/tests/th/TH_invalid_add_top_decl.stderr2
-rw-r--r--testsuite/tests/th/TH_pragma.stderr4
-rw-r--r--testsuite/tests/th/TH_recover_warns.stderr4
-rw-r--r--testsuite/tests/th/TH_repUnboxedTuples.stderr8
-rw-r--r--testsuite/tests/th/TH_runIO.stderr10
-rw-r--r--testsuite/tests/th/TH_spliceD1.stderr10
-rw-r--r--testsuite/tests/th/TH_unresolvedInfix2.stderr20
-rw-r--r--testsuite/tests/th/all.T2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc163.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/T14761b.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T15527.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T7210.stderr10
-rw-r--r--testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs2
218 files changed, 784 insertions, 451 deletions
diff --git a/testsuite/tests/annotations/should_compile/th/annth_compunits.stdout b/testsuite/tests/annotations/should_compile/th/annth_compunits.stdout
index 51fa405556..33199d9331 100644
--- a/testsuite/tests/annotations/should_compile/th/annth_compunits.stdout
+++ b/testsuite/tests/annotations/should_compile/th/annth_compunits.stdout
@@ -1,4 +1,4 @@
-["TH module annotation","addTopDecls module annotation","Module annotation"]
+["addTopDecls module annotation","TH module annotation","Module annotation"]
["Value annotation"]
["TH Value annotation","addTopDecls value annotation"]
["Type annotation"]
diff --git a/testsuite/tests/annotations/should_compile/th/annth_make.stdout b/testsuite/tests/annotations/should_compile/th/annth_make.stdout
index 51fa405556..33199d9331 100644
--- a/testsuite/tests/annotations/should_compile/th/annth_make.stdout
+++ b/testsuite/tests/annotations/should_compile/th/annth_make.stdout
@@ -1,4 +1,4 @@
-["TH module annotation","addTopDecls module annotation","Module annotation"]
+["addTopDecls module annotation","TH module annotation","Module annotation"]
["Value annotation"]
["TH Value annotation","addTopDecls value annotation"]
["Type annotation"]
diff --git a/testsuite/tests/annotations/should_run/annrun01.stdout b/testsuite/tests/annotations/should_run/annrun01.stdout
index b57394b563..46df141776 100644
--- a/testsuite/tests/annotations/should_run/annrun01.stdout
+++ b/testsuite/tests/annotations/should_run/annrun01.stdout
@@ -4,7 +4,7 @@ Loading Targets
Finding Module
Getting Module Info
Showing Details For Module
-([10],[],["Rock!!!!","Annotations","Module"],[])
+([10],[],["Module","Annotations","Rock!!!!"],[])
Showing Details For Exports
([],[Just True],["Type Annotation"],[Annrun01_Help.Baz])
([],[],[],[])
diff --git a/testsuite/tests/arrows/should_compile/T5333.hs b/testsuite/tests/arrows/should_compile/T5333.hs
index 808b8a207b..e865b52f12 100644
--- a/testsuite/tests/arrows/should_compile/T5333.hs
+++ b/testsuite/tests/arrows/should_compile/T5333.hs
@@ -7,7 +7,7 @@ import Control.Arrow
cc1 :: a e b -> a e b -> a e b
cc1 = undefined
--- With GHC < 7.10.1, the following compile failures occured:
+-- With GHC < 7.10.1, the following compile failures occurred:
--
-- ghc: panic! (the 'impossible' happened)
-- (GHC version 7.8.4 for x86_64-unknown-linux):
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index f96820de81..01516136c2 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -88,6 +88,7 @@ test('cgrun075', normal, compile_and_run, [''])
test('cgrun076', normal, compile_and_run, [''])
test('cgrun077', [when(have_cpu_feature('bmi2'), extra_hc_opts('-mbmi2'))], compile_and_run, [''])
test('cgrun078', omit_ways(['ghci']), compile_and_run, [''])
+test('cgrun079', normal, compile_and_run, [''])
test('T1852', normal, compile_and_run, [''])
test('T1861', extra_run_opts('0'), compile_and_run, [''])
diff --git a/testsuite/tests/codeGen/should_run/cgrun079.hs b/testsuite/tests/codeGen/should_run/cgrun079.hs
new file mode 100644
index 0000000000..e299c860c3
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/cgrun079.hs
@@ -0,0 +1,98 @@
+{-# LANGUAGE CPP, MagicHash, BlockArguments, UnboxedTuples #-}
+
+-- Tests for the timesInt2# primop
+module Main ( main ) where
+
+import Data.Bits
+import GHC.Int
+import GHC.Prim
+import GHC.Word
+import Control.Monad
+
+#include "MachDeps.h"
+
+
+imul2 :: Int -> Int -> (Int,Int,Int)
+imul2 (I# x) (I# y) = case timesInt2# x y of
+ (# c, h, l #) -> (I# c, I# h, I# l)
+
+checkImul2 :: Int -> Int -> IO ()
+checkImul2 x y = do
+ -- First we compare against Integer result. Note that this test will become
+ -- moot when Integer implementation will use this primitive
+ let
+ w2 = fromIntegral x * (fromIntegral y :: Integer)
+ (c,h,l) = imul2 x y
+ w = case c of
+ 0 -> fromIntegral l
+ _ -> int2ToInteger h l
+
+ unless (w == w2) do
+ putStrLn $ mconcat
+ [ "Failed: "
+ , show x
+ , " * "
+ , show y
+ , "\n Got: "
+ , show w
+ , "\n Expected: "
+ , show w2
+ ]
+
+ -- Now we compare with a generic version using unsigned multiply.
+ -- This reimplements the fallback generic version that the compiler uses when
+ -- the mach-op isn't available so it'd better be correct too.
+ let (c',h',l') = genericIMul2 x y
+
+ unless ((c,h,l) == (c',h',l')) do
+ putStrLn $ mconcat
+ [ "Failed: "
+ , show x
+ , " * "
+ , show y
+ , "\n Got: "
+ , show (c,h,l)
+ , "\n Expected: "
+ , show (c',h',l')
+ ]
+
+addWordC :: Word -> Word -> (Word,Word)
+addWordC (W# x) (W# y) = case addWordC# x y of
+ (# l,c #) -> (W# (int2Word# c), W# l)
+
+int2ToInteger :: Int -> Int -> Integer
+int2ToInteger h l
+ | h < 0 = case addWordC (complement (fromIntegral l)) 1 of
+ (c,w) -> -1 * word2ToInteger (c + complement (fromIntegral h)) w
+ | otherwise = word2ToInteger (fromIntegral h) (fromIntegral l)
+ where
+ word2ToInteger :: Word -> Word -> Integer
+ word2ToInteger x y = (fromIntegral x) `shiftL` WORD_SIZE_IN_BITS + fromIntegral y
+
+timesWord2 :: Word -> Word -> (Int,Int)
+timesWord2 (W# x) (W# y) = case timesWord2# x y of
+ (# h, l #) -> (I# (word2Int# h), I# (word2Int# l))
+
+genericIMul2 :: Int -> Int -> (Int,Int,Int)
+genericIMul2 x y = (c,h,l)
+ where
+ (p,l) = timesWord2 (fromIntegral x) (fromIntegral y)
+ h = p - f x y - f y x
+ c = if h == carryFill l then 0 else 1
+ f u v = carryFill u .&. v
+
+ -- Return either 00..00 or FF..FF depending on the carry
+ carryFill :: Int -> Int
+ carryFill x = x `shiftR` (WORD_SIZE_IN_BITS - 1)
+
+
+main = do
+ checkImul2 10 10
+ checkImul2 10 (-10)
+ checkImul2 minBound (-1)
+ checkImul2 maxBound (-1)
+ checkImul2 minBound 0
+ checkImul2 maxBound 0
+ checkImul2 minBound minBound
+ checkImul2 minBound maxBound
+ checkImul2 maxBound maxBound
diff --git a/testsuite/tests/concurrent/prog001/Arithmetic.hs b/testsuite/tests/concurrent/prog001/Arithmetic.hs
index a1253969b0..bce3ff6400 100644
--- a/testsuite/tests/concurrent/prog001/Arithmetic.hs
+++ b/testsuite/tests/concurrent/prog001/Arithmetic.hs
@@ -32,7 +32,7 @@ plusOne (0:xs) = 1:fl xs
--- Substraction by 1, the input must be in (0,1)
+-- Subtraction by 1, the input must be in (0,1)
minusOne :: Gray -> Gray
minusOne (1:xs) = 0:fl xs
diff --git a/testsuite/tests/cps/cps021.cmm b/testsuite/tests/cps/cps021.cmm
index fa7e809ee0..db67d97da2 100644
--- a/testsuite/tests/cps/cps021.cmm
+++ b/testsuite/tests/cps/cps021.cmm
@@ -1,4 +1,4 @@
-// Verify jumping to the begining of the current continuation
+// Verify jumping to the beginning of the current continuation
// is done with a branch and not a jump
foo() {
diff --git a/testsuite/tests/deSugar/should_compile/T12944.hs b/testsuite/tests/deSugar/should_compile/T12944.hs
index 076812d6e7..540ea06e81 100644
--- a/testsuite/tests/deSugar/should_compile/T12944.hs
+++ b/testsuite/tests/deSugar/should_compile/T12944.hs
@@ -31,7 +31,7 @@ instance (AdditiveGroup (poly a), Num a) => AdditiveGroup (IntOfLog poly a) wher
IntOfLog k p ^+^ IntOfLog k' p' = IntOfLog (k + k') (p ^+^ p')
negateV (IntOfLog k p) = IntOfLog (negate k) (negateV p)
{-# SPECIALISE instance Num a => AdditiveGroup (IntOfLog Poly1 a) #-}
- -- This pragmas casued the crash
+ -- This pragmas caused the crash
instance (VectorSpace (poly a), Scalar (poly a) ~ a, Num a) => VectorSpace (IntOfLog poly a) where
type Scalar (IntOfLog poly a) = a
diff --git a/testsuite/tests/deriving/should_fail/T7148a.hs b/testsuite/tests/deriving/should_fail/T7148a.hs
index 6441058b24..fd4a8fcda6 100644
--- a/testsuite/tests/deriving/should_fail/T7148a.hs
+++ b/testsuite/tests/deriving/should_fail/T7148a.hs
@@ -19,7 +19,7 @@ instance Convert (SAFE a) where
newtype IS_NO_LONGER a = IS_NO_LONGER a deriving Convert
type instance Result (IS_NO_LONGER a) b = b
---infered type is
+--inferred type is
unsafeCoerce :: forall a b. a -> b
unsafeCoerce = coerce (Proxy :: Proxy b) . IS_NO_LONGER . SAFE
@@ -34,4 +34,4 @@ crash = unsafeCoerce . tail . tail . tail . unsafeCoerce $ True
--time for side effects
unsafePerformIO :: IO a -> a
-unsafePerformIO x = runST $ unsafeCoerce x \ No newline at end of file
+unsafePerformIO x = runST $ unsafeCoerce x
diff --git a/testsuite/tests/gadt/T9096.hs b/testsuite/tests/gadt/T9096.hs
deleted file mode 100644
index d778798d36..0000000000
--- a/testsuite/tests/gadt/T9096.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-{-# LANGUAGE GADTs #-}
-
-module T9096 where
-
-data Foo a where
- MkFoo :: (->) a (Foo a)
diff --git a/testsuite/tests/gadt/all.T b/testsuite/tests/gadt/all.T
index be7177445e..29bde94100 100644
--- a/testsuite/tests/gadt/all.T
+++ b/testsuite/tests/gadt/all.T
@@ -110,7 +110,6 @@ test('T7294', normal, compile, [''])
test('T7321', [], makefile_test, [])
test('T7974', normal, compile, [''])
test('T7558', normal, compile_fail, [''])
-test('T9096', normal, compile, [''])
test('T9380', normal, compile_and_run, [''])
test('T12087', normal, compile_fail, [''])
test('T12468', normal, compile_fail, [''])
diff --git a/testsuite/tests/ghc-api/T6145.hs b/testsuite/tests/ghc-api/T6145.hs
index 184070c630..3a0d4ff0fb 100644
--- a/testsuite/tests/ghc-api/T6145.hs
+++ b/testsuite/tests/ghc-api/T6145.hs
@@ -35,12 +35,12 @@ main = do
removeFile "Test.hs"
print ok
where
- isDataCon (dL->L _ (AbsBinds { abs_binds = bs }))
+ isDataCon (L _ (AbsBinds { abs_binds = bs }))
= not (isEmptyBag (filterBag isDataCon bs))
- isDataCon (dL->L l (f@FunBind {}))
- | (MG _ (dL->L _ (m:_)) _) <- fun_matches f,
- ((dL->L _ (c@ConPatOut{})):_)<-hsLMatchPats m,
- (dL->L l _)<-pat_con c
+ isDataCon (L l (f@FunBind {}))
+ | (MG _ (L _ (m:_)) _) <- fun_matches f,
+ ((L _ (c@ConPatOut{})):_)<-hsLMatchPats m,
+ (L l _)<-pat_con c
= isGoodSrcSpan l -- Check that the source location is a good one
isDataCon _
= False
diff --git a/testsuite/tests/ghc-api/annotations/Makefile b/testsuite/tests/ghc-api/annotations/Makefile
index 3972e3d239..5f0fea1cc7 100644
--- a/testsuite/tests/ghc-api/annotations/Makefile
+++ b/testsuite/tests/ghc-api/annotations/Makefile
@@ -169,3 +169,7 @@ T16279:
.PHONY: T17388
T17388:
$(CHECK_API_ANNOTATIONS) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test17388.hs
+
+.PHONY: T17519
+T17519:
+ $(CHECK_API_ANNOTATIONS) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test17519.hs
diff --git a/testsuite/tests/ghc-api/annotations/T10268.stdout b/testsuite/tests/ghc-api/annotations/T10268.stdout
index 3739b7b0b7..502d5fcf47 100644
--- a/testsuite/tests/ghc-api/annotations/T10268.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10268.stdout
@@ -14,7 +14,7 @@
((Test10268.hs:5:1-17,AnnEqual), [Test10268.hs:5:4]),
((Test10268.hs:5:1-17,AnnFunId), [Test10268.hs:5:1-2]),
((Test10268.hs:5:1-17,AnnSemi), [Test10268.hs:7:1]),
-((Test10268.hs:5:6-17,AnnThIdSplice), [Test10268.hs:5:6-17]),
+((Test10268.hs:5:6-17,AnnDollar), [Test10268.hs:5:6]),
((Test10268.hs:7:1-27,AnnDcolon), [Test10268.hs:7:6-7]),
((Test10268.hs:7:1-27,AnnSemi), [Test10268.hs:8:1]),
((Test10268.hs:7:9,AnnRarrow), [Test10268.hs:7:11-12]),
diff --git a/testsuite/tests/ghc-api/annotations/T10276.stdout b/testsuite/tests/ghc-api/annotations/T10276.stdout
index 2ed6318905..77b2dae7a2 100644
--- a/testsuite/tests/ghc-api/annotations/T10276.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10276.stdout
@@ -29,8 +29,9 @@
((Test10276.hs:(10,13)-(11,74),AnnClose), [Test10276.hs:11:72-74]),
((Test10276.hs:(10,13)-(11,74),AnnOpen), [Test10276.hs:10:13-15]),
((Test10276.hs:(10,16)-(11,71),AnnVal), [Test10276.hs:10:20]),
-((Test10276.hs:10:31-42,AnnCloseP), [Test10276.hs:10:42]),
-((Test10276.hs:10:31-42,AnnOpenPTE), [Test10276.hs:10:31-33]),
+((Test10276.hs:10:31-42,AnnDollarDollar), [Test10276.hs:10:31-32]),
+((Test10276.hs:10:33-42,AnnCloseP), [Test10276.hs:10:42]),
+((Test10276.hs:10:33-42,AnnOpenP), [Test10276.hs:10:33]),
((Test10276.hs:11:25-71,AnnCloseP), [Test10276.hs:11:71]),
((Test10276.hs:11:25-71,AnnOpenP), [Test10276.hs:11:25]),
((Test10276.hs:11:26-36,AnnCloseP), [Test10276.hs:11:36]),
@@ -50,8 +51,9 @@
((Test10276.hs:(14,13)-(15,74),AnnClose), [Test10276.hs:15:72-74]),
((Test10276.hs:(14,13)-(15,74),AnnOpenE), [Test10276.hs:14:13-16]),
((Test10276.hs:(14,17)-(15,71),AnnVal), [Test10276.hs:14:21]),
-((Test10276.hs:14:32-43,AnnCloseP), [Test10276.hs:14:43]),
-((Test10276.hs:14:32-43,AnnOpenPTE), [Test10276.hs:14:32-34]),
+((Test10276.hs:14:32-43,AnnDollarDollar), [Test10276.hs:14:32-33]),
+((Test10276.hs:14:34-43,AnnCloseP), [Test10276.hs:14:43]),
+((Test10276.hs:14:34-43,AnnOpenP), [Test10276.hs:14:34]),
((Test10276.hs:15:25-71,AnnCloseP), [Test10276.hs:15:71]),
((Test10276.hs:15:25-71,AnnOpenP), [Test10276.hs:15:25]),
((Test10276.hs:15:26-36,AnnCloseP), [Test10276.hs:15:36]),
diff --git a/testsuite/tests/ghc-api/annotations/T10358.stdout b/testsuite/tests/ghc-api/annotations/T10358.stdout
index 604c7dab36..28f516cb5e 100644
--- a/testsuite/tests/ghc-api/annotations/T10358.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10358.stdout
@@ -16,12 +16,12 @@
((Test10358.hs:(4,1)-(8,6),AnnSemi), [Test10358.hs:9:1]),
((Test10358.hs:(5,3)-(8,6),AnnIn), [Test10358.hs:8:3-4]),
((Test10358.hs:(5,3)-(8,6),AnnLet), [Test10358.hs:5:3-5]),
-((Test10358.hs:5:7-16,AnnBang), [Test10358.hs:5:7]),
+((Test10358.hs:5:7-10,AnnBang), [Test10358.hs:5:7]),
((Test10358.hs:5:7-16,AnnEqual), [Test10358.hs:5:12]),
((Test10358.hs:5:7-16,AnnFunId), [Test10358.hs:5:8-10]),
((Test10358.hs:5:7-16,AnnSemi), [Test10358.hs:5:17]),
((Test10358.hs:5:14-16,AnnVal), [Test10358.hs:5:15]),
-((Test10358.hs:5:19-32,AnnBang), [Test10358.hs:5:19]),
+((Test10358.hs:5:19-22,AnnBang), [Test10358.hs:5:19]),
((Test10358.hs:5:19-32,AnnEqual), [Test10358.hs:5:24]),
((Test10358.hs:5:19-32,AnnFunId), [Test10358.hs:5:20-22]),
((Test10358.hs:5:19-32,AnnSemi), [Test10358.hs:6:7]),
diff --git a/testsuite/tests/ghc-api/annotations/T10399.stdout b/testsuite/tests/ghc-api/annotations/T10399.stdout
index 75d94b3406..b1e5a34d8f 100644
--- a/testsuite/tests/ghc-api/annotations/T10399.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10399.stdout
@@ -82,12 +82,13 @@
((Test10399.hs:20:1-25,AnnCloseQ), [Test10399.hs:20:24-25]),
((Test10399.hs:20:1-25,AnnOpen), [Test10399.hs:20:1-3]),
((Test10399.hs:20:1-25,AnnSemi), [Test10399.hs:22:1]),
-((Test10399.hs:20:20-22,AnnThIdSplice), [Test10399.hs:20:20-22]),
+((Test10399.hs:20:20-22,AnnDollar), [Test10399.hs:20:20]),
((Test10399.hs:22:1-21,AnnEqual), [Test10399.hs:22:19]),
((Test10399.hs:22:1-21,AnnFunId), [Test10399.hs:22:1-3]),
((Test10399.hs:22:1-21,AnnSemi), [Test10399.hs:23:1]),
-((Test10399.hs:22:5-17,AnnCloseP), [Test10399.hs:22:17]),
-((Test10399.hs:22:5-17,AnnOpenPE), [Test10399.hs:22:5-6]),
+((Test10399.hs:22:5-17,AnnDollar), [Test10399.hs:22:5]),
+((Test10399.hs:22:6-17,AnnCloseP), [Test10399.hs:22:17]),
+((Test10399.hs:22:6-17,AnnOpenP), [Test10399.hs:22:6]),
((Test10399.hs:22:8-15,AnnCloseQ), [Test10399.hs:22:14-15]),
((Test10399.hs:22:8-15,AnnOpen), [Test10399.hs:22:8-10]),
((<no location info>,AnnEofPos), [Test10399.hs:23:1])
diff --git a/testsuite/tests/ghc-api/annotations/T17519.stdout b/testsuite/tests/ghc-api/annotations/T17519.stdout
new file mode 100644
index 0000000000..e71dd7f1a0
--- /dev/null
+++ b/testsuite/tests/ghc-api/annotations/T17519.stdout
@@ -0,0 +1,25 @@
+---Unattached Annotation Problems (should be empty list)---
+[]
+---Ann before enclosing span problem (should be empty list)---
+[
+
+]
+
+---Annotations-----------------------
+-- SrcSpan the annotation is attached to, AnnKeywordId,
+-- list of locations the keyword item appears in
+[
+((Test17519.hs:1:1,AnnModule), [Test17519.hs:3:1-6]),
+((Test17519.hs:1:1,AnnWhere), [Test17519.hs:3:18-22]),
+((Test17519.hs:5:1-36,AnnDcolonU), [Test17519.hs:5:21]),
+((Test17519.hs:5:1-36,AnnFamily), [Test17519.hs:5:6-11]),
+((Test17519.hs:5:1-36,AnnSemi), [Test17519.hs:7:1]),
+((Test17519.hs:5:1-36,AnnType), [Test17519.hs:5:1-4]),
+((Test17519.hs:5:1-36,AnnWhere), [Test17519.hs:5:38-42]),
+((Test17519.hs:5:23-36,AnnForallU), [Test17519.hs:5:23]),
+((Test17519.hs:5:23-36,AnnRarrowU), [Test17519.hs:5:27]),
+((Test17519.hs:5:29,AnnRarrowU), [Test17519.hs:5:31]),
+((Test17519.hs:5:29-36,AnnRarrowU), [Test17519.hs:5:31]),
+((Test17519.hs:6:3-18,AnnEqual), [Test17519.hs:6:11]),
+((<no location info>,AnnEofPos), [Test17519.hs:7:1])
+]
diff --git a/testsuite/tests/ghc-api/annotations/Test17519.hs b/testsuite/tests/ghc-api/annotations/Test17519.hs
new file mode 100644
index 0000000000..f705008c51
--- /dev/null
+++ b/testsuite/tests/ghc-api/annotations/Test17519.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE UnicodeSyntax #-}
+module Test17519 where
+
+type family Proxy2' ∷ ∀ k → k → Type where
+ Proxy2' = Proxy'
diff --git a/testsuite/tests/ghc-api/annotations/all.T b/testsuite/tests/ghc-api/annotations/all.T
index f97e107c0a..37b80794cd 100644
--- a/testsuite/tests/ghc-api/annotations/all.T
+++ b/testsuite/tests/ghc-api/annotations/all.T
@@ -71,3 +71,5 @@ test('T16279', [extra_files(['Test16279.hs']),
ignore_stderr], makefile_test, ['T16279'])
test('T17388', [extra_files(['Test17388.hs']),
ignore_stderr], makefile_test, ['T17388'])
+test('T17519', [extra_files(['Test17519.hs']),
+ ignore_stderr], makefile_test, ['T17519'])
diff --git a/testsuite/tests/ghc-api/annotations/stringSource.hs b/testsuite/tests/ghc-api/annotations/stringSource.hs
index 8bae838672..3d053a3d7c 100644
--- a/testsuite/tests/ghc-api/annotations/stringSource.hs
+++ b/testsuite/tests/ghc-api/annotations/stringSource.hs
@@ -80,11 +80,15 @@ testOneFile libdir fileName = do
doCCallTarget (StaticTarget s f _ _) = [("st",[(noLoc (s,f))])]
doHsExpr :: HsExpr GhcPs -> [(String,[Located (SourceText,FastString)])]
- doHsExpr (HsCoreAnn _ src ss _) = [("co",[conv (noLoc ss)])]
- doHsExpr (HsSCC _ src ss _) = [("sc",[conv (noLoc ss)])]
- doHsExpr (HsTickPragma _ src (ss,_,_) _ss2 _) = [("tp",[conv (noLoc ss)])]
+ doHsExpr (HsPragE _ prag _) = doPragE prag
doHsExpr _ = []
+ doPragE :: HsPragE GhcPs -> [(String,[Located (SourceText,FastString)])]
+ doPragE (HsPragCore _ src ss) = [("co",[conv (noLoc ss)])]
+ doPragE (HsPragSCC _ src ss) = [("sc",[conv (noLoc ss)])]
+ doPragE (HsPragTick _ src (ss,_,_) _ss2) = [("tp",[conv (noLoc ss)])]
+ doPragE (XHsPragE x) = noExtCon x
+
conv (GHC.L l (StringLiteral st fs)) = GHC.L l (st,fs)
showAnns anns = "[\n" ++ (intercalate "\n"
diff --git a/testsuite/tests/ghc-api/annotations/t11430.hs b/testsuite/tests/ghc-api/annotations/t11430.hs
index f161e601ce..4b60097a69 100644
--- a/testsuite/tests/ghc-api/annotations/t11430.hs
+++ b/testsuite/tests/ghc-api/annotations/t11430.hs
@@ -67,7 +67,7 @@ testOneFile libdir fileName = do
doRuleDecl (HsRule _ _ _ _ _ _ _) = []
doHsExpr :: HsExpr GhcPs -> [(String,[String])]
- doHsExpr (HsTickPragma _ src (_,_,_) ss _) = [("tp",[show ss])]
+ doHsExpr (HsPragE _ (HsPragTick _ src (_,_,_) ss) _) = [("tp",[show ss])]
doHsExpr _ = []
doInline (InlinePragma _ _ _ (ActiveBefore (SourceText ss) _) _)
diff --git a/testsuite/tests/ghci/linking/dyn/Makefile b/testsuite/tests/ghci/linking/dyn/Makefile
index d4a65a6603..ee345e5560 100644
--- a/testsuite/tests/ghci/linking/dyn/Makefile
+++ b/testsuite/tests/ghci/linking/dyn/Makefile
@@ -94,7 +94,7 @@ compile_libAS_impl_msvc:
.PHONY: T1407
T1407:
- cat T1407.script | LD_LIBRARY_PATH=. "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -L"T1407dir"
+ cat T1407.script | LD_LIBRARY_PATH=".:$(LD_LIBRARY_PATH)" "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -L"T1407dir"
.PHONY: T3242
echo ":q" | '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -lm
diff --git a/testsuite/tests/module/mod183.stderr b/testsuite/tests/module/mod183.stderr
index cf7fdf4fa0..5f3c131537 100644
--- a/testsuite/tests/module/mod183.stderr
+++ b/testsuite/tests/module/mod183.stderr
@@ -1 +1 @@
-mod183.hs:5:26: Multiple occurences of 'qualified'
+mod183.hs:5:26: Multiple occurrences of 'qualified'
diff --git a/testsuite/tests/module/mod69.stderr b/testsuite/tests/module/mod69.stderr
index db7487485e..dea161115e 100644
--- a/testsuite/tests/module/mod69.stderr
+++ b/testsuite/tests/module/mod69.stderr
@@ -1,4 +1,4 @@
mod69.hs:3:7: error:
- Pattern syntax in expression context: x@1
- Did you mean to enable TypeApplications?
+ @-pattern in expression context: x@1
+ Type application syntax requires a space before '@'
diff --git a/testsuite/tests/module/mod70.stderr b/testsuite/tests/module/mod70.stderr
index 093f166ebd..6e9f854b7a 100644
--- a/testsuite/tests/module/mod70.stderr
+++ b/testsuite/tests/module/mod70.stderr
@@ -1,2 +1,4 @@
-mod70.hs:3:9: error: Pattern syntax in expression context: ~1
+mod70.hs:3:9: error:
+ Lazy pattern in expression context: ~1
+ Did you mean to add a space after the '~'?
diff --git a/testsuite/tests/numeric/should_compile/T16402.hs b/testsuite/tests/numeric/should_compile/T16402.hs
new file mode 100644
index 0000000000..c85fe0037b
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T16402.hs
@@ -0,0 +1,19 @@
+{-# OPTIONS_GHC -ddump-simpl -dhex-word-literals -dsuppress-all -dsuppress-uniques -O2 #-}
+{-# LANGUAGE TypeApplications #-}
+module T16402 where
+
+import Data.Word
+import Data.Int
+import Data.Bits
+
+smallWord_foo :: Word64 -> Word64
+smallWord_foo x = fromIntegral @Word16 $ fromIntegral (x .&. 0xFFFF)
+
+smallWord_bar :: Word64 -> Word64
+smallWord_bar x = fromIntegral (fromIntegral x :: Word16)
+
+smallInt_foo :: Int64 -> Int64
+smallInt_foo x = fromIntegral @Int16 $ fromIntegral (x .&. 0x12FFFF)
+
+smallInt_bar :: Int64 -> Int64
+smallInt_bar x = fromIntegral (fromIntegral x :: Int16)
diff --git a/testsuite/tests/numeric/should_compile/T16402.stderr b/testsuite/tests/numeric/should_compile/T16402.stderr
new file mode 100644
index 0000000000..75db843376
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T16402.stderr
@@ -0,0 +1,36 @@
+
+==================== Tidy Core ====================
+Result size of Tidy Core
+ = {terms: 34, types: 19, coercions: 0, joins: 0/0}
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+$trModule4 = "main"#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$trModule3 = TrNameS $trModule4
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+$trModule2 = "T16402"#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$trModule1 = TrNameS $trModule2
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+$trModule = Module $trModule3 $trModule1
+
+-- RHS size: {terms: 7, types: 3, coercions: 0, joins: 0/0}
+smallWord_bar
+ = \ x -> case x of { W64# x# -> W64# (narrow16Word# x#) }
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+smallWord_foo = smallWord_bar
+
+-- RHS size: {terms: 7, types: 3, coercions: 0, joins: 0/0}
+smallInt_bar
+ = \ x -> case x of { I64# x# -> I64# (narrow16Int# x#) }
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+smallInt_foo = smallInt_bar
+
+
+
diff --git a/testsuite/tests/numeric/should_compile/all.T b/testsuite/tests/numeric/should_compile/all.T
index 625951f4d6..a7dc06cf44 100644
--- a/testsuite/tests/numeric/should_compile/all.T
+++ b/testsuite/tests/numeric/should_compile/all.T
@@ -9,3 +9,4 @@ test('T7881', normal, compile, [''])
# desugaring, so we don't get the warning we expect.
test('T8542', omit_ways(['hpc']), compile, [''])
test('T10929', normal, compile, [''])
+test('T16402', [ grep_errmsg(r'and') ], compile, [''])
diff --git a/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr b/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr
index b4f29fbfb7..09606e0557 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr
@@ -1,6 +1,6 @@
-T11103.hs:13:3: error:
+T11103.hs:13:2: error:
Ambiguous occurrence ‘Main.foo’
- It could refer to either the field ‘foo’,
- defined at T11103.hs:11:16
- or the field ‘foo’, defined at T11103.hs:10:16
+ It could refer to
+ either the field ‘foo’, defined at T11103.hs:11:16
+ or the field ‘foo’, defined at T11103.hs:10:16
diff --git a/testsuite/tests/parser/should_compile/Proposal229f_instances.hs b/testsuite/tests/parser/should_compile/Proposal229f_instances.hs
new file mode 100644
index 0000000000..2bd5a8ee19
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/Proposal229f_instances.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE TypeFamilies #-}
+
+module Proposal229f_instances where
+
+import GHC.Exts
+import Data.String
+import Language.Haskell.TH
+import Language.Haskell.TH.Syntax
+
+instance IsList (Q (TExp String)) where
+ type Item (Q (TExp String)) = Char
+ fromList = liftTyped
+ toList = undefined
+
+instance IsList (Q Exp) where
+ type Item (Q Exp) = Char
+ fromList = lift
+ toList = undefined
+
+instance IsString (Q (TExp String)) where
+ fromString = liftTyped
+
+instance IsString (Q Exp) where
+ fromString = lift
diff --git a/testsuite/tests/parser/should_compile/T1087.hs b/testsuite/tests/parser/should_compile/T1087.hs
new file mode 100644
index 0000000000..9ad85e2b7a
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T1087.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE BangPatterns #-}
+
+module T1087 where
+
+prefix_1 = let at a !b = False in at 1 2
+prefix_2 = let (.!.) a !b = False in 1 .!. 2
+
+infix_tilde_1 = let a `at` ~b = False in at 1 2
+infix_tilde_2 = let a .!. ~b = False in 1 .!. 2
+infix_tilde_3 = let ~a .!. b = False in 1 .!. 2
+
+infix_bang_1 = let a .!. !b = False in 1 .!. 2
+infix_bang_2 = let a `at` !b = False in at 1 2
+infix_bang_3 = let !a .!. b = False in 1 .!. 2
diff --git a/testsuite/tests/parser/should_compile/T16619.stderr b/testsuite/tests/parser/should_compile/T16619.stderr
new file mode 100644
index 0000000000..b5dfb89623
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/T16619.stderr
@@ -0,0 +1,3 @@
+
+T16619.hs:2:12: warning:
+ -Wmissing-space-after-bang is deprecated: bang patterns can no longer be written with a space
diff --git a/testsuite/tests/parser/should_compile/all.T b/testsuite/tests/parser/should_compile/all.T
index 3d44e22510..91aae139ab 100644
--- a/testsuite/tests/parser/should_compile/all.T
+++ b/testsuite/tests/parser/should_compile/all.T
@@ -145,3 +145,20 @@ test('T16339', normal, compile, [''])
test('T16619', req_th, multimod_compile, ['T16619', '-v0'])
test('T504', normal, compile, [''])
test('T515', literate, compile, ['-Wall'])
+test('T1087', normal, compile, [''])
+test('proposal-229a', normal, compile, [''])
+test('proposal-229b', normal, compile, [''])
+test('proposal-229d', normal, compile, [''])
+test('proposal-229e', normal, compile, [''])
+
+# We omit 'profasm' because it fails with:
+# Cannot load -prof objects when GHC is built with -dynamic
+# To fix this, either:
+# (1) Use -fexternal-interpreter, or
+# (2) Build the program twice: once with -dynamic, and then
+# with -prof using -osuf to set a different object file suffix.
+test('proposal-229f',
+ [ extra_files(['proposal-229f.hs', 'Proposal229f_instances.hs']),
+ omit_ways(['profasm', 'profthreaded'])
+ ],
+ multimod_compile_and_run, ['proposal-229f.hs', ''])
diff --git a/testsuite/tests/parser/should_compile/proposal-229a.hs b/testsuite/tests/parser/should_compile/proposal-229a.hs
new file mode 100644
index 0000000000..c773cee3a2
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/proposal-229a.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE BangPatterns #-}
+
+module Proposal229a where
+
+data T a b = a :! b
+
+(!) :: x -> T a b -> (x, a, b)
+~u ! !(!m :! !n) = (u, m, n)
diff --git a/testsuite/tests/parser/should_compile/proposal-229b.hs b/testsuite/tests/parser/should_compile/proposal-229b.hs
new file mode 100644
index 0000000000..9182623e54
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/proposal-229b.hs
@@ -0,0 +1,10 @@
+module Proposal229b ((~), (@)) where
+
+(~) :: a -> b -> (a, b)
+x ~ y = (x, y)
+
+(@) :: a -> b -> (a, b)
+x @ y = (x, y)
+
+r :: ((Bool, Bool), Bool)
+r = True ~ False @ True
diff --git a/testsuite/tests/parser/should_compile/proposal-229d.hs b/testsuite/tests/parser/should_compile/proposal-229d.hs
new file mode 100644
index 0000000000..24a57ca872
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/proposal-229d.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE BangPatterns #-}
+
+module Proposal229d ((!)) where
+
+(!) :: a -> b -> (a, b)
+x ! y = (x,y) -- parsed as an operator even with BangPatterns enabled
diff --git a/testsuite/tests/parser/should_compile/proposal-229e.hs b/testsuite/tests/parser/should_compile/proposal-229e.hs
new file mode 100644
index 0000000000..d7fc35d38e
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/proposal-229e.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE BangPatterns #-}
+
+module Proposal229e ((!), f) where
+
+(!) :: Maybe a -> a -> (a, a)
+f :: a -> a
+
+-- the preceding '}' is not from a comment,
+-- so (!) is tight infix (therefore an operator)
+Nothing{}!x = (x, x)
+
+-- the following '{' opens a multi-line comment,
+-- so (!) is loose infix (therefore an operator)
+Just a !{-comment-}x = (a, x)
+
+-- the preceding '}' is closing a multi-line comment,
+-- so (!) is prefix (therefore a bang pattern)
+f{-comment-}!x = x
diff --git a/testsuite/tests/parser/should_compile/proposal-229f.hs b/testsuite/tests/parser/should_compile/proposal-229f.hs
new file mode 100644
index 0000000000..75b1341c6f
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/proposal-229f.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE OverloadedLists #-}
+
+import System.IO
+import Proposal229f_instances
+
+-- Testing that we can parse $[...] and $"..."
+main = do
+ hPutStrLn stderr $['1','2','3']
+ hPutStrLn stderr $$['1','2','3']
+ hPutStrLn stderr $"123"
+ hPutStrLn stderr $$"123"
diff --git a/testsuite/tests/parser/should_compile/proposal-229f.stderr b/testsuite/tests/parser/should_compile/proposal-229f.stderr
new file mode 100644
index 0000000000..310be0621c
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/proposal-229f.stderr
@@ -0,0 +1,4 @@
+123
+123
+123
+123
diff --git a/testsuite/tests/parser/should_fail/T14588.stderr b/testsuite/tests/parser/should_fail/T14588.stderr
index cb64103814..2efd9561e8 100644
--- a/testsuite/tests/parser/should_fail/T14588.stderr
+++ b/testsuite/tests/parser/should_fail/T14588.stderr
@@ -1,4 +1,4 @@
T14588.hs:3:19: error:
Illegal bang-pattern (use BangPatterns):
- ! x
+ !x
diff --git a/testsuite/tests/parser/should_fail/T16270.stderr b/testsuite/tests/parser/should_fail/T16270.stderr
index f4e90e40fc..a74bdeb8f0 100644
--- a/testsuite/tests/parser/should_fail/T16270.stderr
+++ b/testsuite/tests/parser/should_fail/T16270.stderr
@@ -1,4 +1,7 @@
+T16270.hs:2:12: warning:
+ -Werror=missing-space-after-bang is deprecated: bang patterns can no longer be written with a space
+
T16270.hs:7:1: warning: [-Wtabs (in -Wdefault)]
Tab character found here, and in five further locations.
Please use spaces instead.
@@ -46,10 +49,9 @@ T16270.hs:23:10: error:
Perhaps you intended to use GADTs or a similar language
extension to enable syntax: data T where
-T16270.hs:25:12: error: [-Wmissing-space-after-bang (in -Wdefault), -Werror=missing-space-after-bang]
- Did you forget to enable BangPatterns?
- If you mean to bind (!) then perhaps you want
- to add a space after the bang for clarity.
+T16270.hs:25:12: error:
+ Illegal bang-pattern (use BangPatterns):
+ !i
T16270.hs:27:9: error:
Multi-way if-expressions need MultiWayIf turned on
@@ -57,13 +59,13 @@ T16270.hs:27:9: error:
T16270.hs:29:9: error:
Multi-way if-expressions need MultiWayIf turned on
-T16270.hs:32:6: Illegal lambda-case (use LambdaCase)
+T16270.hs:32:6: error: Illegal lambda-case (use LambdaCase)
-T16270.hs:35:5:
+T16270.hs:35:5: error:
Use NumericUnderscores to allow underscores in integer literals
-T16270.hs:37:5:
- primitive string literal must contain only characters <= '/xFF'
+T16270.hs:37:5: error:
+ primitive string literal must contain only characters <= '\xFF'
T16270.hs:43:1: error:
parse error (possibly incorrect indentation or mismatched brackets)
diff --git a/testsuite/tests/parser/should_fail/T17162.hs b/testsuite/tests/parser/should_fail/T17162.hs
new file mode 100644
index 0000000000..6419da7544
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T17162.hs
@@ -0,0 +1,13 @@
+-- {-# LANGUAGE NoBangPatterns #-}
+
+module T17162 where
+
+charIsRepresentable :: TextEncoding -> Char -> IO Bool
+charIsRepresentable !enc c =
+ withCString enc [c]
+ (\cstr -> do str <- peekCString enc cstr
+ case str of
+ [ch] | ch == c -> pure True
+ _ -> pure False)
+ `catch`
+ \(_ :: IOException) -> pure False
diff --git a/testsuite/tests/parser/should_fail/T17162.stderr b/testsuite/tests/parser/should_fail/T17162.stderr
new file mode 100644
index 0000000000..d621e08ccc
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T17162.stderr
@@ -0,0 +1,4 @@
+
+T17162.hs:6:21: error:
+ Illegal bang-pattern (use BangPatterns):
+ !enc
diff --git a/testsuite/tests/parser/should_fail/T3811b.stderr b/testsuite/tests/parser/should_fail/T3811b.stderr
index f4e44c603c..65de1d5a75 100644
--- a/testsuite/tests/parser/should_fail/T3811b.stderr
+++ b/testsuite/tests/parser/should_fail/T3811b.stderr
@@ -1,4 +1,4 @@
T3811b.hs:4:14: error:
Cannot parse data constructor in a data/newtype declaration:
- ! B
+ !B
diff --git a/testsuite/tests/parser/should_fail/T3811c.stderr b/testsuite/tests/parser/should_fail/T3811c.stderr
index 431318e268..52f081bbe6 100644
--- a/testsuite/tests/parser/should_fail/T3811c.stderr
+++ b/testsuite/tests/parser/should_fail/T3811c.stderr
@@ -1,5 +1,6 @@
-T3811c.hs:6:11: error:
- Strictness annotation applied to a compound type.
- Did you mean to add parentheses?
- !(Show D)
+T3811c.hs:6:10: error:
+ Illegal class instance: ‘!Show D’
+ Class instances must be of the form
+ context => C ty_1 ... ty_n
+ where ‘C’ is a class
diff --git a/testsuite/tests/parser/should_fail/T3811f.stderr b/testsuite/tests/parser/should_fail/T3811f.stderr
index 2d31fa86cf..783a89e284 100644
--- a/testsuite/tests/parser/should_fail/T3811f.stderr
+++ b/testsuite/tests/parser/should_fail/T3811f.stderr
@@ -1,5 +1,3 @@
-T3811f.hs:4:8: error:
- Strictness annotation applied to a compound type.
- Did you mean to add parentheses?
- !(Foo a)
+T3811f.hs:4:7: error:
+ Malformed head of type or class declaration: !Foo a
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index 2fc7f3d326..c4a7a4f67b 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -161,3 +161,5 @@ test('patFail006', normal, compile_fail, [''])
test('patFail007', normal, compile_fail, [''])
test('patFail008', normal, compile_fail, [''])
test('patFail009', normal, compile_fail, [''])
+test('T17162', normal, compile_fail, [''])
+test('proposal-229c', normal, compile_fail, [''])
diff --git a/testsuite/tests/parser/should_fail/proposal-229c.hs b/testsuite/tests/parser/should_fail/proposal-229c.hs
new file mode 100644
index 0000000000..344311b2a1
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/proposal-229c.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE NoBangPatterns #-}
+
+module Proposal229c (f) where
+
+-- should recommend to enable BangPatterns instead of parsing as an infix operator
+f !x = x
diff --git a/testsuite/tests/parser/should_fail/proposal-229c.stderr b/testsuite/tests/parser/should_fail/proposal-229c.stderr
new file mode 100644
index 0000000000..965801a3c3
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/proposal-229c.stderr
@@ -0,0 +1,4 @@
+
+proposal-229c.hs:6:3: error:
+ Illegal bang-pattern (use BangPatterns):
+ !x
diff --git a/testsuite/tests/parser/should_fail/strictnessDataCon_A.stderr b/testsuite/tests/parser/should_fail/strictnessDataCon_A.stderr
index c02d2ee974..27e6c709a5 100644
--- a/testsuite/tests/parser/should_fail/strictnessDataCon_A.stderr
+++ b/testsuite/tests/parser/should_fail/strictnessDataCon_A.stderr
@@ -1,3 +1,3 @@
strictnessDataCon_A.hs:1:27: error:
- Strictness annotation cannot appear in this position.
+ Operator applied to too few arguments: !
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
index 88fc8d50b9..ad78bc9729 100644
--- a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
@@ -1,23 +1,23 @@
[1 of 2] Compiling Splices ( Splices.hs, Splices.o )
[2 of 2] Compiling SplicesUsed ( SplicesUsed.hs, SplicesUsed.o )
-SplicesUsed.hs:7:16: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:7:15: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘Maybe Bool’
• In the type ‘_’
In the type signature: maybeBool :: (_)
-SplicesUsed.hs:8:15: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:8:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_a’ standing for ‘_’
Where: ‘_’ is a rigid type variable bound by
the inferred type of <expression> :: _ -> _
- at SplicesUsed.hs:8:15-22
+ at SplicesUsed.hs:8:14-23
• In an expression type signature: _a -> _a
In the expression: id :: _a -> _a
In the expression: (id :: _a -> _a) (Just True :: Maybe _)
• Relevant bindings include
maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
-SplicesUsed.hs:8:27: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:8:26: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘Bool’
• In the first argument of ‘Maybe’, namely ‘_’
In the type ‘Maybe _’
@@ -25,7 +25,7 @@ SplicesUsed.hs:8:27: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Relevant bindings include
maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
-SplicesUsed.hs:10:17: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:10:16: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘(Char, a)’
Where: ‘a’ is a rigid type variable bound by
the inferred type of charA :: a -> (Char, a)
@@ -33,7 +33,7 @@ SplicesUsed.hs:10:17: warning: [-Wpartial-type-signatures (in -Wdefault)]
• In the type ‘a -> (_)’
In the type signature: charA :: a -> (_)
-SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:13:13: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘a -> Bool’
Where: ‘a’ is a rigid type variable bound by
the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
@@ -41,7 +41,7 @@ SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
• In the type ‘_ -> _ -> _’
In the type signature: filter' :: (_ -> _ -> _)
-SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:13:13: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘[a]’
Where: ‘a’ is a rigid type variable bound by
the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
@@ -49,7 +49,7 @@ SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
• In the type ‘_ -> _ -> _’
In the type signature: filter' :: (_ -> _ -> _)
-SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:13:13: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘[a]’
Where: ‘a’ is a rigid type variable bound by
the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
@@ -57,27 +57,27 @@ SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
• In the type ‘_ -> _ -> _’
In the type signature: filter' :: (_ -> _ -> _)
-SplicesUsed.hs:16:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:16:2: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘Eq a’
Where: ‘a’ is a rigid type variable bound by
the inferred type of foo :: Eq a => a -> a -> Bool
- at SplicesUsed.hs:16:3-10
+ at SplicesUsed.hs:16:2-11
• In the type signature: foo :: _ => _
-SplicesUsed.hs:16:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:16:2: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘a -> a -> Bool’
Where: ‘a’ is a rigid type variable bound by
the inferred type of foo :: Eq a => a -> a -> Bool
- at SplicesUsed.hs:16:3-10
+ at SplicesUsed.hs:16:2-11
• In the type signature: foo :: _ => _
-SplicesUsed.hs:18:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:18:2: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_a’ standing for ‘Bool’
• In the type signature: bar :: _a -> _b -> (_a, _b)
-SplicesUsed.hs:18:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+SplicesUsed.hs:18:2: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_b’ standing for ‘_’
Where: ‘_’ is a rigid type variable bound by
the inferred type of bar :: Bool -> _ -> (Bool, _)
- at SplicesUsed.hs:18:3-10
+ at SplicesUsed.hs:18:2-11
• In the type signature: bar :: _a -> _b -> (_a, _b)
diff --git a/testsuite/tests/partial-sigs/should_compile/T12033.hs b/testsuite/tests/partial-sigs/should_compile/T12033.hs
index f426b9cdd5..519505fb21 100644
--- a/testsuite/tests/partial-sigs/should_compile/T12033.hs
+++ b/testsuite/tests/partial-sigs/should_compile/T12033.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE TypeFamilies, PartialTypeSignatures #-}
--- In #12033 this was called HsakellBug.hs
+-- In #12033 this was called HaskellBug.hs
module T12033 where
tripleStoreToRuleSet :: v -> v
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
index 2426e4cd27..2a83a36cc2 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
@@ -1,5 +1,5 @@
-ExtraConstraintsWildcardInPatternSplice.hs:5:8: error:
+ExtraConstraintsWildcardInPatternSplice.hs:5:6: error:
• Found type wildcard ‘_’ standing for ‘_’
Where: ‘_’ is a rigid type variable bound by
the inferred type of foo :: _ -> ()
diff --git a/testsuite/tests/perf/should_run/T8763.hs b/testsuite/tests/perf/should_run/T8763.hs
index 90c4436ce9..fac6e6302a 100644
--- a/testsuite/tests/perf/should_run/T8763.hs
+++ b/testsuite/tests/perf/should_run/T8763.hs
@@ -1,7 +1,7 @@
-- | The fusion helper for @enumFromThenTo \@Int@ had multiple
--- occurences of @c@, which made the simplifier refuse to inline it.
+-- occurrences of @c@, which made the simplifier refuse to inline it.
-- The new implementation for @efdtInt{Up,Dn}FB@ only have a single
--- occurence of @c@ which the simplifier inlines unconditionally.
+-- occurrence of @c@ which the simplifier inlines unconditionally.
module Main (main) where
import Control.Monad (when, forM_)
@@ -12,7 +12,7 @@ nop _ = return ()
{-# NOINLINE nop #-}
-- This is the baseline, using @enumFromTo@ which already had only a
--- single occurence of @c@.
+-- single occurrence of @c@.
f :: Int -> ST s ()
f n =
do
diff --git a/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs b/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs
index 55e32e5b69..ae4135d203 100644
--- a/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs
+++ b/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs
@@ -29,5 +29,5 @@ pass g = do
annotationsOn :: Data a => ModGuts -> CoreBndr -> CoreM [a]
annotationsOn guts bndr = do
- anns <- getAnnotations deserializeWithData guts
+ (_, anns) <- getAnnotations deserializeWithData guts
return $ lookupWithDefaultUFM anns [] (varUnique bndr)
diff --git a/testsuite/tests/plugins/plugins10.stdout b/testsuite/tests/plugins/plugins10.stdout
index f010ce98f8..33f8ff722d 100644
--- a/testsuite/tests/plugins/plugins10.stdout
+++ b/testsuite/tests/plugins/plugins10.stdout
@@ -13,7 +13,7 @@ interfacePlugin: GHC.Natural
parsePlugin(a)
typeCheckPlugin (rn)
interfacePlugin: Language.Haskell.TH.Lib.Internal
-metaPlugin: return []
+metaPlugin: (return [])
metaPlugin: quoteExp stringify "x"
interfacePlugin: GHC.CString
typeCheckPlugin (rn)
diff --git a/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs
index 938d23586c..aabc1e5b6c 100644
--- a/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs
+++ b/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs
@@ -46,7 +46,7 @@ findNameBndr target b
mainPass :: ModGuts -> CoreM ModGuts
mainPass guts = do
putMsgS "Simple Plugin Pass Run"
- anns <- getAnnotations deserializeWithData guts
+ (_, anns) <- getAnnotations deserializeWithData guts
bindsOnlyPass (mapM (changeBind anns Nothing)) guts
changeBind :: UniqFM [ReplaceWith] -> Maybe String -> CoreBind -> CoreM CoreBind
diff --git a/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs
index fce8b7d136..0d7e44b4b6 100644
--- a/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs
+++ b/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs
@@ -52,6 +52,7 @@ typecheckPlugin [name, "typecheck"] _ tc
typecheckPlugin _ _ tc = return tc
metaPlugin' :: [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
+metaPlugin' opts (L l (HsPar x e)) = (\e' -> L l (HsPar x e')) <$> metaPlugin' opts e
metaPlugin' [name, "meta"] (L _ (HsApp noExt (L l (HsVar _ (L _ id))) e))
| occNameString (getOccName id) == name
= return e
diff --git a/testsuite/tests/pmcheck/should_compile/CyclicSubst.hs b/testsuite/tests/pmcheck/should_compile/CyclicSubst.hs
index 9fe0effe2c..ad351db13a 100644
--- a/testsuite/tests/pmcheck/should_compile/CyclicSubst.hs
+++ b/testsuite/tests/pmcheck/should_compile/CyclicSubst.hs
@@ -7,7 +7,7 @@ module CyclicSubst where
-- | The match is translated to @b | a <- b@, the initial unification variable
-- is @a@ (for some reason). VarVar will assign @b :-> a@ in the match of @a@
--- against @b@ (vars occuring in a pattern are flexible). The @PmGrd a b@ is
+-- against @b@ (vars occurring in a pattern are flexible). The @PmGrd a b@ is
-- desugared as a match of @$pm_x@ against @a@, where @$pm_x :-> b@, which is
-- stored as @$pm_x :-> a@ due to the previous solution. Now, VarVar will
-- assign @a :-> $pm_x@, causing a cycle.
diff --git a/testsuite/tests/pmcheck/should_compile/pmc009.hs b/testsuite/tests/pmcheck/should_compile/pmc009.hs
index 08f130de33..95999b2de5 100644
--- a/testsuite/tests/pmcheck/should_compile/pmc009.hs
+++ b/testsuite/tests/pmcheck/should_compile/pmc009.hs
@@ -2,10 +2,6 @@ module HsUtils where
import GHC.Hs.Binds
import SrcLoc
-
--- | We have to be careful to normalise @SrcSpanLess (LHsBind)@ to
--- @LHsBindLR l r@ before passing the representative of @unLoc bind@ on to
--- @mkOneConFull@, otherwise this triggers a panic in @zipTvSubst@.
addPatSynSelector:: LHsBind p -> [a]
addPatSynSelector bind
| PatSynBind _ _ <- unLoc bind
diff --git a/testsuite/tests/pmcheck/should_compile/pmc009.stderr b/testsuite/tests/pmcheck/should_compile/pmc009.stderr
index d046b38d0f..9614f2497b 100644
--- a/testsuite/tests/pmcheck/should_compile/pmc009.stderr
+++ b/testsuite/tests/pmcheck/should_compile/pmc009.stderr
@@ -1,4 +1,4 @@
-pmc009.hs:10:1: warning: [-Wincomplete-patterns (in -Wextra)]
+pmc009.hs:6:1: warning: [-Wincomplete-patterns (in -Wextra)]
Pattern match(es) are non-exhaustive
In an equation for ‘addPatSynSelector’: Patterns not matched: L _ _
diff --git a/testsuite/tests/printer/Ppr047.hs b/testsuite/tests/printer/Ppr047.hs
index 3ef54c4b38..e7f36850b0 100644
--- a/testsuite/tests/printer/Ppr047.hs
+++ b/testsuite/tests/printer/Ppr047.hs
@@ -1,4 +1,3 @@
module ExprPragmas where
--- Should it be possible to ppr the following annotation?
c = {-# GENERATED "foobar" 1 : 2 - 3 : 4 #-} 0.00
diff --git a/testsuite/tests/printer/T13199.stdout b/testsuite/tests/printer/T13199.stdout
index 62e56590e0..6ccc1f10f0 100644
--- a/testsuite/tests/printer/T13199.stdout
+++ b/testsuite/tests/printer/T13199.stdout
@@ -1,48 +1,48 @@
-T13199.hs:(14,3)-(15,6): Splicing declarations
+T13199.hs:(14,2)-(15,7): Splicing declarations
[d| instance C (Maybe a) (Maybe b) c |]
======>
instance C (Maybe a) (Maybe b) c
-T13199.hs:21:3-44: Splicing declarations
+T13199.hs:21:2-45: Splicing declarations
[d| g (a :: (Int -> Int) -> Int) = True |]
======>
g (a :: (Int -> Int) -> Int) = True
-T13199.hs:24:3-27: Splicing declarations
+T13199.hs:24:2-28: Splicing declarations
[d| h (id -> x) = True |] ======> h (id -> x) = True
-T13199.hs:27:3-37: Splicing declarations
+T13199.hs:27:2-38: Splicing declarations
[d| f (Just (Just False)) = True |]
======>
f (Just (Just False)) = True
-T13199.hs:30:3-33: Splicing declarations
+T13199.hs:30:2-34: Splicing declarations
[d| i (B (a `B` c) d) = True |] ======> i (B (a `B` c) d) = True
-T13199.hs:33:3-29: Splicing declarations
+T13199.hs:33:2-30: Splicing declarations
[d| j B {aa = a} = True |] ======> j B {aa = a} = True
-T13199.hs:36:3-28: Splicing declarations
+T13199.hs:36:2-29: Splicing declarations
[d| k = id @(Maybe Int) |] ======> k = id @(Maybe Int)
-T13199.hs:38:3-58: Splicing declarations
+T13199.hs:38:2-59: Splicing declarations
[d| l = case Just 'a' of { Just a -> Just ((\ x -> x) a) } |]
======>
l = case Just 'a' of { Just a -> Just ((\ x -> x) a) }
-T13199.ppr.hs:11:3-41: Splicing declarations
+T13199.ppr.hs:11:2-42: Splicing declarations
[d| instance C (Maybe a) (Maybe b) c |]
======>
instance C (Maybe a) (Maybe b) c
-T13199.ppr.hs:12:3-44: Splicing declarations
+T13199.ppr.hs:12:2-45: Splicing declarations
[d| g (a :: (Int -> Int) -> Int) = True |]
======>
g (a :: (Int -> Int) -> Int) = True
-T13199.ppr.hs:13:3-27: Splicing declarations
+T13199.ppr.hs:13:2-28: Splicing declarations
[d| h (id -> x) = True |] ======> h (id -> x) = True
-T13199.ppr.hs:14:3-37: Splicing declarations
+T13199.ppr.hs:14:2-38: Splicing declarations
[d| f (Just (Just False)) = True |]
======>
f (Just (Just False)) = True
-T13199.ppr.hs:15:3-33: Splicing declarations
+T13199.ppr.hs:15:2-34: Splicing declarations
[d| i (B (a `B` c) d) = True |] ======> i (B (a `B` c) d) = True
-T13199.ppr.hs:16:3-28: Splicing declarations
+T13199.ppr.hs:16:2-29: Splicing declarations
[d| j B {aa = a} = True |] ======> j B {aa = a} = True
-T13199.ppr.hs:17:3-28: Splicing declarations
+T13199.ppr.hs:17:2-29: Splicing declarations
[d| k = id @(Maybe Int) |] ======> k = id @(Maybe Int)
-T13199.ppr.hs:18:3-63: Splicing declarations
+T13199.ppr.hs:18:2-64: Splicing declarations
[d| l = case Just 'a' of { Just a -> Just ((\ x -> x) a) } |]
======>
l = case Just 'a' of { Just a -> Just ((\ x -> x) a) }
diff --git a/testsuite/tests/printer/T13550.stdout b/testsuite/tests/printer/T13550.stdout
index ff02835912..7f74e48895 100644
--- a/testsuite/tests/printer/T13550.stdout
+++ b/testsuite/tests/printer/T13550.stdout
@@ -1,4 +1,4 @@
-T13550.hs:(6,3)-(11,6): Splicing declarations
+T13550.hs:(6,2)-(11,7): Splicing declarations
[d| type family Foo a b
data family Bar a b
@@ -9,7 +9,7 @@ T13550.hs:(6,3)-(11,6): Splicing declarations
type instance Foo (Maybe a) b = Either (Maybe a) (Maybe b)
data family Bar a b
data instance Bar (Maybe a) b = BarMaybe (Maybe a) (Maybe b)
-T13550.ppr.hs:(5,3)-(8,69): Splicing declarations
+T13550.ppr.hs:(5,2)-(8,70): Splicing declarations
[d| type family Foo a b
data family Bar a b
diff --git a/testsuite/tests/printer/T13942.stdout b/testsuite/tests/printer/T13942.stdout
index 2d0f617074..f40a71bf0f 100644
--- a/testsuite/tests/printer/T13942.stdout
+++ b/testsuite/tests/printer/T13942.stdout
@@ -1,10 +1,10 @@
-T13942.hs:(5,3)-(7,6): Splicing declarations
+T13942.hs:(5,2)-(7,7): Splicing declarations
[d| f :: Either Int (Int -> Int)
f = undefined |]
======>
f :: Either Int (Int -> Int)
f = undefined
-T13942.ppr.hs:(4,3)-(5,22): Splicing declarations
+T13942.ppr.hs:(4,2)-(5,23): Splicing declarations
[d| f :: Either Int (Int -> Int)
f = undefined |]
======>
diff --git a/testsuite/tests/printer/T14289.stdout b/testsuite/tests/printer/T14289.stdout
index 3f0754adca..b11a3bf063 100644
--- a/testsuite/tests/printer/T14289.stdout
+++ b/testsuite/tests/printer/T14289.stdout
@@ -1,4 +1,4 @@
-T14289.hs:10:3-42: Splicing declarations
+T14289.hs:10:2-43: Splicing declarations
[d| data Foo a
= Foo a
deriving (C a) |]
@@ -6,7 +6,7 @@ T14289.hs:10:3-42: Splicing declarations
data Foo a
= Foo a
deriving (C a)
-T14289.ppr.hs:(7,3)-(9,25): Splicing declarations
+T14289.ppr.hs:(7,2)-(9,26): Splicing declarations
[d| data Foo a
= Foo a
deriving (C a) |]
diff --git a/testsuite/tests/printer/T14289b.stdout b/testsuite/tests/printer/T14289b.stdout
index 5d4b248ac3..5c6e0f7474 100644
--- a/testsuite/tests/printer/T14289b.stdout
+++ b/testsuite/tests/printer/T14289b.stdout
@@ -1,4 +1,4 @@
-T14289b.hs:11:3-46: Splicing declarations
+T14289b.hs:11:2-47: Splicing declarations
[d| data Foo a
= Foo a
deriving (y `C` z) |]
@@ -6,7 +6,7 @@ T14289b.hs:11:3-46: Splicing declarations
data Foo a
= Foo a
deriving (C y z)
-T14289b.ppr.hs:(8,3)-(10,29): Splicing declarations
+T14289b.ppr.hs:(8,2)-(10,30): Splicing declarations
[d| data Foo a
= Foo a
deriving (y `C` z) |]
diff --git a/testsuite/tests/printer/T14289c.stdout b/testsuite/tests/printer/T14289c.stdout
index d200f99a2b..287793b6ea 100644
--- a/testsuite/tests/printer/T14289c.stdout
+++ b/testsuite/tests/printer/T14289c.stdout
@@ -1,4 +1,4 @@
-T14289c.hs:9:3-44: Splicing declarations
+T14289c.hs:9:2-45: Splicing declarations
[d| data Foo a
= Foo a
deriving (a ~ a) |]
@@ -6,7 +6,7 @@ T14289c.hs:9:3-44: Splicing declarations
data Foo a
= Foo a
deriving (a ~ a)
-T14289c.ppr.hs:(7,3)-(9,27): Splicing declarations
+T14289c.ppr.hs:(7,2)-(9,28): Splicing declarations
[d| data Foo a
= Foo a
deriving (a ~ a) |]
diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T
index 3440f57458..83bfd234fc 100644
--- a/testsuite/tests/printer/all.T
+++ b/testsuite/tests/printer/all.T
@@ -44,7 +44,7 @@ test('Ppr043', [ignore_stderr, req_rts_linker], makefile_test, ['ppr043'])
test('Ppr044', ignore_stderr, makefile_test, ['ppr044'])
test('Ppr045', ignore_stderr, makefile_test, ['ppr045'])
test('Ppr046', ignore_stderr, makefile_test, ['ppr046'])
-test('Ppr047', expect_fail, makefile_test, ['ppr047'])
+test('Ppr047', ignore_stderr, makefile_test, ['ppr047'])
test('Ppr048', ignore_stderr, makefile_test, ['ppr048'])
test('T13199', [ignore_stderr, req_rts_linker], makefile_test, ['T13199'])
test('T13050p', ignore_stderr, makefile_test, ['T13050p'])
diff --git a/testsuite/tests/programs/Makefile-OLD b/testsuite/tests/programs/Makefile-OLD
index 0fab32f683..c6d37fe912 100644
--- a/testsuite/tests/programs/Makefile-OLD
+++ b/testsuite/tests/programs/Makefile-OLD
@@ -29,7 +29,7 @@ NOT_THESE += jeff-bug lennart_array
# compiles but doesn't run
NOT_THESE += dmgob_native1 dmgob_native2
-# Native library doens't exist
+# Native library doesn't exist
ifneq "$(HWL_NOFIB_HACK)" ""
NOT_THESE += callback zhang_ccall
diff --git a/testsuite/tests/programs/andy_cherry/DataTypes.hs b/testsuite/tests/programs/andy_cherry/DataTypes.hs
index bcb6cbcf60..01df7f5abd 100644
--- a/testsuite/tests/programs/andy_cherry/DataTypes.hs
+++ b/testsuite/tests/programs/andy_cherry/DataTypes.hs
@@ -13,7 +13,7 @@
class Presentable a where
- userFormat :: a -> String -- in prefered display format
+ userFormat :: a -> String -- in preferred display format
diff --git a/testsuite/tests/programs/andy_cherry/Interp.hs b/testsuite/tests/programs/andy_cherry/Interp.hs
index e323dc34f7..9b5f391409 100644
--- a/testsuite/tests/programs/andy_cherry/Interp.hs
+++ b/testsuite/tests/programs/andy_cherry/Interp.hs
@@ -93,7 +93,7 @@
| head tag == '(' && take 2 (reverse tag) == ":)" && length rest > 1 =
getCurrColour `thenP` \ col ->
let
- invert Black r = r -- because the move has *already* happend
+ invert Black r = r -- because the move has *already* happened
invert _ "0.00" = "0.00" -- don't negate 0
invert _ ('-':r) = r
invert _ r = '-':r
diff --git a/testsuite/tests/programs/seward-space-leak/Main.lhs b/testsuite/tests/programs/seward-space-leak/Main.lhs
index 6c3f9f9d32..fb1527e330 100644
--- a/testsuite/tests/programs/seward-space-leak/Main.lhs
+++ b/testsuite/tests/programs/seward-space-leak/Main.lhs
@@ -97,7 +97,7 @@ parameter numbering starts at 1).
@Call@.
Calls to other functions are done with @Call@, which expects
the callee to return @Zero@ or @One@, and selects the relevant
-branch. The @Tag@s identify calls in the dependancy list.
+branch. The @Tag@s identify calls in the dependency list.
Although a @Call@ is a glorified @Case@ statement, the only allowed
return values are @Zero@ and @One@. Hence the @CDS CDS@ continuations
rather than the more comprehensive @(AList Return CDS)@.
@@ -166,7 +166,7 @@ as necessary. ToDo: Need to rename call sites? I don't think so.
Main CDS evaluator takes
\begin{itemize}
\item the code store
-\item the dependancy list, a list of @Tag@s of calls which are
+\item the dependency list, a list of @Tag@s of calls which are
currently in progress
\item the current arguments
\item the CDS fragment currently being worked on
diff --git a/testsuite/tests/rename/should_fail/T12879.stderr b/testsuite/tests/rename/should_fail/T12879.stderr
index 1b3559c255..0c6b7f36f5 100644
--- a/testsuite/tests/rename/should_fail/T12879.stderr
+++ b/testsuite/tests/rename/should_fail/T12879.stderr
@@ -1,4 +1,4 @@
T12879.hs:4:7: error:
- Pattern syntax in expression context: x@x
+ @-pattern in expression context: x@x
Type application syntax requires a space before '@'
diff --git a/testsuite/tests/rename/should_fail/rnfail016.stderr b/testsuite/tests/rename/should_fail/rnfail016.stderr
index 47436132f2..6ed450ce0b 100644
--- a/testsuite/tests/rename/should_fail/rnfail016.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail016.stderr
@@ -1,4 +1,4 @@
rnfail016.hs:6:7: error:
- Pattern syntax in expression context: x@x
- Did you mean to enable TypeApplications?
+ @-pattern in expression context: x@x
+ Type application syntax requires a space before '@'
diff --git a/testsuite/tests/rename/should_fail/rnfail016a.stderr b/testsuite/tests/rename/should_fail/rnfail016a.stderr
index 3a59ee7478..544cf58cac 100644
--- a/testsuite/tests/rename/should_fail/rnfail016a.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail016a.stderr
@@ -1,2 +1,2 @@
-rnfail016a.hs:6:7: error: Pattern syntax in expression context: ~x
+rnfail016a.hs:6:7: error: parse error on input ‘~’
diff --git a/testsuite/tests/rename/should_fail/rnfail051.stderr b/testsuite/tests/rename/should_fail/rnfail051.stderr
index 9c45a6168b..c1f4f43a2f 100644
--- a/testsuite/tests/rename/should_fail/rnfail051.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail051.stderr
@@ -1,3 +1,3 @@
rnfail051.hs:7:17: error:
- Pattern syntax in expression context: _ -> putStrLn "_"
+ View pattern in expression context: _ -> putStrLn "_"
diff --git a/testsuite/tests/roles/should_compile/T16718.stderr b/testsuite/tests/roles/should_compile/T16718.stderr
index 8e2530ef31..18c1bee5d1 100644
--- a/testsuite/tests/roles/should_compile/T16718.stderr
+++ b/testsuite/tests/roles/should_compile/T16718.stderr
@@ -1,4 +1,4 @@
-T16718.hs:(5,3)-(7,6): Splicing declarations
+T16718.hs:(5,2)-(7,7): Splicing declarations
[d| type role P phantom
data P a |]
diff --git a/testsuite/tests/runghc/T17171a.stderr b/testsuite/tests/runghc/T17171a.stderr
index 5079cf4075..bf11f1e1f4 100644
--- a/testsuite/tests/runghc/T17171a.stderr
+++ b/testsuite/tests/runghc/T17171a.stderr
@@ -1,5 +1 @@
-Main.hs:1:1: error:
The IO action ‘main’ is not exported by module ‘Main’
- |
-1 | module Main () where
- | ^
diff --git a/testsuite/tests/runghc/all.T b/testsuite/tests/runghc/all.T
index 33174d04dc..4503e8c996 100644
--- a/testsuite/tests/runghc/all.T
+++ b/testsuite/tests/runghc/all.T
@@ -6,8 +6,11 @@ test('T11247', [req_interp, expect_broken(11247)], makefile_test, [])
test('T6132', [when(opsys('darwin'), expect_broken(6132))], compile, [''])
-test('T17171a', [req_interp, expect_fail], makefile_test, [])
-test('T17171b', req_interp, makefile_test, [])
+test('T17171a',
+ [req_interp, exit_code(2), ignore_stdout, grep_errmsg(r'main')],
+ run_command, ['$MAKE -s --no-print-directory T17171a'])
+test('T17171b', req_interp, run_command,
+ ['$MAKE -s --no-print-directory T17171b'])
test('T-signals-child',
[ when(opsys('mingw32'), skip), req_interp
diff --git a/testsuite/tests/safeHaskell/check/Check06.hs b/testsuite/tests/safeHaskell/check/Check06.hs
index a4debfc2cb..99649fa079 100644
--- a/testsuite/tests/safeHaskell/check/Check06.hs
+++ b/testsuite/tests/safeHaskell/check/Check06.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE Trustworthy, NoImplicitPrelude #-}
{-# OPTIONS_GHC -fpackage-trust #-}
--- make sure importing a safe-infered module brings in the
+-- make sure importing a safe-inferred module brings in the
-- pkg trust requirements correctly.
module Check06 ( main' ) where
diff --git a/testsuite/tests/safeHaskell/check/Check06_A.hs b/testsuite/tests/safeHaskell/check/Check06_A.hs
index 9c9d92ba24..4cda329fec 100644
--- a/testsuite/tests/safeHaskell/check/Check06_A.hs
+++ b/testsuite/tests/safeHaskell/check/Check06_A.hs
@@ -1,4 +1,4 @@
--- safe infered, with requirement base is trusted
+-- safe inferred, with requirement base is trusted
module Check06_A where
mainM :: Int -> Int
diff --git a/testsuite/tests/safeHaskell/check/Check07_A.hs b/testsuite/tests/safeHaskell/check/Check07_A.hs
index 5b38c6a07b..efc58e0bfe 100644
--- a/testsuite/tests/safeHaskell/check/Check07_A.hs
+++ b/testsuite/tests/safeHaskell/check/Check07_A.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE NoImplicitPrelude #-}
--- safe infered, with no pkg trust reqs
+-- safe inferred, with no pkg trust reqs
module Check07_A where
a :: a -> a
diff --git a/testsuite/tests/safeHaskell/check/Check07_B.hs b/testsuite/tests/safeHaskell/check/Check07_B.hs
index 4a2003f9a9..5085cc18ab 100644
--- a/testsuite/tests/safeHaskell/check/Check07_B.hs
+++ b/testsuite/tests/safeHaskell/check/Check07_B.hs
@@ -1,4 +1,4 @@
--- safe infered, with requirement base is trusted
+-- safe inferred, with requirement base is trusted
module Check07_B where
import Prelude
diff --git a/testsuite/tests/safeHaskell/check/Check08_A.hs b/testsuite/tests/safeHaskell/check/Check08_A.hs
index c888a59b71..4438a34e09 100644
--- a/testsuite/tests/safeHaskell/check/Check08_A.hs
+++ b/testsuite/tests/safeHaskell/check/Check08_A.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE NoImplicitPrelude #-}
--- safe infered, with no pkg trust reqs
+-- safe inferred, with no pkg trust reqs
module Check08_A where
a :: a -> a
diff --git a/testsuite/tests/safeHaskell/check/Check08_B.hs b/testsuite/tests/safeHaskell/check/Check08_B.hs
index 41feab5eae..42d01f2b33 100644
--- a/testsuite/tests/safeHaskell/check/Check08_B.hs
+++ b/testsuite/tests/safeHaskell/check/Check08_B.hs
@@ -1,4 +1,4 @@
--- safe infered, with requirement base is trusted
+-- safe inferred, with requirement base is trusted
module Check08_B where
import Prelude
diff --git a/testsuite/tests/safeHaskell/check/all.T b/testsuite/tests/safeHaskell/check/all.T
index 47e875d3be..8cf37d3b43 100644
--- a/testsuite/tests/safeHaskell/check/all.T
+++ b/testsuite/tests/safeHaskell/check/all.T
@@ -41,7 +41,7 @@ test('Check04', normal, multi_compile, ['Check04', [
# Check -fpackage-trust with no safe haskell flag is an error
test('Check05', normal, compile, [''])
-# Check safe-infered modules have correct pkg trust requirements
+# Check safe-inferred modules have correct pkg trust requirements
test('Check06', [], multimod_compile_fail, ['Check06', ''])
# Check selective safe imports bring in correct pkg trust requirements
diff --git a/testsuite/tests/safeHaskell/check/pkg01/M_SafePkg5.hs b/testsuite/tests/safeHaskell/check/pkg01/M_SafePkg5.hs
index a4b7390352..75bde26b4e 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/M_SafePkg5.hs
+++ b/testsuite/tests/safeHaskell/check/pkg01/M_SafePkg5.hs
@@ -1,6 +1,6 @@
-- safe inference
-- same module as M_SafePkg4 which compiles with -XSafe.
--- Want to make sure compiles fine and is infered safe and
+-- Want to make sure compiles fine and is inferred safe and
-- also picks up corrected pkg trust requirements.
module M_SafePkg5 where
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags21.hs b/testsuite/tests/safeHaskell/flags/SafeFlags21.hs
index c7e8b0d87a..5169a03583 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags21.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags21.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -fwarn-unsafe #-}
-- | Basic test to see if Safe warning flags compile
--- Warn if module is infered unsafe
+-- Warn if module is inferred unsafe
-- In this test the warning _shouldn't_ fire
module SafeFlags21 where
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags22.hs b/testsuite/tests/safeHaskell/flags/SafeFlags22.hs
index 0b94cff91c..3d5d8dc1af 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags22.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags22.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -fwarn-unsafe #-}
-- | Basic test to see if Safe warning flags compile
--- Warn if module is infered unsafe
+-- Warn if module is inferred unsafe
-- In this test the warning _should_ fire
module SafeFlags22 where
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags23.hs b/testsuite/tests/safeHaskell/flags/SafeFlags23.hs
index 87f7b2dc5d..b3180bc1e1 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags23.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags23.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -fwarn-unsafe -Werror #-}
-- | Basic test to see if Safe warning flags compile
--- Warn if module is infered unsafe
+-- Warn if module is inferred unsafe
-- In this test the warning _should_ fire and cause a compile fail
module SafeFlags22 where
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags24.hs b/testsuite/tests/safeHaskell/flags/SafeFlags24.hs
index 928d322e3c..ab63880f80 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags24.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags24.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -fwarn-safe #-}
-- | Basic test to see if Safe warning flags compile
--- Warn if module is infered safe
+-- Warn if module is inferred safe
-- In this test the warning _shouldn't_ fire
module SafeFlags23 where
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags25.hs b/testsuite/tests/safeHaskell/flags/SafeFlags25.hs
index c97fa885d1..7d650d6a72 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags25.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags25.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -fwarn-safe #-}
-- | Basic test to see if Safe warning flags compile
--- Warn if module is infered safe
+-- Warn if module is inferred safe
-- In this test the warning _should_ fire
module SafeFlags25 where
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags26.hs b/testsuite/tests/safeHaskell/flags/SafeFlags26.hs
index 0767448bca..45b65f3d9e 100644
--- a/testsuite/tests/safeHaskell/flags/SafeFlags26.hs
+++ b/testsuite/tests/safeHaskell/flags/SafeFlags26.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -fwarn-safe -Werror #-}
-- | Basic test to see if Safe warning flags compile
--- Warn if module is infered safe
+-- Warn if module is inferred safe
-- In this test the warning _should_ fire and cause a compile fail
module SafeFlags26 where
diff --git a/testsuite/tests/safeHaskell/safeInfered/all.T b/testsuite/tests/safeHaskell/safeInfered/all.T
index be38d8ff12..e9b03b5458 100644
--- a/testsuite/tests/safeHaskell/safeInfered/all.T
+++ b/testsuite/tests/safeHaskell/safeInfered/all.T
@@ -7,14 +7,14 @@ def f( name, opts ):
setTestOpts(f)
-# Tests that should compile fine as they should be infered safe
+# Tests that should compile fine as they should be inferred safe
test('SafeInfered01', [], multimod_compile, ['SafeInfered01', ''])
test('SafeInfered02', [], multimod_compile, ['SafeInfered02', ''])
test('SafeInfered03', [], multimod_compile, ['SafeInfered03', ''])
test('SafeInfered04', [], multimod_compile, ['SafeInfered04', ''])
test('SafeInfered05', [], multimod_compile, ['SafeInfered05', ''])
-# Tests that should fail to compile as they should be infered unsafe
+# Tests that should fail to compile as they should be inferred unsafe
test('UnsafeInfered01', [], multimod_compile_fail, ['UnsafeInfered01', ''])
test('UnsafeInfered02', [], multimod_compile_fail, ['UnsafeInfered02', ''])
test('UnsafeInfered03', [], multimod_compile_fail, ['UnsafeInfered03', ''])
diff --git a/testsuite/tests/saks/should_compile/T17164.stderr b/testsuite/tests/saks/should_compile/T17164.stderr
index 5b1fdbf0fc..87bcb9b3ff 100644
--- a/testsuite/tests/saks/should_compile/T17164.stderr
+++ b/testsuite/tests/saks/should_compile/T17164.stderr
@@ -1,4 +1,4 @@
-T17164.hs:(12,3)-(14,6): Splicing declarations
+T17164.hs:(12,2)-(14,7): Splicing declarations
[d| type T :: forall k -> k -> Type
type family T :: forall k -> k -> Type |]
diff --git a/testsuite/tests/saks/should_compile/saks027.stderr b/testsuite/tests/saks/should_compile/saks027.stderr
index 730b1cfde6..8a1b5d8057 100644
--- a/testsuite/tests/saks/should_compile/saks027.stderr
+++ b/testsuite/tests/saks/should_compile/saks027.stderr
@@ -1,4 +1,4 @@
-saks027.hs:(8,3)-(10,6): Splicing declarations
+saks027.hs:(8,2)-(10,7): Splicing declarations
[d| type U :: Type
data U = MkU |]
diff --git a/testsuite/tests/th/ClosedFam1TH.stderr b/testsuite/tests/th/ClosedFam1TH.stderr
index 8db375413a..0ffa3428e7 100644
--- a/testsuite/tests/th/ClosedFam1TH.stderr
+++ b/testsuite/tests/th/ClosedFam1TH.stderr
@@ -1,5 +1,5 @@
-ClosedFam1TH.hs:7:3: warning:
+ClosedFam1TH.hs:7:2: warning:
type family Foo_0 a_1 (b_2 :: k_3) where
Foo_0 GHC.Types.Int GHC.Types.Bool = GHC.Types.Int
Foo_0 a_4 GHC.Maybe.Maybe = GHC.Types.Bool
diff --git a/testsuite/tests/th/T10279.stderr b/testsuite/tests/th/T10279.stderr
index d5f7052d05..e71f28795b 100644
--- a/testsuite/tests/th/T10279.stderr
+++ b/testsuite/tests/th/T10279.stderr
@@ -1,5 +1,5 @@
-T10279.hs:10:10: error:
+T10279.hs:10:9: error:
• Failed to load interface for ‘A’
no unit id matching ‘rts-1.0’ was found
(This unit ID looks like the source package ID;
diff --git a/testsuite/tests/th/T10598_TH.stderr b/testsuite/tests/th/T10598_TH.stderr
index 64714211fd..d6c08b0a43 100644
--- a/testsuite/tests/th/T10598_TH.stderr
+++ b/testsuite/tests/th/T10598_TH.stderr
@@ -1,13 +1,10 @@
-T10598_TH.hs:(27,3)-(42,50): Splicing declarations
+T10598_TH.hs:(27,2)-(42,51): Splicing declarations
do fooDataName <- newName "Foo"
mkFooConName <- newName "MkFoo"
let fooType = conT fooDataName
sequence
[newtypeD
- (cxt [])
- fooDataName
- []
- Nothing
+ (cxt []) fooDataName [] Nothing
(normalC
mkFooConName
[bangType
@@ -16,18 +13,15 @@ T10598_TH.hs:(27,3)-(42,50): Splicing declarations
derivClause (Just AnyclassStrategy) [[t| C |]],
derivClause (Just NewtypeStrategy) [[t| Read |]]],
standaloneDerivWithStrategyD
- (Just StockStrategy)
- (cxt [])
+ (Just StockStrategy) (cxt [])
[t| Ord $(fooType) |]
pending(rn) [<splice, fooType>],
standaloneDerivWithStrategyD
- (Just AnyclassStrategy)
- (cxt [])
+ (Just AnyclassStrategy) (cxt [])
[t| D $(fooType) |]
pending(rn) [<splice, fooType>],
standaloneDerivWithStrategyD
- (Just NewtypeStrategy)
- (cxt [])
+ (Just NewtypeStrategy) (cxt [])
[t| Show $(fooType) |]
pending(rn) [<splice, fooType>]]
======>
diff --git a/testsuite/tests/th/T10603.stderr b/testsuite/tests/th/T10603.stderr
index c294e74226..3de6cb057b 100644
--- a/testsuite/tests/th/T10603.stderr
+++ b/testsuite/tests/th/T10603.stderr
@@ -1,4 +1,4 @@
-T10603.hs:5:18-68: Splicing expression
+T10603.hs:5:17-69: Splicing expression
[| case Just 'a' of { Just a -> Just ((\ x -> x) a) } |]
======>
case Just 'a' of { Just a -> Just ((\ x -> x) a) }
diff --git a/testsuite/tests/th/T10638.stderr b/testsuite/tests/th/T10638.stderr
index cc4946a074..582190e688 100644
--- a/testsuite/tests/th/T10638.stderr
+++ b/testsuite/tests/th/T10638.stderr
@@ -1,5 +1,5 @@
-T10638.hs:26:11:
- ‘static test2’ is not a valid C identifier
- When checking declaration:
- foreign import prim safe "static test2" cmm_test2 :: Int# -> Int#
+T10638.hs:26:10: error:
+ • ‘static test2’ is not a valid C identifier
+ • When checking declaration:
+ foreign import prim safe "static test2" cmm_test2 :: Int# -> Int#
diff --git a/testsuite/tests/th/T10796b.stderr b/testsuite/tests/th/T10796b.stderr
index 2491a8c259..7c7b89171b 100644
--- a/testsuite/tests/th/T10796b.stderr
+++ b/testsuite/tests/th/T10796b.stderr
@@ -1,5 +1,5 @@
-T10796b.hs:8:17: error:
+T10796b.hs:8:16: error:
• Can't construct a pattern from name Data.Set.Internal.fromList
• In the untyped splice:
$(dataToPatQ (const Nothing) (fromList "test"))
diff --git a/testsuite/tests/th/T10810.stderr b/testsuite/tests/th/T10810.stderr
index c960fe1941..83e9434cb1 100644
--- a/testsuite/tests/th/T10810.stderr
+++ b/testsuite/tests/th/T10810.stderr
@@ -1,2 +1,2 @@
-T10810.hs:6:3-24: Splicing declarations
+T10810.hs:6:2-25: Splicing declarations
[d| data Foo = (:!) |] ======> data Foo = (:!)
diff --git a/testsuite/tests/th/T10828a.stderr b/testsuite/tests/th/T10828a.stderr
index 9c05b83190..6f2b16465a 100644
--- a/testsuite/tests/th/T10828a.stderr
+++ b/testsuite/tests/th/T10828a.stderr
@@ -1,4 +1,4 @@
-T10828a.hs:9:4:
+T10828a.hs:9:2: error:
Kind signatures are only allowed on GADTs
When splicing a TH declaration: data T a :: * = MkT a a
diff --git a/testsuite/tests/th/T10828b.stderr b/testsuite/tests/th/T10828b.stderr
index bbc57dd3ab..e5f36906f7 100644
--- a/testsuite/tests/th/T10828b.stderr
+++ b/testsuite/tests/th/T10828b.stderr
@@ -1,5 +1,5 @@
-T10828b.hs:9:4:
+T10828b.hs:9:2: error:
Cannot mix GADT constructors with Haskell 98 constructors
When splicing a TH declaration:
data T a :: *
diff --git a/testsuite/tests/th/T11452.stderr b/testsuite/tests/th/T11452.stderr
index e4f1cc604d..0649997ff1 100644
--- a/testsuite/tests/th/T11452.stderr
+++ b/testsuite/tests/th/T11452.stderr
@@ -1,5 +1,5 @@
-T11452.hs:6:14: error:
+T11452.hs:6:12: error:
• Illegal polytype: (forall a. a -> a) -> ()
The type of a Typed Template Haskell expression must not have any quantification.
• In the Template Haskell splice $$([|| \ _ -> () ||])
diff --git a/testsuite/tests/th/T12045TH1.stderr b/testsuite/tests/th/T12045TH1.stderr
index aede24c7a0..2b856434d5 100644
--- a/testsuite/tests/th/T12045TH1.stderr
+++ b/testsuite/tests/th/T12045TH1.stderr
@@ -1,4 +1,4 @@
-T12045TH1.hs:(8,3)-(10,52): Splicing declarations
+T12045TH1.hs:(8,2)-(10,53): Splicing declarations
[d| type family F (a :: k) :: Type where
F @Type Int = Bool
F @(Type -> Type) Maybe = Char |]
@@ -6,13 +6,13 @@ T12045TH1.hs:(8,3)-(10,52): Splicing declarations
type family F (a :: k) :: Type where
F @Type Int = Bool
F @(Type -> Type) Maybe = Char
-T12045TH1.hs:13:3-31: Splicing declarations
+T12045TH1.hs:13:2-32: Splicing declarations
[d| data family D (a :: k) |] ======> data family D (a :: k)
-T12045TH1.hs:15:3-40: Splicing declarations
+T12045TH1.hs:15:2-41: Splicing declarations
[d| data instance D @Type a = DBool |]
======>
data instance D @Type a = DBool
-T12045TH1.hs:17:3-50: Splicing declarations
+T12045TH1.hs:17:2-51: Splicing declarations
[d| data instance D @(Type -> Type) b = DChar |]
======>
data instance D @(Type -> Type) b = DChar
diff --git a/testsuite/tests/th/T12387.stderr b/testsuite/tests/th/T12387.stderr
index 81c2eef5f7..53b8550cdd 100644
--- a/testsuite/tests/th/T12387.stderr
+++ b/testsuite/tests/th/T12387.stderr
@@ -1,4 +1,4 @@
-T12387.hs:8:3: error:
+T12387.hs:8:2: error:
• Class ‘Eq’ does not have a method ‘compare’
• In the instance declaration for ‘Eq Foo’
diff --git a/testsuite/tests/th/T12411.stderr b/testsuite/tests/th/T12411.stderr
index 1f344323bd..65f77d0723 100644
--- a/testsuite/tests/th/T12411.stderr
+++ b/testsuite/tests/th/T12411.stderr
@@ -1,4 +1,8 @@
-T12411.hs:4:1: error:
- Pattern syntax in expression context: pure@Q
- Did you mean to enable TypeApplications?
+T12411.hs:4:6: error:
+ Variable not in scope:
+ (@)
+ :: (a0 -> f0 a0) -> t0 -> Language.Haskell.TH.Lib.Internal.DecsQ
+
+T12411.hs:4:7: error:
+ Data constructor not in scope: Q :: [a1] -> t0
diff --git a/testsuite/tests/th/T12478_4.stderr b/testsuite/tests/th/T12478_4.stderr
index 6a68b3d15a..2cc0d1142d 100644
--- a/testsuite/tests/th/T12478_4.stderr
+++ b/testsuite/tests/th/T12478_4.stderr
@@ -1,5 +1,5 @@
-T12478_4.hs:7:8: error:
+T12478_4.hs:7:7: error:
• Illegal sum arity: 1
Sums must have an arity of at least 2
When splicing a TH type: (# #) GHC.Tuple.()
diff --git a/testsuite/tests/th/T12530.stderr b/testsuite/tests/th/T12530.stderr
index 0ba15360ac..7398b32df1 100644
--- a/testsuite/tests/th/T12530.stderr
+++ b/testsuite/tests/th/T12530.stderr
@@ -1,4 +1,4 @@
-T12530.hs:(8,3)-(15,6): Splicing declarations
+T12530.hs:(8,2)-(15,7): Splicing declarations
[d| f :: Maybe Int -> Maybe Int
f = id @(Maybe Int)
g :: forall a. a
diff --git a/testsuite/tests/th/T13776.stderr b/testsuite/tests/th/T13776.stderr
index 485dc64a28..debcc0bbcd 100644
--- a/testsuite/tests/th/T13776.stderr
+++ b/testsuite/tests/th/T13776.stderr
@@ -1,14 +1,12 @@
-T13776.hs:10:16-42: Splicing type
+T13776.hs:10:15-43: Splicing type
conT ''[] `appT` conT ''Int ======> [] Int
-T13776.hs:7:16-61: Splicing type
+T13776.hs:7:15-62: Splicing type
conT ''(,) `appT` conT ''Int `appT` conT ''Int ======> (,) Int Int
-T13776.hs:14:16-74: Splicing expression
+T13776.hs:14:15-75: Splicing expression
conE '(,) `appE` litE (integerL 1) `appE` litE (integerL 1)
======>
((,) 1) 1
-T13776.hs:17:16-23: Splicing expression
- conE '[] ======> []
-T13776.hs:20:14-61: Splicing pattern
+T13776.hs:17:15-24: Splicing expression conE '[] ======> []
+T13776.hs:20:13-62: Splicing pattern
conP '(,) [litP (integerL 1), litP (integerL 1)] ======> (,) 1 1
-T13776.hs:23:14-24: Splicing pattern
- conP '[] [] ======> []
+T13776.hs:23:13-25: Splicing pattern conP '[] [] ======> []
diff --git a/testsuite/tests/th/T13837.stderr b/testsuite/tests/th/T13837.stderr
index 53700b5a7a..7bb6587ded 100644
--- a/testsuite/tests/th/T13837.stderr
+++ b/testsuite/tests/th/T13837.stderr
@@ -1,5 +1,5 @@
-T13837.hs:9:5: error:
+T13837.hs:9:4: error:
• The exact Name ‘Fam’ is not in scope
Probable cause: you used a unique Template Haskell name (NameU),
perhaps via newName, but did not bind it
diff --git a/testsuite/tests/th/T13856.stderr b/testsuite/tests/th/T13856.stderr
index 141b7a2f69..1d54574253 100644
--- a/testsuite/tests/th/T13856.stderr
+++ b/testsuite/tests/th/T13856.stderr
@@ -1 +1 @@
-T13856.hs:8:7-22: Splicing expression lamE [] [| 42 |] ======> 42
+T13856.hs:8:6-23: Splicing expression lamE [] [| 42 |] ======> 42
diff --git a/testsuite/tests/th/T13968.stderr b/testsuite/tests/th/T13968.stderr
index 2850dae0c5..420e3c6432 100644
--- a/testsuite/tests/th/T13968.stderr
+++ b/testsuite/tests/th/T13968.stderr
@@ -1,3 +1,3 @@
-T13968.hs:6:3: error:
+T13968.hs:6:2: error:
Cannot redefine a Name retrieved by a Template Haskell quote: succ
diff --git a/testsuite/tests/th/T14204.stderr b/testsuite/tests/th/T14204.stderr
index 90150e2050..5a8f57aa58 100644
--- a/testsuite/tests/th/T14204.stderr
+++ b/testsuite/tests/th/T14204.stderr
@@ -1,5 +1,5 @@
-T14204.hs:8:35: error:
+T14204.hs:8:34: error:
• Illegal static expression: static "wat"
Use StaticPointers to enable this extension
• In the untyped splice: $(pure (StaticE (LitE (StringL "wat"))))
diff --git a/testsuite/tests/th/T14646.stderr b/testsuite/tests/th/T14646.stderr
index 869cf6fd01..a8a82b1426 100644
--- a/testsuite/tests/th/T14646.stderr
+++ b/testsuite/tests/th/T14646.stderr
@@ -1,4 +1,4 @@
-T14646.hs:(5,3)-(6,24): Splicing declarations
+T14646.hs:(5,2)-(6,25): Splicing declarations
[d| f :: (forall a. a) -> Int
f _ = undefined |]
======>
diff --git a/testsuite/tests/th/T14681.stderr b/testsuite/tests/th/T14681.stderr
index debb18dee5..0a23fd1473 100644
--- a/testsuite/tests/th/T14681.stderr
+++ b/testsuite/tests/th/T14681.stderr
@@ -1,6 +1,6 @@
-T14681.hs:7:3-31: Splicing declarations
+T14681.hs:7:2-32: Splicing declarations
[d| f = \ (Identity x) -> x |] ======> f = \ (Identity x) -> x
-T14681.hs:(8,3)-(9,62): Splicing declarations
+T14681.hs:(8,2)-(9,63): Splicing declarations
[d| g = $(pure
$ VarE '(+) `AppE` LitE (IntegerL (- 1))
`AppE` (LitE (IntegerL (- 1)))) |]
diff --git a/testsuite/tests/th/T14817.stderr b/testsuite/tests/th/T14817.stderr
index 034c9e3bed..524711c988 100644
--- a/testsuite/tests/th/T14817.stderr
+++ b/testsuite/tests/th/T14817.stderr
@@ -1,4 +1,4 @@
-T14817.hs:(7,3)-(8,34): Splicing declarations
+T14817.hs:(7,2)-(8,35): Splicing declarations
[d| data family Foo :: Type
data instance Foo :: Type |]
diff --git a/testsuite/tests/th/T14869.stderr b/testsuite/tests/th/T14869.stderr
index a2776b8cc8..5361f697e3 100644
--- a/testsuite/tests/th/T14869.stderr
+++ b/testsuite/tests/th/T14869.stderr
@@ -1,17 +1,17 @@
-T14869.hs:19:3-9: Splicing declarations pure [] ======>
-T14869.hs:22:10-42: Splicing expression
+T14869.hs:19:2-10: Splicing declarations pure [] ======>
+T14869.hs:22:9-43: Splicing expression
reify ''Foo1 >>= stringE . pprint
======>
"type family T14869.Foo1 :: *"
-T14869.hs:23:10-42: Splicing expression
+T14869.hs:23:9-43: Splicing expression
reify ''Foo2 >>= stringE . pprint
======>
"type family T14869.Foo2 :: Constraint"
-T14869.hs:24:10-42: Splicing expression
+T14869.hs:24:9-43: Splicing expression
reify ''Foo3 >>= stringE . pprint
======>
"type family T14869.Foo3 :: T14869.MyConstraint"
-T14869.hs:25:10-42: Splicing expression
+T14869.hs:25:9-43: Splicing expression
reify ''Foo4 >>= stringE . pprint
======>
"type family T14869.Foo4 :: *"
diff --git a/testsuite/tests/th/T14875.stderr b/testsuite/tests/th/T14875.stderr
index 09374f243d..e5e54b9558 100644
--- a/testsuite/tests/th/T14875.stderr
+++ b/testsuite/tests/th/T14875.stderr
@@ -1,4 +1,4 @@
-T14875.hs:(5,3)-(14,6): Splicing declarations
+T14875.hs:(5,2)-(14,7): Splicing declarations
[d| f :: Bool -> Bool
f x
= case x of
diff --git a/testsuite/tests/th/T14888.stderr b/testsuite/tests/th/T14888.stderr
index e6d63254e7..4df1e669dc 100644
--- a/testsuite/tests/th/T14888.stderr
+++ b/testsuite/tests/th/T14888.stderr
@@ -1,7 +1,7 @@
-T14888.hs:6:10-30: Splicing type
+T14888.hs:6:9-31: Splicing type
[t| (->) Bool Bool |] ======> Bool -> Bool
-T14888.hs:15:3-11: Splicing declarations return [] ======>
-T14888.hs:18:23-59: Splicing expression
+T14888.hs:15:2-12: Splicing declarations return [] ======>
+T14888.hs:18:22-60: Splicing expression
reify ''Functor' >>= stringE . pprint
======>
"class T14888.Functor' (f_0 :: * -> *)
diff --git a/testsuite/tests/th/T15243.stderr b/testsuite/tests/th/T15243.stderr
index 4e50186c1f..4cf78cacd6 100644
--- a/testsuite/tests/th/T15243.stderr
+++ b/testsuite/tests/th/T15243.stderr
@@ -1,12 +1,12 @@
-T15243.hs:(10,3)-(15,6): Splicing declarations
+T15243.hs:(10,2)-(15,7): Splicing declarations
[d| type family F (a :: k) :: k where
- F 'Unit = 'Unit
- F '(,) = '(,)
+ F 'Unit = 'Unit
+ F '(,) = '(,)
F '[] = '[]
- F '(:) = '(:) |]
+ F '(:) = '(:) |]
======>
type family F (a :: k) :: k where
- F 'Unit = 'Unit
- F '(,) = '(,)
+ F 'Unit = 'Unit
+ F '(,) = '(,)
F '[] = '[]
- F '(:) = '(:)
+ F '(:) = '(:)
diff --git a/testsuite/tests/th/T15270A.stderr b/testsuite/tests/th/T15270A.stderr
index 2eb67f60ba..ba43e4dae8 100644
--- a/testsuite/tests/th/T15270A.stderr
+++ b/testsuite/tests/th/T15270A.stderr
@@ -1,5 +1,5 @@
-T15270A.hs:8:7:
- Illegal data constructor name: ‘id’
+T15270A.hs:8:6: error:
+ • Illegal data constructor name: ‘id’
When splicing a TH expression: GHC.Base.id
- In the untyped splice: $(conE 'id)
+ • In the untyped splice: $(conE 'id)
diff --git a/testsuite/tests/th/T15270B.stderr b/testsuite/tests/th/T15270B.stderr
index 3403d13e2b..8db1dc4b6d 100644
--- a/testsuite/tests/th/T15270B.stderr
+++ b/testsuite/tests/th/T15270B.stderr
@@ -1,5 +1,5 @@
-T15270B.hs:8:7:
- Illegal variable name: ‘Just’
+T15270B.hs:8:6: error:
+ • Illegal variable name: ‘Just’
When splicing a TH expression: GHC.Maybe.Just
- In the untyped splice: $(varE 'Just)
+ • In the untyped splice: $(varE 'Just)
diff --git a/testsuite/tests/th/T15324.stderr b/testsuite/tests/th/T15324.stderr
index 49db9ed8d9..0879fff9d3 100644
--- a/testsuite/tests/th/T15324.stderr
+++ b/testsuite/tests/th/T15324.stderr
@@ -1,4 +1,4 @@
-T15324.hs:(5,3)-(7,6): Splicing declarations
+T15324.hs:(5,2)-(7,7): Splicing declarations
[d| f :: forall a. (Show a => a) -> a
f _ = undefined |]
======>
diff --git a/testsuite/tests/th/T15331.stderr b/testsuite/tests/th/T15331.stderr
index 99bfdfd198..dee7e8c8d0 100644
--- a/testsuite/tests/th/T15331.stderr
+++ b/testsuite/tests/th/T15331.stderr
@@ -1,4 +1,4 @@
-T15331.hs:(7,3)-(9,6): Splicing declarations
+T15331.hs:(7,2)-(9,7): Splicing declarations
[d| f :: Proxy (Int -> Int)
f = Proxy @(Int -> Int) |]
======>
diff --git a/testsuite/tests/th/T15360b.stderr b/testsuite/tests/th/T15360b.stderr
index aa3f6d93de..7bfacf202e 100644
--- a/testsuite/tests/th/T15360b.stderr
+++ b/testsuite/tests/th/T15360b.stderr
@@ -1,20 +1,20 @@
-T15360b.hs:10:14: error:
+T15360b.hs:10:13: error:
• Expected kind ‘* -> k3’, but ‘Type’ has kind ‘*’
• In the first argument of ‘Proxy’, namely ‘(Type Double)’
In the type signature: x :: Proxy (Type Double)
-T15360b.hs:13:14: error:
+T15360b.hs:13:13: error:
• Expected kind ‘* -> k2’, but ‘1’ has kind ‘GHC.Types.Nat’
• In the first argument of ‘Proxy’, namely ‘(1 Int)’
In the type signature: y :: Proxy (1 Int)
-T15360b.hs:16:14: error:
+T15360b.hs:16:13: error:
• Expected kind ‘* -> k1’, but ‘Constraint’ has kind ‘*’
• In the first argument of ‘Proxy’, namely ‘(Constraint Bool)’
In the type signature: z :: Proxy (Constraint Bool)
-T15360b.hs:19:14: error:
+T15360b.hs:19:13: error:
• Expected kind ‘* -> k0’, but ‘'[]’ has kind ‘[a0]’
• In the first argument of ‘Proxy’, namely ‘('[] Int)’
In the type signature: w :: Proxy ('[] Int)
diff --git a/testsuite/tests/th/T15365.stderr b/testsuite/tests/th/T15365.stderr
index 9631319eab..42f9806945 100644
--- a/testsuite/tests/th/T15365.stderr
+++ b/testsuite/tests/th/T15365.stderr
@@ -1,4 +1,4 @@
-T15365.hs:(9,3)-(31,6): Splicing declarations
+T15365.hs:(9,2)-(31,7): Splicing declarations
[d| (&&&) :: Bool -> Bool -> Bool
(&&&) = (&&)
pattern (:!!!) :: Bool
diff --git a/testsuite/tests/th/T15481.stderr b/testsuite/tests/th/T15481.stderr
index 69a8c7b0e7..01e508f498 100644
--- a/testsuite/tests/th/T15481.stderr
+++ b/testsuite/tests/th/T15481.stderr
@@ -1,4 +1,4 @@
-T15481.hs:(7,19)-(10,63): Splicing expression
+T15481.hs:(7,18)-(10,64): Splicing expression
recover
(stringE "reifyFixity failed")
(do foo <- newName "foo"
diff --git a/testsuite/tests/th/T15502.stderr-ws-32 b/testsuite/tests/th/T15502.stderr-ws-32
index ba7b91c4a5..c7ccfd04a5 100644
--- a/testsuite/tests/th/T15502.stderr-ws-32
+++ b/testsuite/tests/th/T15502.stderr-ws-32
@@ -1,4 +1,4 @@
-T15502.hs:7:19-56: Splicing expression
+T15502.hs:7:17-58: Splicing expression
lift (toInteger (maxBound :: Int) + 1) ======> 2147483648
-T15502.hs:8:19-40: Splicing expression
+T15502.hs:8:17-42: Splicing expression
lift (minBound :: Int) ======> (-2147483648)
diff --git a/testsuite/tests/th/T15502.stderr-ws-64 b/testsuite/tests/th/T15502.stderr-ws-64
index 1177799775..ba61ba3d1b 100644
--- a/testsuite/tests/th/T15502.stderr-ws-64
+++ b/testsuite/tests/th/T15502.stderr-ws-64
@@ -1,4 +1,4 @@
-T15502.hs:7:19-56: Splicing expression
+T15502.hs:7:17-58: Splicing expression
lift (toInteger (maxBound :: Int) + 1) ======> 9223372036854775808
-T15502.hs:8:19-40: Splicing expression
+T15502.hs:8:17-42: Splicing expression
lift (minBound :: Int) ======> (-9223372036854775808)
diff --git a/testsuite/tests/th/T15518.stderr b/testsuite/tests/th/T15518.stderr
index 7d9ef293b4..2eee5ccb8e 100644
--- a/testsuite/tests/th/T15518.stderr
+++ b/testsuite/tests/th/T15518.stderr
@@ -1,4 +1,4 @@
-T15518.hs:(5,3)-(8,6): Splicing declarations
+T15518.hs:(5,2)-(8,7): Splicing declarations
[d| f :: Bool -> ()
f = \case
True -> ()
diff --git a/testsuite/tests/th/T15550.stderr b/testsuite/tests/th/T15550.stderr
index 8169d75613..4c64d4a358 100644
--- a/testsuite/tests/th/T15550.stderr
+++ b/testsuite/tests/th/T15550.stderr
@@ -1,4 +1,4 @@
-T15550.hs:(4,3)-(8,6): Splicing declarations
+T15550.hs:(4,2)-(8,7): Splicing declarations
[d| {-# RULES "myId" forall x. myId x = x #-}
myId :: a -> a
diff --git a/testsuite/tests/th/T15572.stderr b/testsuite/tests/th/T15572.stderr
index 27132d69e0..ad077d887a 100644
--- a/testsuite/tests/th/T15572.stderr
+++ b/testsuite/tests/th/T15572.stderr
@@ -1,6 +1,6 @@
-T15572.hs:7:3-33: Splicing declarations
- [d| type AbsoluteUnit1 = '() |] ======> type AbsoluteUnit1 = '()
-T15572.hs:8:3-54: Splicing declarations
+T15572.hs:7:2-34: Splicing declarations
+ [d| type AbsoluteUnit1 = '() |] ======> type AbsoluteUnit1 = '()
+T15572.hs:8:2-55: Splicing declarations
pure [TySynD (mkName "AbsoluteUnit2") [] (ConT '())]
======>
- type AbsoluteUnit2 = '()
+ type AbsoluteUnit2 = '()
diff --git a/testsuite/tests/th/T15738.stderr b/testsuite/tests/th/T15738.stderr
index 57a2db5832..580a02a62e 100644
--- a/testsuite/tests/th/T15738.stderr
+++ b/testsuite/tests/th/T15738.stderr
@@ -1,7 +1,7 @@
f_0 :: (forall a_1 . GHC.Classes.Eq (T15738.Foo a_1)) =>
T15738.Foo x_2 -> T15738.Foo x_2 -> GHC.Types.Bool
f_0 = (GHC.Classes.==)
-T15738.hs:(10,3)-(13,11): Splicing declarations
+T15738.hs:(10,2)-(13,12): Splicing declarations
do d <- [d| f :: (forall a. Eq (Foo a)) => Foo x -> Foo x -> Bool
f = (==) |]
runIO $ hPutStrLn stderr $ pprint d
diff --git a/testsuite/tests/th/T16133.stderr b/testsuite/tests/th/T16133.stderr
index 30dcd3ada0..3901f4d491 100644
--- a/testsuite/tests/th/T16133.stderr
+++ b/testsuite/tests/th/T16133.stderr
@@ -1,8 +1,8 @@
-T16133.hs:10:3: error:
+T16133.hs:10:2: error:
Illegal visible kind application ‘@Type’
Perhaps you intended to use TypeApplications
-T16133.hs:10:3: error:
+T16133.hs:10:2: error:
Illegal visible type application ‘@Int’
Perhaps you intended to use TypeApplications
diff --git a/testsuite/tests/th/T16183.stderr b/testsuite/tests/th/T16183.stderr
index 812fd58ac9..c6951641b3 100644
--- a/testsuite/tests/th/T16183.stderr
+++ b/testsuite/tests/th/T16183.stderr
@@ -1,4 +1,4 @@
-T16183.hs:(7,3)-(11,40): Splicing declarations
+T16183.hs:(7,2)-(11,41): Splicing declarations
[d| type F1 = (Maybe :: Type -> Type) Int
type F2 = (Int :: Type) -> (Int :: Type)
type family F3 a where
diff --git a/testsuite/tests/th/T16326_TH.stderr b/testsuite/tests/th/T16326_TH.stderr
index 8a41fd116d..bf9c20be73 100644
--- a/testsuite/tests/th/T16326_TH.stderr
+++ b/testsuite/tests/th/T16326_TH.stderr
@@ -8,7 +8,7 @@ data Nested_0 :: forall a_1 .
Data.Proxy.Proxy ('(:) a_1
('(:) b_2 ('(:) c_3 ('(:) d_4 ('(:) e_5 '[]))))) ->
*
-T16326_TH.hs:(17,3)-(24,13): Splicing declarations
+T16326_TH.hs:(17,2)-(24,14): Splicing declarations
do info <- reify ''Foo2
liftIO $ hPutStrLn stderr $ pprint info
dec <- [d| data Nested :: forall a.
diff --git a/testsuite/tests/th/T16666.stderr b/testsuite/tests/th/T16666.stderr
index 8264967396..fcacf77076 100644
--- a/testsuite/tests/th/T16666.stderr
+++ b/testsuite/tests/th/T16666.stderr
@@ -1,4 +1,4 @@
-T16666.hs:(9,3)-(11,6): Splicing declarations
+T16666.hs:(9,2)-(11,7): Splicing declarations
[d| class (c => d) => Implies c d
instance (c => d) => Implies c d |]
diff --git a/testsuite/tests/th/T16895a.stderr b/testsuite/tests/th/T16895a.stderr
index d4b98c944a..5a5222eb50 100644
--- a/testsuite/tests/th/T16895a.stderr
+++ b/testsuite/tests/th/T16895a.stderr
@@ -1,5 +1,5 @@
-T16895a.hs:7:16: error:
+T16895a.hs:7:15: error:
• Non-variable expression is not allowed in an infix expression
When splicing a TH expression: 1 `GHC.Base.id GHC.Base.id` 2
• In the untyped splice: $(uInfixE [| 1 |] [| id id |] [| 2 |])
diff --git a/testsuite/tests/th/T16895b.stderr b/testsuite/tests/th/T16895b.stderr
index 8309912f64..597736cad4 100644
--- a/testsuite/tests/th/T16895b.stderr
+++ b/testsuite/tests/th/T16895b.stderr
@@ -1,6 +1,6 @@
-T16895b.hs:7:16:
- Non-variable expression is not allowed in an infix expression
+T16895b.hs:7:15: error:
+ • Non-variable expression is not allowed in an infix expression
When splicing a TH expression: (`GHC.Base.id GHC.Base.id` 2)
- In the untyped splice:
+ • In the untyped splice:
$(infixE Nothing [| id id |] (Just [| 2 |]))
diff --git a/testsuite/tests/th/T16895c.stderr b/testsuite/tests/th/T16895c.stderr
index 38475cce3c..baa5e7526b 100644
--- a/testsuite/tests/th/T16895c.stderr
+++ b/testsuite/tests/th/T16895c.stderr
@@ -1,6 +1,6 @@
-T16895c.hs:7:16:
- Non-variable expression is not allowed in an infix expression
+T16895c.hs:7:15: error:
+ • Non-variable expression is not allowed in an infix expression
When splicing a TH expression: (1 `GHC.Base.id GHC.Base.id`)
- In the untyped splice:
+ • In the untyped splice:
$(infixE (Just [| 1 |]) [| id id |] Nothing)
diff --git a/testsuite/tests/th/T16895d.stderr b/testsuite/tests/th/T16895d.stderr
index 57ba8725ba..2832aee9be 100644
--- a/testsuite/tests/th/T16895d.stderr
+++ b/testsuite/tests/th/T16895d.stderr
@@ -1,6 +1,6 @@
-T16895d.hs:7:16:
- Non-variable expression is not allowed in an infix expression
+T16895d.hs:7:15: error:
+ • Non-variable expression is not allowed in an infix expression
When splicing a TH expression: 1 `GHC.Base.id GHC.Base.id` 2
- In the untyped splice:
+ • In the untyped splice:
$(infixE (Just [| 1 |]) [| (id id) |] (Just [| 2 |]))
diff --git a/testsuite/tests/th/T16895e.stderr b/testsuite/tests/th/T16895e.stderr
index 90884a09da..43d7ac460e 100644
--- a/testsuite/tests/th/T16895e.stderr
+++ b/testsuite/tests/th/T16895e.stderr
@@ -1,5 +1,5 @@
-T16895e.hs:7:16:
- Non-variable expression is not allowed in an infix expression
+T16895e.hs:7:15: error:
+ • Non-variable expression is not allowed in an infix expression
When splicing a TH expression: (`GHC.Base.id GHC.Base.id`)
- In the untyped splice: $(infixE Nothing [| id id |] Nothing)
+ • In the untyped splice: $(infixE Nothing [| id id |] Nothing)
diff --git a/testsuite/tests/th/T17270.hs b/testsuite/tests/th/T17270.hs
new file mode 100644
index 0000000000..72f85dddd6
--- /dev/null
+++ b/testsuite/tests/th/T17270.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE EmptyCase #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeOperators #-}
+{-# OPTIONS_GHC -Wall #-}
+module T17270 where
+
+import Data.Type.Equality
+
+f :: a :~: Int -> b :~: Bool -> a :~: b -> void
+f Refl Refl x = case x of {}
+
+$([d| g :: a :~: Int -> b :~: Bool -> a :~: b -> void
+ g Refl Refl x = case x of {}
+ |])
diff --git a/testsuite/tests/th/T17379a.stderr b/testsuite/tests/th/T17379a.stderr
index ec98c5fb54..feee281ac2 100644
--- a/testsuite/tests/th/T17379a.stderr
+++ b/testsuite/tests/th/T17379a.stderr
@@ -1,4 +1,4 @@
-T17379a.hs:8:3:
+T17379a.hs:8:2: error:
GadtC must have at least one constructor name
When splicing a TH declaration: data T where :: T
diff --git a/testsuite/tests/th/T17379b.stderr b/testsuite/tests/th/T17379b.stderr
index 47410ecdd0..54285bde18 100644
--- a/testsuite/tests/th/T17379b.stderr
+++ b/testsuite/tests/th/T17379b.stderr
@@ -1,4 +1,4 @@
-T17379b.hs:8:3:
+T17379b.hs:8:2: error:
RecGadtC must have at least one constructor name
When splicing a TH declaration: data T where :: {} -> T
diff --git a/testsuite/tests/th/T17380.stderr b/testsuite/tests/th/T17380.stderr
index a2501a4cb4..85724eb549 100644
--- a/testsuite/tests/th/T17380.stderr
+++ b/testsuite/tests/th/T17380.stderr
@@ -5,7 +5,7 @@ T17380.hs:9:7: error:
• In the expression: Just "wat"
In an equation for ‘foo’: foo = Just "wat"
-T17380.hs:12:9: error:
+T17380.hs:12:8: error:
• Couldn't match expected type ‘Maybe String’
with actual type ‘Unit (Maybe [Char])’
• In the expression: Unit Just "wat"
@@ -17,7 +17,7 @@ T17380.hs:15:6: error:
• In the pattern: Just "wat"
In an equation for ‘baz’: baz (Just "wat") = Just "frerf"
-T17380.hs:18:8: error:
+T17380.hs:18:7: error:
• Couldn't match expected type ‘Maybe String’
with actual type ‘Unit (Maybe [Char])’
• In the pattern: Unit(Just "wat")
diff --git a/testsuite/tests/th/T17394.stderr b/testsuite/tests/th/T17394.stderr
index c4ad33a671..b4551f763d 100644
--- a/testsuite/tests/th/T17394.stderr
+++ b/testsuite/tests/th/T17394.stderr
@@ -1,8 +1,8 @@
-T17394.hs:10:13-65: Splicing type
+T17394.hs:10:12-66: Splicing type
infixT (conT ''Maybe) ''(:*:) (conT ''Maybe)
======>
(:*:) Maybe Maybe
-T17394.hs:9:13-67: Splicing type
+T17394.hs:9:12-68: Splicing type
infixT (promotedT 'Nothing) '(:*:) (promotedT 'Nothing)
======>
'(:*:) 'Nothing 'Nothing
diff --git a/testsuite/tests/th/T17461.stderr b/testsuite/tests/th/T17461.stderr
index cc730400bf..f7b9f4b87c 100644
--- a/testsuite/tests/th/T17461.stderr
+++ b/testsuite/tests/th/T17461.stderr
@@ -1,4 +1,4 @@
-T17461.hs:(8,3)-(10,6): Splicing declarations
+T17461.hs:(8,2)-(10,7): Splicing declarations
[d| type (:+:) :: Type -> Type -> Type
type (:+:) = Either |]
diff --git a/testsuite/tests/th/T2597b.stderr b/testsuite/tests/th/T2597b.stderr
index 0e897ccfcb..aba3925113 100644
--- a/testsuite/tests/th/T2597b.stderr
+++ b/testsuite/tests/th/T2597b.stderr
@@ -1,5 +1,5 @@
-T2597b.hs:8:8:
- Empty stmt list in do-block
- When splicing a TH expression: do
- In the untyped splice: $mkBug2
+T2597b.hs:8:9: error:
+ • Empty stmt list in do-block
+ When splicing a TH expression: do
+ • In the untyped splice: $mkBug2
diff --git a/testsuite/tests/th/T2674.stderr b/testsuite/tests/th/T2674.stderr
index 0d9a3826ff..9c7f0baff7 100644
--- a/testsuite/tests/th/T2674.stderr
+++ b/testsuite/tests/th/T2674.stderr
@@ -1,4 +1,4 @@
-T2674.hs:9:3:
+T2674.hs:9:2: error:
Function binding for ‘foo’ has no equations
When splicing a TH declaration:
diff --git a/testsuite/tests/th/T3177a.stderr b/testsuite/tests/th/T3177a.stderr
index d68be6d1fc..a9b8bed980 100644
--- a/testsuite/tests/th/T3177a.stderr
+++ b/testsuite/tests/th/T3177a.stderr
@@ -1,5 +1,5 @@
-T3177a.hs:8:8: error:
+T3177a.hs:8:7: error:
• Expected kind ‘* -> *’, but ‘Int’ has kind ‘*’
• In the type signature: f :: (Int Int)
diff --git a/testsuite/tests/th/T3319.stderr b/testsuite/tests/th/T3319.stderr
index b88b10f90f..7ecaf248cc 100644
--- a/testsuite/tests/th/T3319.stderr
+++ b/testsuite/tests/th/T3319.stderr
@@ -1,4 +1,4 @@
-T3319.hs:8:3-93: Splicing declarations
+T3319.hs:8:2-94: Splicing declarations
return
[ForeignD
(ImportF
diff --git a/testsuite/tests/th/T3395.stderr b/testsuite/tests/th/T3395.stderr
index 3c51176191..a9bcdbedba 100644
--- a/testsuite/tests/th/T3395.stderr
+++ b/testsuite/tests/th/T3395.stderr
@@ -1,11 +1,11 @@
-T3395.hs:6:9:
- Illegal last statement of a list comprehension:
- r1 <- undefined
- (It should be an expression.)
- When splicing a TH expression: [r1 <- undefined | undefined]
- In the untyped splice:
- $(return
- $ CompE
- [NoBindS (VarE $ mkName "undefined"),
- BindS (VarP $ mkName "r1") (VarE $ mkName "undefined")])
+T3395.hs:6:8: error:
+ • Illegal last statement of a list comprehension:
+ r1 <- undefined
+ (It should be an expression.)
+ When splicing a TH expression: [r1 <- undefined | undefined]
+ • In the untyped splice:
+ $(return
+ $ CompE
+ [NoBindS (VarE $ mkName "undefined"),
+ BindS (VarP $ mkName "r1") (VarE $ mkName "undefined")])
diff --git a/testsuite/tests/th/T3600.stderr b/testsuite/tests/th/T3600.stderr
index 4f63ef191a..b0ea19da58 100644
--- a/testsuite/tests/th/T3600.stderr
+++ b/testsuite/tests/th/T3600.stderr
@@ -1,2 +1,2 @@
-T3600.hs:5:3-6: Splicing declarations
+T3600.hs:5:2-7: Splicing declarations
test ======> myFunction = (testFun1 [], testFun2 [], testFun2 "x")
diff --git a/testsuite/tests/th/T3899.stderr b/testsuite/tests/th/T3899.stderr
index 2b4a76a4e5..3c4a707409 100644
--- a/testsuite/tests/th/T3899.stderr
+++ b/testsuite/tests/th/T3899.stderr
@@ -1,2 +1,2 @@
-T3899.hs:6:7-19: Splicing expression
+T3899.hs:6:6-20: Splicing expression
nestedTuple 3 ======> \ (Cons x (Cons x (Cons x Nil))) -> (x, x, x)
diff --git a/testsuite/tests/th/T4436.stderr b/testsuite/tests/th/T4436.stderr
index d87bfc1a2f..f7ed0e12fe 100644
--- a/testsuite/tests/th/T4436.stderr
+++ b/testsuite/tests/th/T4436.stderr
@@ -1,5 +1,5 @@
-T4436.hs:5:7-56: Splicing expression
- return (LitE (StringL "hello/ngoodbye/nand then"))
+T4436.hs:5:6-57: Splicing expression
+ return (LitE (StringL "hello\ngoodbye\nand then"))
======>
"hello
goodbye
diff --git a/testsuite/tests/th/T5217.stderr b/testsuite/tests/th/T5217.stderr
index 30797a8934..04b4d2526d 100644
--- a/testsuite/tests/th/T5217.stderr
+++ b/testsuite/tests/th/T5217.stderr
@@ -1,4 +1,4 @@
-T5217.hs:(6,3)-(9,53): Splicing declarations
+T5217.hs:(6,2)-(9,54): Splicing declarations
[d| data T a b
where
T1 :: Int -> T Int Char
diff --git a/testsuite/tests/th/T5290.stderr b/testsuite/tests/th/T5290.stderr
index 19c962a9a0..f595e55d18 100644
--- a/testsuite/tests/th/T5290.stderr
+++ b/testsuite/tests/th/T5290.stderr
@@ -1,13 +1,9 @@
-T5290.hs:(7,4)-(9,77): Splicing declarations
+T5290.hs:(7,2)-(9,79): Splicing declarations
let n = mkName "T"
in
return
[DataD
- []
- n
- []
- Nothing
- [NormalC n [(Bang SourceUnpack SourceStrict, ConT ''Int)]]
- []]
+ [] n [] Nothing
+ [NormalC n [(Bang SourceUnpack SourceStrict, ConT ''Int)]] []]
======>
data T = T {-# UNPACK #-} !Int
diff --git a/testsuite/tests/th/T5358.stderr b/testsuite/tests/th/T5358.stderr
index cc1df54bed..6561e08032 100644
--- a/testsuite/tests/th/T5358.stderr
+++ b/testsuite/tests/th/T5358.stderr
@@ -34,8 +34,8 @@ T5358.hs:14:12: error:
runTest called error: forall (t_0 :: *) . t_0 -> GHC.Types.Bool
CallStack (from HasCallStack):
error, called at T5358.hs:15:18 in main:T5358
- Code: do VarI _ t _ <- reify (mkName "prop_x1")
- error $ ("runTest called error: " ++ pprint t)
+ Code: (do VarI _ t _ <- reify (mkName "prop_x1")
+ error $ ("runTest called error: " ++ pprint t))
• In the untyped splice:
$(do VarI _ t _ <- reify (mkName "prop_x1")
error $ ("runTest called error: " ++ pprint t))
diff --git a/testsuite/tests/th/T5508.stderr b/testsuite/tests/th/T5508.stderr
index 7000204913..5511ec6134 100644
--- a/testsuite/tests/th/T5508.stderr
+++ b/testsuite/tests/th/T5508.stderr
@@ -1,4 +1,4 @@
-T5508.hs:(7,9)-(9,28): Splicing expression
+T5508.hs:(7,8)-(9,29): Splicing expression
do let x = mkName "x"
v = return (LamE [VarP x] $ VarE x)
[| $v . id |]
diff --git a/testsuite/tests/th/T5700.stderr b/testsuite/tests/th/T5700.stderr
index 3564b8cb2a..4be063203a 100644
--- a/testsuite/tests/th/T5700.stderr
+++ b/testsuite/tests/th/T5700.stderr
@@ -1,4 +1,4 @@
-T5700.hs:8:3-9: Splicing declarations
+T5700.hs:8:2-10: Splicing declarations
mkC ''D
======>
instance C D where
diff --git a/testsuite/tests/th/T5795.stderr b/testsuite/tests/th/T5795.stderr
index 79e9f92d17..95af718c98 100644
--- a/testsuite/tests/th/T5795.stderr
+++ b/testsuite/tests/th/T5795.stderr
@@ -1,6 +1,6 @@
-T5795.hs:9:6:
- GHC stage restriction:
- ‘ty’ is used in a top-level splice, quasi-quote, or annotation,
- and must be imported, not defined locally
- In the untyped splice: $ty
+T5795.hs:9:7: error:
+ • GHC stage restriction:
+ ‘ty’ is used in a top-level splice, quasi-quote, or annotation,
+ and must be imported, not defined locally
+ • In the untyped splice: $ty
diff --git a/testsuite/tests/th/T5883.stderr b/testsuite/tests/th/T5883.stderr
index aa87a41052..04db65b7ed 100644
--- a/testsuite/tests/th/T5883.stderr
+++ b/testsuite/tests/th/T5883.stderr
@@ -1,4 +1,4 @@
-T5883.hs:(7,4)-(12,4): Splicing declarations
+T5883.hs:(7,2)-(12,5): Splicing declarations
[d| data Unit = Unit
instance Show Unit where
diff --git a/testsuite/tests/th/T5971.stderr b/testsuite/tests/th/T5971.stderr
index d48c2255bd..c8164cd1df 100644
--- a/testsuite/tests/th/T5971.stderr
+++ b/testsuite/tests/th/T5971.stderr
@@ -1,7 +1,7 @@
-T5971.hs:6:7:
- The exact Name ‘x’ is not in scope
- Probable cause: you used a unique Template Haskell name (NameU),
- perhaps via newName, but did not bind it
- If that's it, then -ddump-splices might be useful
- In the untyped splice: $(newName "x" >>= varE)
+T5971.hs:6:6: error:
+ • The exact Name ‘x’ is not in scope
+ Probable cause: you used a unique Template Haskell name (NameU),
+ perhaps via newName, but did not bind it
+ If that's it, then -ddump-splices might be useful
+ • In the untyped splice: $(newName "x" >>= varE)
diff --git a/testsuite/tests/th/T5976.stderr b/testsuite/tests/th/T5976.stderr
index f4e9568927..7d815f2b30 100644
--- a/testsuite/tests/th/T5976.stderr
+++ b/testsuite/tests/th/T5976.stderr
@@ -4,4 +4,4 @@ T5976.hs:1:1: error:
bar
CallStack (from HasCallStack):
error, called at T5976.hs:3:21 in main:Main
- Code: error ("foo " ++ error "bar")
+ Code: (error ("foo " ++ error "bar"))
diff --git a/testsuite/tests/th/T5984.stderr b/testsuite/tests/th/T5984.stderr
index 2e612c7e9e..3bd89f1552 100644
--- a/testsuite/tests/th/T5984.stderr
+++ b/testsuite/tests/th/T5984.stderr
@@ -1,8 +1,3 @@
-T5984.hs:7:1-3: Splicing declarations
- nt
- ======>
- newtype Foo = Foo Int
-T5984.hs:8:1-3: Splicing declarations
- dt
- ======>
- data Bar = Bar Int
+T5984.hs:7:2-3: Splicing declarations
+ nt ======> newtype Foo = Foo Int
+T5984.hs:8:2-3: Splicing declarations dt ======> data Bar = Bar Int
diff --git a/testsuite/tests/th/T6018th.stderr b/testsuite/tests/th/T6018th.stderr
index b905fe8bf1..c141bfc44a 100644
--- a/testsuite/tests/th/T6018th.stderr
+++ b/testsuite/tests/th/T6018th.stderr
@@ -1,6 +1,6 @@
-T6018th.hs:98:4: error:
+T6018th.hs:98:2: error:
Type family equation right-hand sides overlap; this violates
the family's injectivity annotation:
- H Int Int Int = Bool -- Defined at T6018th.hs:98:4
- H Int Char Bool = Bool -- Defined at T6018th.hs:98:4
+ H Int Int Int = Bool -- Defined at T6018th.hs:98:2
+ H Int Char Bool = Bool -- Defined at T6018th.hs:98:2
diff --git a/testsuite/tests/th/T7241.stderr b/testsuite/tests/th/T7241.stderr
index 07d17c9da3..1681b45f51 100644
--- a/testsuite/tests/th/T7241.stderr
+++ b/testsuite/tests/th/T7241.stderr
@@ -1,8 +1,8 @@
-T7241.hs:7:3: error:
+T7241.hs:7:2: error:
Same exact name in multiple name-spaces:
- type constructor or class ‘Foo’, declared at: T7241.hs:7:3
- data constructor ‘Foo’, declared at: T7241.hs:7:3
+ type constructor or class ‘Foo’, declared at: T7241.hs:7:2
+ data constructor ‘Foo’, declared at: T7241.hs:7:2
Probable cause: you bound a unique Template Haskell name (NameU),
perhaps via newName, in different name-spaces.
If that's it, then -ddump-splices might be useful
diff --git a/testsuite/tests/th/T7477.stderr b/testsuite/tests/th/T7477.stderr
index f94de686d0..7aee71ea74 100644
--- a/testsuite/tests/th/T7477.stderr
+++ b/testsuite/tests/th/T7477.stderr
@@ -1,3 +1,3 @@
-T7477.hs:10:4: Warning:
+T7477.hs:10:2: warning:
type instance T7477.F GHC.Types.Int = GHC.Types.Bool
diff --git a/testsuite/tests/th/T7484.stderr b/testsuite/tests/th/T7484.stderr
index 3ffe123361..5964a2f73c 100644
--- a/testsuite/tests/th/T7484.stderr
+++ b/testsuite/tests/th/T7484.stderr
@@ -1,4 +1,4 @@
-T7484.hs:7:4:
+T7484.hs:7:2: error:
Illegal variable name: ‘a ’
When splicing a TH declaration: a = 5
diff --git a/testsuite/tests/th/T7532.stderr b/testsuite/tests/th/T7532.stderr
index baaf04f3f5..d807c37db1 100644
--- a/testsuite/tests/th/T7532.stderr
+++ b/testsuite/tests/th/T7532.stderr
@@ -3,7 +3,7 @@
instance C Bool where
data D Bool = T7532.MkD
-T7532.hs:11:3-7: Splicing declarations
+T7532.hs:11:2-8: Splicing declarations
bang'
======>
instance C Int where
diff --git a/testsuite/tests/th/T7667a.stderr b/testsuite/tests/th/T7667a.stderr
index ca8b8f2145..b9807f0e0c 100644
--- a/testsuite/tests/th/T7667a.stderr
+++ b/testsuite/tests/th/T7667a.stderr
@@ -1,5 +1,5 @@
-T7667a.hs:8:12:
- Illegal variable name: ‘False’
- When splicing a TH expression: False
- In the untyped splice: $(return $ VarE (mkName "False"))
+T7667a.hs:8:10: error:
+ • Illegal variable name: ‘False’
+ When splicing a TH expression: False
+ • In the untyped splice: $(return $ VarE (mkName "False"))
diff --git a/testsuite/tests/th/T8412.stderr b/testsuite/tests/th/T8412.stderr
index 82b6116649..9e69b8e880 100644
--- a/testsuite/tests/th/T8412.stderr
+++ b/testsuite/tests/th/T8412.stderr
@@ -1,4 +1,4 @@
-T8412.hs:5:12:
- Illegal literal in type (type literals must not be negative): -1
- In the untyped splice: $(return $ LitT $ NumTyLit (- 1))
+T8412.hs:5:11: error:
+ • Illegal literal in type (type literals must not be negative): -1
+ • In the untyped splice: $(return $ LitT $ NumTyLit (- 1))
diff --git a/testsuite/tests/th/T8577.stderr b/testsuite/tests/th/T8577.stderr
index 1a0fb75bd1..b6ff05a0a4 100644
--- a/testsuite/tests/th/T8577.stderr
+++ b/testsuite/tests/th/T8577.stderr
@@ -1,8 +1,8 @@
T8577.hs:9:11: error:
- Couldn't match type ‘Int’ with ‘Bool’
- Expected type: Q (TExp (A Bool))
- Actual type: Q (TExp (A Int))
- In the expression: y
- In the Template Haskell splice $$(y)
- In the expression: $$(y)
+ • Couldn't match type ‘Int’ with ‘Bool’
+ Expected type: Q (TExp (A Bool))
+ Actual type: Q (TExp (A Int))
+ • In the expression: y
+ In the Template Haskell splice $$(y)
+ In the expression: $$(y)
diff --git a/testsuite/tests/th/T8624.stdout b/testsuite/tests/th/T8624.stdout
index 0dcc7b0718..6286ee26d2 100644
--- a/testsuite/tests/th/T8624.stdout
+++ b/testsuite/tests/th/T8624.stdout
@@ -1,2 +1,2 @@
--- T8624.hs:(7,3)-(8,43): Splicing declarations
+-- T8624.hs:(7,2)-(8,44): Splicing declarations
data THDec = THDec
diff --git a/testsuite/tests/th/T8759.stderr b/testsuite/tests/th/T8759.stderr
index b980c00293..d3cde8b0a8 100644
--- a/testsuite/tests/th/T8759.stderr
+++ b/testsuite/tests/th/T8759.stderr
@@ -1,3 +1,3 @@
-T8759.hs:9:4: warning:
+T8759.hs:9:2: warning:
PatSynI T8759.P (ForallT [] [] (ForallT [] [] (TupleT 0)))
diff --git a/testsuite/tests/th/T8932.stderr b/testsuite/tests/th/T8932.stderr
index 96e5d8a9fc..4dbbfe620a 100644
--- a/testsuite/tests/th/T8932.stderr
+++ b/testsuite/tests/th/T8932.stderr
@@ -1,5 +1,5 @@
T8932.hs:11:1: error:
Multiple declarations of ‘foo’
- Declared at: T8932.hs:5:3
+ Declared at: T8932.hs:5:2
T8932.hs:11:1
diff --git a/testsuite/tests/th/T8987.stderr b/testsuite/tests/th/T8987.stderr
index 7b5f400f6f..00181fa2db 100644
--- a/testsuite/tests/th/T8987.stderr
+++ b/testsuite/tests/th/T8987.stderr
@@ -5,4 +5,4 @@ T8987.hs:1:1: error:
CallStack (from HasCallStack):
error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err
undefined, called at T8987.hs:6:23 in main:T8987
- Code: reportWarning ['1', undefined] >> return []
+ Code: (reportWarning ['1', undefined] >> return [])
diff --git a/testsuite/tests/th/TH_1tuple.stderr b/testsuite/tests/th/TH_1tuple.stderr
index 3acb218b6e..07b6584242 100644
--- a/testsuite/tests/th/TH_1tuple.stderr
+++ b/testsuite/tests/th/TH_1tuple.stderr
@@ -1,5 +1,5 @@
-TH_1tuple.hs:11:7: error:
+TH_1tuple.hs:11:6: error:
• Expecting one more argument to ‘Unit’
Expected a type, but ‘Unit’ has kind ‘* -> *’
• In an expression type signature: Unit
diff --git a/testsuite/tests/th/TH_Promoted1Tuple.stderr b/testsuite/tests/th/TH_Promoted1Tuple.stderr
index 495fb1c386..d75a6260fa 100644
--- a/testsuite/tests/th/TH_Promoted1Tuple.stderr
+++ b/testsuite/tests/th/TH_Promoted1Tuple.stderr
@@ -1,3 +1,3 @@
-TH_Promoted1Tuple.hs:7:3: error:
+TH_Promoted1Tuple.hs:7:2: error:
Illegal type: ‘'Unit Int’ Perhaps you intended to use DataKinds
diff --git a/testsuite/tests/th/TH_PromotedList.stderr b/testsuite/tests/th/TH_PromotedList.stderr
index fde888ff88..d3eba9ac0e 100644
--- a/testsuite/tests/th/TH_PromotedList.stderr
+++ b/testsuite/tests/th/TH_PromotedList.stderr
@@ -1,3 +1,3 @@
-TH_PromotedList.hs:11:3: warning:
+TH_PromotedList.hs:11:2: warning:
'(:) GHC.Types.Int ('(:) GHC.Types.Bool '[])
diff --git a/testsuite/tests/th/TH_PromotedTuple.stderr b/testsuite/tests/th/TH_PromotedTuple.stderr
index 92792a361d..29b60f08fd 100644
--- a/testsuite/tests/th/TH_PromotedTuple.stderr
+++ b/testsuite/tests/th/TH_PromotedTuple.stderr
@@ -1,9 +1,9 @@
-TH_PromotedTuple.hs:(14,32)-(16,43): Splicing type
+TH_PromotedTuple.hs:(14,31)-(16,44): Splicing type
do ty <- [t| '(Int, False) |]
reportWarning (show ty)
return ty
======>
- '(Int, 'False)
+ '(Int, 'False)
-TH_PromotedTuple.hs:14:32: warning:
+TH_PromotedTuple.hs:14:31: warning:
AppT (AppT (PromotedTupleT 2) (ConT GHC.Types.Int)) (PromotedT GHC.Types.False)
diff --git a/testsuite/tests/th/TH_RichKinds.stderr b/testsuite/tests/th/TH_RichKinds.stderr
index eb402902ac..920e424e52 100644
--- a/testsuite/tests/th/TH_RichKinds.stderr
+++ b/testsuite/tests/th/TH_RichKinds.stderr
@@ -1,9 +1,9 @@
-TH_RichKinds.hs:12:3: warning:
+TH_RichKinds.hs:12:2: warning:
forall a_0 . (a_0 :: GHC.Types.Bool)
forall a_1 . (a_1 :: Constraint)
forall a_2 . (a_2 :: [*])
forall a_3 . (a_3 :: (*, GHC.Types.Bool))
forall a_4 . (a_4 :: ())
-forall a_5 . (a_5 :: (* -> GHC.Types.Bool) ->
- (*, * -> *) -> GHC.Types.Bool)
+forall a_5 .
+(a_5 :: (* -> GHC.Types.Bool) -> (*, * -> *) -> GHC.Types.Bool)
diff --git a/testsuite/tests/th/TH_RichKinds2.stderr b/testsuite/tests/th/TH_RichKinds2.stderr
index a0b29a15e3..ae842d43a6 100644
--- a/testsuite/tests/th/TH_RichKinds2.stderr
+++ b/testsuite/tests/th/TH_RichKinds2.stderr
@@ -1,5 +1,5 @@
-TH_RichKinds2.hs:25:4: warning:
+TH_RichKinds2.hs:25:2: warning:
data SMaybe_0 :: (k_0 -> *) -> GHC.Maybe.Maybe k_0 -> * where
SNothing_2 :: SMaybe_0 s_3 'GHC.Maybe.Nothing
SJust_4 :: (s_5 a_6) -> SMaybe_0 s_5 ('GHC.Maybe.Just a_6)
diff --git a/testsuite/tests/th/TH_Roles1.stderr b/testsuite/tests/th/TH_Roles1.stderr
index 952b3317ce..2b665852ca 100644
--- a/testsuite/tests/th/TH_Roles1.stderr
+++ b/testsuite/tests/th/TH_Roles1.stderr
@@ -1,5 +1,5 @@
-TH_Roles1.hs:7:4:
- Illegal role annotation for T;
- did you intend to use RoleAnnotations?
- while checking a role annotation for ‘T’
+TH_Roles1.hs:7:2: error:
+ • Illegal role annotation for T;
+ did you intend to use RoleAnnotations?
+ • while checking a role annotation for ‘T’
diff --git a/testsuite/tests/th/TH_StaticPointers02.stderr b/testsuite/tests/th/TH_StaticPointers02.stderr
index e6f6963434..a89ad11b0d 100644
--- a/testsuite/tests/th/TH_StaticPointers02.stderr
+++ b/testsuite/tests/th/TH_StaticPointers02.stderr
@@ -1,12 +1,12 @@
-TH_StaticPointers02.hs:11:34:
- static forms cannot be used in splices: static 'a'
- In the untyped splice:
- $(case staticKey (static 'a') of {
- Fingerprint w0 w1
- -> let
- w0i = ...
- ....
- in
- [| fmap (\ p -> ...) $ unsafeLookupStaticPtr
- $ Fingerprint (fromIntegral w0i) (fromIntegral w1i) |] })
+TH_StaticPointers02.hs:11:34: error:
+ • static forms cannot be used in splices: static 'a'
+ • In the untyped splice:
+ $(case staticKey (static 'a') of {
+ Fingerprint w0 w1
+ -> let
+ w0i = ...
+ w1i = ...
+ in
+ [| fmap (\ p -> deRefStaticPtr p :: Char) $ unsafeLookupStaticPtr
+ $ Fingerprint (fromIntegral w0i) (fromIntegral w1i) |] })
diff --git a/testsuite/tests/th/TH_TyInstWhere1.stderr b/testsuite/tests/th/TH_TyInstWhere1.stderr
index 0d07db83d1..4f5d278afd 100644
--- a/testsuite/tests/th/TH_TyInstWhere1.stderr
+++ b/testsuite/tests/th/TH_TyInstWhere1.stderr
@@ -1,8 +1,8 @@
-TH_TyInstWhere1.hs:(5,3)-(7,24): Splicing declarations
+TH_TyInstWhere1.hs:(5,2)-(7,25): Splicing declarations
[d| type family F (a :: k) (b :: k) :: Bool where
F a a = True
F a b = False |]
======>
type family F (a :: k) (b :: k) :: Bool where
- F a a = 'True
- F a b = 'False
+ F a a = 'True
+ F a b = 'False
diff --git a/testsuite/tests/th/TH_TyInstWhere2.stderr b/testsuite/tests/th/TH_TyInstWhere2.stderr
index 717fb0e170..c79af948a6 100644
--- a/testsuite/tests/th/TH_TyInstWhere2.stderr
+++ b/testsuite/tests/th/TH_TyInstWhere2.stderr
@@ -1,10 +1,10 @@
-TH_TyInstWhere2.hs:8:4: warning:
+TH_TyInstWhere2.hs:8:2: warning:
type family F_0 (a_1 :: k_2) (b_3 :: k_2) :: GHC.Types.Bool where
F_0 a_4 a_4 = 'GHC.Types.True
F_0 a_5 b_6 = 'GHC.Types.False
-TH_TyInstWhere2.hs:14:4: warning:
+TH_TyInstWhere2.hs:14:2: warning:
type family F1_0 (a_1 :: k_2) :: * where
F1_0 @* GHC.Types.Int = GHC.Types.Bool
F1_0 @GHC.Types.Bool 'GHC.Types.False = GHC.Types.Char
diff --git a/testsuite/tests/th/TH_dupdecl.stderr b/testsuite/tests/th/TH_dupdecl.stderr
index e08af85233..c44ba63098 100644
--- a/testsuite/tests/th/TH_dupdecl.stderr
+++ b/testsuite/tests/th/TH_dupdecl.stderr
@@ -1,5 +1,5 @@
-TH_dupdecl.hs:10:4:
+TH_dupdecl.hs:10:2: error:
Multiple declarations of ‘x’
- Declared at: TH_dupdecl.hs:8:4
- TH_dupdecl.hs:10:4
+ Declared at: TH_dupdecl.hs:8:2
+ TH_dupdecl.hs:10:2
diff --git a/testsuite/tests/th/TH_exn1.stderr b/testsuite/tests/th/TH_exn1.stderr
index 63548613d8..69c854e244 100644
--- a/testsuite/tests/th/TH_exn1.stderr
+++ b/testsuite/tests/th/TH_exn1.stderr
@@ -1,6 +1,6 @@
-TH_exn1.hs:1:1:
+TH_exn1.hs:1:1: error:
Exception when trying to run compile-time code:
TH_exn1.hs:(9,4)-(10,23): Non-exhaustive patterns in case
- Code: case reverse "no" of { [] -> return [] }
+ Code: (case reverse "no" of { [] -> return [] })
diff --git a/testsuite/tests/th/TH_exn2.stderr b/testsuite/tests/th/TH_exn2.stderr
index 3ccc9e1c0c..582928c08b 100644
--- a/testsuite/tests/th/TH_exn2.stderr
+++ b/testsuite/tests/th/TH_exn2.stderr
@@ -2,5 +2,5 @@
TH_exn2.hs:1:1: error:
Exception when trying to run compile-time code:
Prelude.tail: empty list
- Code: do ds <- [d| |]
- return (tail ds)
+ Code: (do ds <- [d| |]
+ return (tail ds))
diff --git a/testsuite/tests/th/TH_fail.stderr b/testsuite/tests/th/TH_fail.stderr
index b73acbbb22..6df144dae4 100644
--- a/testsuite/tests/th/TH_fail.stderr
+++ b/testsuite/tests/th/TH_fail.stderr
@@ -1,2 +1,2 @@
-TH_fail.hs:7:4: Code not written yet...
+TH_fail.hs:7:2: error: Code not written yet...
diff --git a/testsuite/tests/th/TH_foreignCallingConventions.stderr b/testsuite/tests/th/TH_foreignCallingConventions.stderr
index dae994539d..df09310652 100644
--- a/testsuite/tests/th/TH_foreignCallingConventions.stderr
+++ b/testsuite/tests/th/TH_foreignCallingConventions.stderr
@@ -8,20 +8,20 @@ foreign import stdcall safe "bay" bay :: (GHC.Types.Int ->
GHC.Types.IO GHC.Types.Int
foreign import javascript unsafe "bax" bax :: GHC.Ptr.Ptr GHC.Types.Int ->
GHC.Types.IO GHC.Base.String
-TH_foreignCallingConventions.hs:(13,4)-(23,25): Splicing declarations
+TH_foreignCallingConventions.hs:(13,2)-(24,2): Splicing declarations
do let fi cconv safety lbl name ty
= ForeignD (ImportF cconv safety lbl name ty)
dec1 <- fi CCall Interruptible "&" (mkName "foo") <$> [t| Ptr () |]
dec2 <- fi Prim Safe "bar" (mkName "bar") <$> [t| Int# -> Int# |]
dec3 <- fi CApi Unsafe "baz" (mkName "baz")
- <$> [t| Double -> IO () |]
+ <$> [t| Double -> IO () |]
dec4 <- fi StdCall Safe "bay" (mkName "bay")
- <$> [t| (Int -> Bool) -> IO Int |]
+ <$> [t| (Int -> Bool) -> IO Int |]
dec5 <- fi JavaScript Unsafe "bax" (mkName "bax")
- <$> [t| Ptr Int -> IO String |]
+ <$> [t| Ptr Int -> IO String |]
runIO
- $ mapM_ (putStrLn . pprint) [dec1, dec2, dec3, dec4, dec5]
- >> hFlush stdout
+ $ mapM_ (putStrLn . pprint) [dec1, dec2, dec3, dec4, dec5]
+ >> hFlush stdout
return [dec1, dec2]
======>
foreign import ccall interruptible "&" foo :: Ptr ()
diff --git a/testsuite/tests/th/TH_foreignInterruptible.stderr b/testsuite/tests/th/TH_foreignInterruptible.stderr
index 4afc38aab1..28440eb8f0 100644
--- a/testsuite/tests/th/TH_foreignInterruptible.stderr
+++ b/testsuite/tests/th/TH_foreignInterruptible.stderr
@@ -1,11 +1,8 @@
-TH_foreignInterruptible.hs:8:3-100: Splicing declarations
+TH_foreignInterruptible.hs:8:2-101: Splicing declarations
return
[ForeignD
(ImportF
- CCall
- Interruptible
- "&"
- (mkName "foo")
+ CCall Interruptible "&" (mkName "foo")
(AppT (ConT ''Ptr) (ConT ''())))]
======>
foreign import ccall interruptible "&" foo :: Ptr ()
diff --git a/testsuite/tests/th/TH_genEx.stderr b/testsuite/tests/th/TH_genEx.stderr
index 8f2d5926e9..2c4c51c26c 100644
--- a/testsuite/tests/th/TH_genEx.stderr
+++ b/testsuite/tests/th/TH_genEx.stderr
@@ -1,5 +1,5 @@
-TH_genEx.hs:13:3-30: Splicing declarations
+TH_genEx.hs:13:2-31: Splicing declarations
genAny (reify ''MyInterface)
======>
data AnyMyInterface1111
- = forall a. MyInterface a => AnyMyInterface1111 a
+ = forall a. MyInterface a => AnyMyInterface1111 a
diff --git a/testsuite/tests/th/TH_implicitParamsErr1.stderr b/testsuite/tests/th/TH_implicitParamsErr1.stderr
index 82324810ad..56acdfdabb 100644
--- a/testsuite/tests/th/TH_implicitParamsErr1.stderr
+++ b/testsuite/tests/th/TH_implicitParamsErr1.stderr
@@ -1,4 +1,4 @@
-TH_implicitParamsErr1.hs:5:3: error:
+TH_implicitParamsErr1.hs:5:2: error:
Implicit parameter binding only allowed in let or where
When splicing a TH declaration: ?x = 1
diff --git a/testsuite/tests/th/TH_implicitParamsErr2.stderr b/testsuite/tests/th/TH_implicitParamsErr2.stderr
index f93aa55a58..faa2a9e90b 100644
--- a/testsuite/tests/th/TH_implicitParamsErr2.stderr
+++ b/testsuite/tests/th/TH_implicitParamsErr2.stderr
@@ -1,5 +1,5 @@
-TH_implicitParamsErr2.hs:5:10: error:
+TH_implicitParamsErr2.hs:5:9: error:
• Implicit parameters mixed with other bindings
When splicing a TH expression: let {?x = 1; y = 2}
in y
diff --git a/testsuite/tests/th/TH_implicitParamsErr3.stderr b/testsuite/tests/th/TH_implicitParamsErr3.stderr
index fe3bf67259..a83ead7a0a 100644
--- a/testsuite/tests/th/TH_implicitParamsErr3.stderr
+++ b/testsuite/tests/th/TH_implicitParamsErr3.stderr
@@ -1,5 +1,5 @@
-TH_implicitParamsErr3.hs:5:16: error:
+TH_implicitParamsErr3.hs:5:15: error:
• Illegal variable name: ‘invalid name’
When splicing a TH expression:
let ?invalid name = "hi"
diff --git a/testsuite/tests/th/TH_invalid_add_top_decl.stderr b/testsuite/tests/th/TH_invalid_add_top_decl.stderr
index 9124c2d669..0e8f6b66c2 100644
--- a/testsuite/tests/th/TH_invalid_add_top_decl.stderr
+++ b/testsuite/tests/th/TH_invalid_add_top_decl.stderr
@@ -1,5 +1,5 @@
-TH_invalid_add_top_decl.hs:5:3:
+TH_invalid_add_top_decl.hs:5:2: error:
Error in a declaration passed to addTopDecls:
Empty stmt list in do-block
When splicing a TH declaration: emptyDo = do
diff --git a/testsuite/tests/th/TH_pragma.stderr b/testsuite/tests/th/TH_pragma.stderr
index 1156adee27..0baf21c564 100644
--- a/testsuite/tests/th/TH_pragma.stderr
+++ b/testsuite/tests/th/TH_pragma.stderr
@@ -1,4 +1,4 @@
-TH_pragma.hs:(6,4)-(8,26): Splicing declarations
+TH_pragma.hs:(6,2)-(8,28): Splicing declarations
[d| foo :: Int -> Int
{-# NOINLINE foo #-}
foo x = x + 1 |]
@@ -6,7 +6,7 @@ TH_pragma.hs:(6,4)-(8,26): Splicing declarations
foo :: Int -> Int
{-# NOINLINE foo #-}
foo x = (x + 1)
-TH_pragma.hs:(10,4)-(12,31): Splicing declarations
+TH_pragma.hs:(10,2)-(12,33): Splicing declarations
[d| bar :: Num a => a -> a
{-# SPECIALISE INLINE [~1] bar :: Float -> Float #-}
bar x = x * 10 |]
diff --git a/testsuite/tests/th/TH_recover_warns.stderr b/testsuite/tests/th/TH_recover_warns.stderr
index c92ee71bc9..24bfb76f1d 100644
--- a/testsuite/tests/th/TH_recover_warns.stderr
+++ b/testsuite/tests/th/TH_recover_warns.stderr
@@ -1,10 +1,10 @@
-TH_recover_warns.hs:(9,19)-(10,63): Splicing expression
+TH_recover_warns.hs:(9,18)-(10,64): Splicing expression
recover
(stringE "splice failed") [| let x = "a" in let x = "b" in x |]
======>
let x = "a" in let x = "b" in x
-TH_recover_warns.hs:9:19: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
+TH_recover_warns.hs:9:18: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
Defined but not used: ‘x’
TH_recover_warns.hs:10:34: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
diff --git a/testsuite/tests/th/TH_repUnboxedTuples.stderr b/testsuite/tests/th/TH_repUnboxedTuples.stderr
index 8439b12547..3687b77a0e 100644
--- a/testsuite/tests/th/TH_repUnboxedTuples.stderr
+++ b/testsuite/tests/th/TH_repUnboxedTuples.stderr
@@ -3,11 +3,3 @@ case (# 'b', GHC.Types.False #) of
(# 'a', GHC.Types.True #) -> (# "One", 1 #)
(# 'b', GHC.Types.False #) -> (# "Two", 2 #)
(# _, _ #) -> (# "Three", 3 #)
-
-TH_repUnboxedTuples.hs:18:13: warning: [-Woverlapping-patterns (in -Wdefault)]
- Pattern match is redundant
- In a case alternative: (# 'a', True #) -> ...
-
-TH_repUnboxedTuples.hs:18:13: warning: [-Woverlapping-patterns (in -Wdefault)]
- Pattern match is redundant
- In a case alternative: (# _, _ #) -> ...
diff --git a/testsuite/tests/th/TH_runIO.stderr b/testsuite/tests/th/TH_runIO.stderr
index 5d5a4f2efc..50af621620 100644
--- a/testsuite/tests/th/TH_runIO.stderr
+++ b/testsuite/tests/th/TH_runIO.stderr
@@ -1,6 +1,6 @@
-TH_runIO.hs:12:7:
- Exception when trying to run compile-time code:
- user error (hi)
- Code: runIO (fail "hi")
- In the untyped splice: $(runIO (fail "hi"))
+TH_runIO.hs:12:7: error:
+ • Exception when trying to run compile-time code:
+ user error (hi)
+ Code: (runIO (fail "hi"))
+ • In the untyped splice: $(runIO (fail "hi"))
diff --git a/testsuite/tests/th/TH_spliceD1.stderr b/testsuite/tests/th/TH_spliceD1.stderr
index 9e6fb5013a..77ae873562 100644
--- a/testsuite/tests/th/TH_spliceD1.stderr
+++ b/testsuite/tests/th/TH_spliceD1.stderr
@@ -1,6 +1,6 @@
-TH_spliceD1.hs:10:3:
- Conflicting definitions for ‘c’
- Bound at: TH_spliceD1.hs:10:3-5
- TH_spliceD1.hs:10:3-5
- In an equation for ‘f’
+TH_spliceD1.hs:10:2: error:
+ • Conflicting definitions for ‘c’
+ Bound at: TH_spliceD1.hs:10:2-6
+ TH_spliceD1.hs:10:2-6
+ • In an equation for ‘f’
diff --git a/testsuite/tests/th/TH_unresolvedInfix2.stderr b/testsuite/tests/th/TH_unresolvedInfix2.stderr
index 4a5577f6fc..50d56a02ff 100644
--- a/testsuite/tests/th/TH_unresolvedInfix2.stderr
+++ b/testsuite/tests/th/TH_unresolvedInfix2.stderr
@@ -1,11 +1,11 @@
-TH_unresolvedInfix2.hs:14:11:
- The operator ‘:+’ [infixl 6] of a section
- must have lower precedence than that of the operand,
- namely ‘:+’ [infixl 6]
- in the section: ‘:+ N :+ N’
- In the untyped splice:
- $(let
- plus = conE '(:+)
- n = conE 'N
- in infixE Nothing plus (Just $ uInfixE n plus n))
+TH_unresolvedInfix2.hs:14:9: error:
+ • The operator ‘:+’ [infixl 6] of a section
+ must have lower precedence than that of the operand,
+ namely ‘:+’ [infixl 6]
+ in the section: ‘:+ N :+ N’
+ • In the untyped splice:
+ $(let
+ plus = conE '(:+)
+ n = conE 'N
+ in infixE Nothing plus (Just $ uInfixE n plus n))
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index b63b0ceb01..9e07d5035b 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -486,6 +486,8 @@ test('T16976f', normal, compile_fail, [''])
test('T16976z', normal, compile_fail, [''])
test('T16980', normal, compile, [''])
test('T16980a', normal, compile_fail, [''])
+test('T17270a', extra_files(['T17270.hs']), multimod_compile, ['T17270', '-v0'])
+test('T17270b', extra_files(['T17270.hs']), multimod_compile, ['T17270', '-fenable-th-splice-warnings -v0'])
test('T17296', normal, compile, ['-v0'])
test('T17380', normal, compile_fail, [''])
test('T17394', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
diff --git a/testsuite/tests/typecheck/should_compile/tc163.hs b/testsuite/tests/typecheck/should_compile/tc163.hs
index 21d8a72949..fb8682bc22 100644
--- a/testsuite/tests/typecheck/should_compile/tc163.hs
+++ b/testsuite/tests/typecheck/should_compile/tc163.hs
@@ -24,7 +24,7 @@ flop = \m' k -> mkM3' m' (\bm k1 -> error "urk")
-- But if we give mkM3' the type
-- forall a r. M3' a -> (forall b. ...) -> r
--- everthing works fine. Very very delicate.
+-- everything works fine. Very very delicate.
---------------- A more complex case -------------
bind :: M3 a -> (a -> M3 b) -> M3 b
diff --git a/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs b/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs
index 566f8aa102..982d7e596c 100644
--- a/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs
+++ b/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs
@@ -55,7 +55,7 @@ newtype Sorted (cpu :: AsympPoly) -- The minimum operational complexity
-- Merge sort is O(N*Log(N)) on average in complexity, so that's the
-- minimum complexity we promise to satisfy. Same goes with memory, which is
--- O(N), and as we all know, mergesort is a stable sorting algoritm.
+-- O(N), and as we all know, mergesort is a stable sorting algorithm.
mergeSort :: (Ord a, n >=. O(N*.LogN), m >=. O(N), IsStable s) =>
[a] -> Sorted n m s a
mergeSort = Sorted . sort
diff --git a/testsuite/tests/typecheck/should_fail/T14761b.stderr b/testsuite/tests/typecheck/should_fail/T14761b.stderr
index 08a319cde3..af557c4725 100644
--- a/testsuite/tests/typecheck/should_fail/T14761b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T14761b.stderr
@@ -1,5 +1,2 @@
-T14761b.hs:5:21: error:
- Strictness annotation applied to a compound type.
- Did you mean to add parentheses?
- !(Maybe Int)
+T14761b.hs:5:19: error: Operator applied to too few arguments: !
diff --git a/testsuite/tests/typecheck/should_fail/T15527.stderr b/testsuite/tests/typecheck/should_fail/T15527.stderr
index dd03a0a0ca..2b764caef9 100644
--- a/testsuite/tests/typecheck/should_fail/T15527.stderr
+++ b/testsuite/tests/typecheck/should_fail/T15527.stderr
@@ -1,4 +1,8 @@
-T15527.hs:4:6: error:
- Pattern syntax in expression context: (.)@Int
- Did you mean to enable TypeApplications?
+T15527.hs:4:10: error:
+ Variable not in scope:
+ (@)
+ :: ((b0 -> c0) -> (a0 -> b0) -> a0 -> c0)
+ -> t0 -> (Int -> Int) -> (Int -> Int) -> Int -> Int
+
+T15527.hs:4:11: error: Data constructor not in scope: Int
diff --git a/testsuite/tests/typecheck/should_fail/T7210.stderr b/testsuite/tests/typecheck/should_fail/T7210.stderr
index 4d7cb38a4d..d0ca04a84e 100644
--- a/testsuite/tests/typecheck/should_fail/T7210.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7210.stderr
@@ -1,5 +1,7 @@
-T7210.hs:5:20: error:
- Strictness annotation applied to a compound type.
- Did you mean to add parentheses?
- !(IntMap Int)
+T7210.hs:5:19: error:
+ • Unexpected strictness annotation: !IntMap
+ strictness annotation cannot appear nested inside a type
+ • In the type ‘!IntMap Int’
+ In the definition of data constructor ‘C’
+ In the data declaration for ‘T’
diff --git a/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs b/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs
index 83b147e413..7c92fa9ab0 100644
--- a/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs
+++ b/testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs
@@ -441,7 +441,7 @@ mkPrimCon dt str cr = Constr
{ datatype = dt
, conrep = cr
, constring = str
- , confields = error $ concat ["constrFields : ", (tycon dt), " is primative"]
+ , confields = error $ concat ["constrFields : ", (tycon dt), " is primitive"]
, confixity = error "constrFixity"
}