summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAlejandro Serrano <trupill@gmail.com>2015-07-27 17:05:10 +0200
committerAlejandro Serrano <trupill@gmail.com>2015-07-27 17:05:10 +0200
commita87bb2b35a9af784de688fe50cc2daea3090f5de (patch)
treed240e225f7a0754f58302f25f79cecb409981775 /testsuite
parent6b05f0c574a5067cbd6db5909e34d66c3512aa8f (diff)
parent474d4ccc6e4a3bea93be16cb7daef6ffcdf9b663 (diff)
downloadhaskell-a87bb2b35a9af784de688fe50cc2daea3090f5de.tar.gz
Merge remote-tracking branch 'origin/master' into wip/impredicativity
Conflicts: compiler/typecheck/Inst.hs compiler/typecheck/TcBinds.hs compiler/typecheck/TcExpr.hs compiler/typecheck/TcRnTypes.hs compiler/types/Unify.hs
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/.gitignore11
-rw-r--r--testsuite/tests/annotations/should_run/Makefile1
-rw-r--r--testsuite/tests/cabal/sigcabal01/Makefile2
-rw-r--r--testsuite/tests/cabal/sigcabal01/all.T2
-rw-r--r--testsuite/tests/cabal/sigcabal02/Main.hs7
-rw-r--r--testsuite/tests/cabal/sigcabal02/Makefile34
-rw-r--r--testsuite/tests/cabal/sigcabal02/Setup.hs2
-rw-r--r--testsuite/tests/cabal/sigcabal02/ShouldFail.hs1
-rw-r--r--testsuite/tests/cabal/sigcabal02/all.T9
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/LICENSE0
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/Map.hsig18
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/P.hs12
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/Set.hsig13
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/p.cabal14
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/LICENSE0
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/Map.hsig7
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/Q.hs7
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/q.cabal13
-rw-r--r--testsuite/tests/cabal/sigcabal02/sigcabal02.stderr4
-rw-r--r--testsuite/tests/cabal/sigcabal02/sigcabal02.stdout5
-rw-r--r--testsuite/tests/concurrent/prog002/Thread.hs7
-rw-r--r--testsuite/tests/concurrent/prog002/all.T1
-rw-r--r--testsuite/tests/concurrent/should_run/all.T3
-rw-r--r--testsuite/tests/deSugar/should_compile/T2431.stderr6
-rw-r--r--testsuite/tests/deriving/should_run/T10447.hs41
-rw-r--r--testsuite/tests/deriving/should_run/T10447.stdout9
-rw-r--r--testsuite/tests/deriving/should_run/all.T1
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig5
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile16
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo005/test.T8
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig5
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs8
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile20
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/test.T9
-rw-r--r--testsuite/tests/driver/recomp014/Makefile31
-rw-r--r--testsuite/tests/driver/recomp014/all.T4
-rw-r--r--testsuite/tests/driver/recomp014/recomp014.stdout4
-rw-r--r--testsuite/tests/driver/sigof01/Makefile6
-rw-r--r--testsuite/tests/driver/sigof01/all.T10
-rw-r--r--testsuite/tests/driver/sigof01/sigof01i.script1
-rw-r--r--testsuite/tests/driver/sigof01/sigof01i.stdout3
-rw-r--r--testsuite/tests/driver/sigof01/sigof01i2.script3
-rw-r--r--testsuite/tests/driver/sigof01/sigof01i2.stdout8
-rw-r--r--testsuite/tests/gadt/all.T2
-rw-r--r--testsuite/tests/ghc-e/Makefile3
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break003.stderr2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stderr8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print019.stderr4
-rw-r--r--testsuite/tests/ghci/prog009/ghci.prog009.stderr2
-rw-r--r--testsuite/tests/ghci/prog013/prog013.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T10018.script3
-rw-r--r--testsuite/tests/ghci/scripts/T10018.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T10248.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T2182ghci.stderr10
-rw-r--r--testsuite/tests/ghci/scripts/T2182ghci2.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T2816.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/T4127a.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/T5564.stderr8
-rw-r--r--testsuite/tests/ghci/scripts/T6027ghci.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T7730.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T7872.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T7873.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T8485.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/T8579.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T8649.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/T8959.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/T9140.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stderr2
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T1
-rw-r--r--testsuite/tests/ghci/scripts/ghci012.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/ghci040.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/ghci041.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/ghci042.stdout10
-rw-r--r--testsuite/tests/ghci/scripts/ghci044.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/ghci047.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/ghci048.stderr12
-rw-r--r--testsuite/tests/ghci/scripts/ghci050.stderr10
-rw-r--r--testsuite/tests/ghci/scripts/ghci051.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/ghci051.stdout18
-rw-r--r--testsuite/tests/ghci/scripts/ghci052.stderr24
-rw-r--r--testsuite/tests/ghci/scripts/ghci053.stderr12
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stderr2
-rw-r--r--testsuite/tests/ghci/should_run/T9914.stdout4
-rw-r--r--testsuite/tests/ghci/should_run/T9915.stderr2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/T10398.hs25
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/T10398.stderr13
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/all.T2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs8
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr5
-rw-r--r--testsuite/tests/numeric/should_compile/T7116.stdout4
-rw-r--r--testsuite/tests/package/package09e.stderr2
-rw-r--r--testsuite/tests/parser/should_compile/all.T2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Splices.hs30
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs18
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr73
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypedSplice.hs9
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr16
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs3
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs7
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs7
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T12
-rw-r--r--testsuite/tests/patsyn/should_run/ghci.stderr2
-rw-r--r--testsuite/tests/patsyn/should_run/ghci.stdout2
-rw-r--r--testsuite/tests/perf/haddock/all.T3
-rw-r--r--testsuite/tests/polykinds/T10670.hs24
-rw-r--r--testsuite/tests/polykinds/T10670a.hs54
-rw-r--r--testsuite/tests/polykinds/all.T2
-rw-r--r--testsuite/tests/primops/should_run/T9430.hs18
-rw-r--r--testsuite/tests/quasiquotation/qq007/test.T1
-rw-r--r--testsuite/tests/quasiquotation/qq008/test.T1
-rw-r--r--testsuite/tests/rename/should_compile/all.T2
-rw-r--r--testsuite/tests/rename/should_fail/T10668.hs3
-rw-r--r--testsuite/tests/rename/should_fail/T10668.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/all.T1
-rw-r--r--testsuite/tests/roles/should_compile/Roles13.stderr2
-rw-r--r--testsuite/tests/rts/Makefile6
-rw-r--r--testsuite/tests/rts/all.T8
-rw-r--r--testsuite/tests/rts/outofmem.stderr-ws-642
-rw-r--r--testsuite/tests/rts/outofmem.stdout2
-rw-r--r--testsuite/tests/rts/testmblockalloc.c75
-rw-r--r--testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout6
-rw-r--r--testsuite/tests/safeHaskell/ghci/p10.stderr2
-rw-r--r--testsuite/tests/safeHaskell/ghci/p13.stderr4
-rw-r--r--testsuite/tests/safeHaskell/ghci/p14.stderr2
-rw-r--r--testsuite/tests/safeHaskell/ghci/p16.stderr8
-rw-r--r--testsuite/tests/safeHaskell/ghci/p4.stderr6
-rw-r--r--testsuite/tests/safeHaskell/ghci/p6.stderr6
-rw-r--r--testsuite/tests/safeHaskell/ghci/p9.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/Makefile6
-rw-r--r--testsuite/tests/simplCore/should_compile/T10083.hs5
-rw-r--r--testsuite/tests/simplCore/should_compile/T10083.hs-boot3
-rw-r--r--testsuite/tests/simplCore/should_compile/T10083a.hs4
-rw-r--r--testsuite/tests/simplCore/should_compile/T10181.hs3
-rw-r--r--testsuite/tests/simplCore/should_compile/T3717.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/T3772.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T4908.stderr3
-rw-r--r--testsuite/tests/simplCore/should_compile/T4930.stderr3
-rw-r--r--testsuite/tests/simplCore/should_compile/T7360.stderr5
-rw-r--r--testsuite/tests/simplCore/should_compile/T9400.stderr1
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T9
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr7
-rw-r--r--testsuite/tests/th/T10620.hs9
-rw-r--r--testsuite/tests/th/T10620.stdout2
-rw-r--r--testsuite/tests/th/T10638.hs31
-rw-r--r--testsuite/tests/th/T10638.stderr6
-rw-r--r--testsuite/tests/th/T7276a.stdout4
-rw-r--r--testsuite/tests/th/TH_Roles2.stderr6
-rw-r--r--testsuite/tests/th/all.T2
-rw-r--r--testsuite/tests/typecheck/should_compile/T10632.hs7
-rw-r--r--testsuite/tests/typecheck/should_compile/T10632.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/T2497.hs6
-rw-r--r--testsuite/tests/typecheck/should_compile/T2497.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T5
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail1.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail1.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail2.hs19
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail2.stderr9
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail3.hs23
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail3.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail4.hs11
-rw-r--r--testsuite/tests/typecheck/should_fail/ExpandSynsFail4.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail223.hs10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail223.stderr9
-rw-r--r--testsuite/tests/typecheck/should_run/T3500a.hs1
-rw-r--r--testsuite/tests/typecheck/should_run/T5751.hs2
-rw-r--r--testsuite/tests/typecheck/should_run/T7126.hs2
-rw-r--r--testsuite/tests/typecheck/should_run/T7861.hs12
-rw-r--r--testsuite/tests/typecheck/should_run/T7861.stderr13
-rw-r--r--testsuite/tests/typecheck/should_run/T9497a-run.stderr4
-rw-r--r--testsuite/tests/typecheck/should_run/T9497b-run.stderr4
-rw-r--r--testsuite/tests/typecheck/should_run/T9497c-run.stderr4
-rw-r--r--testsuite/tests/warnings/should_compile/DeprM.hs4
-rw-r--r--testsuite/tests/warnings/should_compile/DeprU.hs6
-rw-r--r--testsuite/tests/warnings/should_compile/DeprU.stderr10
-rw-r--r--testsuite/tests/warnings/should_compile/all.T6
-rw-r--r--testsuite/timeout/timeout.hs8
-rw-r--r--testsuite/timeout/timeout.py3
192 files changed, 1300 insertions, 184 deletions
diff --git a/testsuite/.gitignore b/testsuite/.gitignore
index 3583a062af..6ebb05a90e 100644
--- a/testsuite/.gitignore
+++ b/testsuite/.gitignore
@@ -55,9 +55,8 @@ tmp.d
*.so
*bindisttest_install___dir_bin_ghc.mk
*bindisttest_install___dir_bin_ghc.exe.mk
-mk/ghcconfig*_inplace_bin_ghc-stage1.mk
-mk/ghcconfig*_inplace_bin_ghc-stage2.mk
-mk/ghcconfig*_inplace_bin_ghc-stage2.exe.mk
+mk/ghcconfig*_bin_ghc-*.mk
+mk/ghcconfig*_bin_ghc-*.exe.mk
*.imports
# -----------------------------------------------------------------------------
@@ -119,6 +118,12 @@ mk/ghcconfig*_inplace_bin_ghc-stage2.exe.mk
/tests/cabal/sigcabal01/p_lazy
/tests/cabal/sigcabal01/p_strict
/tests/cabal/sigcabal01/containers
+/tests/cabal/sigcabal02/Main
+/tests/cabal/sigcabal02/p_ipid
+/tests/cabal/sigcabal02/q_ipid
+/tests/cabal/sigcabal02/containers
+/tests/cabal/sigcabal02/tmp*
+/tests/cabal/sigcabal02/inst*
/tests/cabal/local01.package.conf/
/tests/cabal/local03.package.conf/
/tests/cabal/local04.package.conf/
diff --git a/testsuite/tests/annotations/should_run/Makefile b/testsuite/tests/annotations/should_run/Makefile
index 71e065f76b..49339a5d1e 100644
--- a/testsuite/tests/annotations/should_run/Makefile
+++ b/testsuite/tests/annotations/should_run/Makefile
@@ -6,7 +6,6 @@ CONFIG_HS=Config.hs
config :
rm -f $(CONFIG_HS)
- @echo "Creating $(CONFIG_HS) ... "
echo "module Config where" >>$(CONFIG_HS)
echo "cTop :: String" >> $(CONFIG_HS)
echo 'cTop = "$(subst \,\\,$(shell '$(TEST_HC)' --print-libdir))"' >> $(CONFIG_HS)
diff --git a/testsuite/tests/cabal/sigcabal01/Makefile b/testsuite/tests/cabal/sigcabal01/Makefile
index c284842bdd..73cffd7a68 100644
--- a/testsuite/tests/cabal/sigcabal01/Makefile
+++ b/testsuite/tests/cabal/sigcabal01/Makefile
@@ -22,7 +22,7 @@ sigcabal01:
cd p && $(SETUP) build
cd p && $(SETUP) copy
cd p && $(SETUP) register --print-ipid > ../p_strict
- '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package-id "`cat p_lazy` (P as P.Lazy)" -package-id "`cat p_strict` (P as P.Strict)" --make Main.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_lazy` (P as P.Lazy)" -package-id "`cat p_strict` (P as P.Strict)" --make Main.hs
! ./Main
ifneq "$(CLEANUP)" ""
$(MAKE) clean
diff --git a/testsuite/tests/cabal/sigcabal01/all.T b/testsuite/tests/cabal/sigcabal01/all.T
index a797c0890d..24c50b672a 100644
--- a/testsuite/tests/cabal/sigcabal01/all.T
+++ b/testsuite/tests/cabal/sigcabal01/all.T
@@ -4,6 +4,6 @@ else:
cleanup = ''
test('sigcabal01',
- normal,
+ expect_broken(10622),
run_command,
['$MAKE -s --no-print-directory sigcabal01 ' + cleanup])
diff --git a/testsuite/tests/cabal/sigcabal02/Main.hs b/testsuite/tests/cabal/sigcabal02/Main.hs
new file mode 100644
index 0000000000..52def3d41f
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/Main.hs
@@ -0,0 +1,7 @@
+import Map
+import P
+import Q
+
+main = do
+ x <- foo
+ print (mymember 5 x)
diff --git a/testsuite/tests/cabal/sigcabal02/Makefile b/testsuite/tests/cabal/sigcabal02/Makefile
new file mode 100644
index 0000000000..c45697d1b6
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/Makefile
@@ -0,0 +1,34 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+SETUP=../Setup -v0
+
+# This test is for two Cabal packages exposing the same signature
+
+sigcabal02:
+ $(MAKE) clean
+ '$(GHC_PKG)' field containers id | sed 's/^.*: *//' > containers
+ '$(GHC_PKG)' init tmp.d
+ '$(TEST_HC)' -v0 --make Setup
+ cd p && $(SETUP) clean
+ cd p && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --prefix='$(PWD)/inst-p' --instantiate-with="Map=Data.Map.Lazy@`cat ../containers`" --instantiate-with="Set=Data.Set@`cat ../containers`" --ghc-pkg-options="--enable-multi-instance"
+ cd p && $(SETUP) build
+ cd p && $(SETUP) copy
+ cd p && $(SETUP) register --print-ipid > ../p_ipid
+ cd q && $(SETUP) clean
+ cd q && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --prefix='$(PWD)/inst-p' --instantiate-with="Map=Data.Map.Lazy@`cat ../containers`" --ghc-pkg-options="--enable-multi-instance"
+ cd q && $(SETUP) build
+ cd q && $(SETUP) copy
+ cd q && $(SETUP) register --print-ipid > ../q_ipid
+ '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make Main.hs
+ ./Main
+ ! '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make ShouldFail.hs
+ifneq "$(CLEANUP)" ""
+ $(MAKE) clean
+endif
+
+clean :
+ '$(GHC_PKG)' unregister --force p >/dev/null 2>&1 || true
+ '$(GHC_PKG)' unregister --force q >/dev/null 2>&1 || true
+ $(RM) -r tmp.d inst-* *.o *.hi */*.o */*.hi */Setup$(exeext) */dist Setup$(exeext)
diff --git a/testsuite/tests/cabal/sigcabal02/Setup.hs b/testsuite/tests/cabal/sigcabal02/Setup.hs
new file mode 100644
index 0000000000..9a994af677
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/testsuite/tests/cabal/sigcabal02/ShouldFail.hs b/testsuite/tests/cabal/sigcabal02/ShouldFail.hs
new file mode 100644
index 0000000000..98ec49e886
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/ShouldFail.hs
@@ -0,0 +1 @@
+import Set
diff --git a/testsuite/tests/cabal/sigcabal02/all.T b/testsuite/tests/cabal/sigcabal02/all.T
new file mode 100644
index 0000000000..11eb05975b
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/all.T
@@ -0,0 +1,9 @@
+if default_testopts.cleanup != '':
+ cleanup = 'CLEANUP=1'
+else:
+ cleanup = ''
+
+test('sigcabal02',
+ normal,
+ run_command,
+ ['$MAKE -s --no-print-directory sigcabal02 ' + cleanup])
diff --git a/testsuite/tests/cabal/sigcabal02/p/LICENSE b/testsuite/tests/cabal/sigcabal02/p/LICENSE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/p/LICENSE
diff --git a/testsuite/tests/cabal/sigcabal02/p/Map.hsig b/testsuite/tests/cabal/sigcabal02/p/Map.hsig
new file mode 100644
index 0000000000..359cf64ab9
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/p/Map.hsig
@@ -0,0 +1,18 @@
+{-# LANGUAGE RoleAnnotations #-}
+module Map where
+
+import Set
+
+type role Map nominal representational
+data Map k a
+
+instance (Show k, Show a) => Show (Map k a)
+
+size :: Map k a -> Int
+lookup :: Ord k => k -> Map k a -> Maybe a
+empty :: Map k a
+insert :: Ord k => k -> a -> Map k a -> Map k a
+delete :: Ord k => k -> Map k a -> Map k a
+
+keysSet :: Map k a -> Set k
+fromSet :: (k -> a) -> Set k -> Map k a
diff --git a/testsuite/tests/cabal/sigcabal02/p/P.hs b/testsuite/tests/cabal/sigcabal02/p/P.hs
new file mode 100644
index 0000000000..dec6b41c94
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/p/P.hs
@@ -0,0 +1,12 @@
+module P where
+
+import qualified Map
+import qualified Set
+
+foo = do
+ let x = Map.insert 0 "foo"
+ . Map.insert (6 :: Int) "foo"
+ $ Map.empty
+ print (Map.lookup 1 x)
+ print (Set.size (Map.keysSet x))
+ return x
diff --git a/testsuite/tests/cabal/sigcabal02/p/Set.hsig b/testsuite/tests/cabal/sigcabal02/p/Set.hsig
new file mode 100644
index 0000000000..1713133365
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/p/Set.hsig
@@ -0,0 +1,13 @@
+{-# LANGUAGE RoleAnnotations #-}
+module Set where
+
+type role Set nominal
+data Set a
+
+instance Show a => Show (Set a)
+
+size :: Set a -> Int
+member :: Ord a => a -> Set a -> Bool
+empty :: Set a
+insert :: Ord a => a -> Set a -> Set a
+delete :: Ord a => a -> Set a -> Set a
diff --git a/testsuite/tests/cabal/sigcabal02/p/p.cabal b/testsuite/tests/cabal/sigcabal02/p/p.cabal
new file mode 100644
index 0000000000..bb3b2a4463
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/p/p.cabal
@@ -0,0 +1,14 @@
+name: p
+version: 1.0
+license-file: LICENSE
+author: Edward Z. Yang
+maintainer: ezyang@cs.stanford.edu
+build-type: Simple
+cabal-version: >=1.20
+
+library
+ exposed-modules: P
+ exposed-signatures: Map
+ required-signatures: Set
+ build-depends: base
+ default-language: Haskell2010
diff --git a/testsuite/tests/cabal/sigcabal02/q/LICENSE b/testsuite/tests/cabal/sigcabal02/q/LICENSE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/q/LICENSE
diff --git a/testsuite/tests/cabal/sigcabal02/q/Map.hsig b/testsuite/tests/cabal/sigcabal02/q/Map.hsig
new file mode 100644
index 0000000000..40fd0bc74c
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/q/Map.hsig
@@ -0,0 +1,7 @@
+{-# LANGUAGE RoleAnnotations #-}
+module Map where
+
+type role Map nominal representational
+data Map k a
+
+member :: Ord k => k -> Map k a -> Bool
diff --git a/testsuite/tests/cabal/sigcabal02/q/Q.hs b/testsuite/tests/cabal/sigcabal02/q/Q.hs
new file mode 100644
index 0000000000..ba55fb97b7
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/q/Q.hs
@@ -0,0 +1,7 @@
+module Q where
+
+import qualified Map
+import Map(Map)
+
+mymember :: Int -> Map Int a -> Bool
+mymember k m = Map.member k m || Map.member (k + 1) m
diff --git a/testsuite/tests/cabal/sigcabal02/q/q.cabal b/testsuite/tests/cabal/sigcabal02/q/q.cabal
new file mode 100644
index 0000000000..2f99c4403c
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/q/q.cabal
@@ -0,0 +1,13 @@
+name: q
+version: 1.0
+license-file: LICENSE
+author: Edward Z. Yang
+maintainer: ezyang@cs.stanford.edu
+build-type: Simple
+cabal-version: >=1.20
+
+library
+ exposed-modules: Q
+ exposed-signatures: Map
+ build-depends: base
+ default-language: Haskell2010
diff --git a/testsuite/tests/cabal/sigcabal02/sigcabal02.stderr b/testsuite/tests/cabal/sigcabal02/sigcabal02.stderr
new file mode 100644
index 0000000000..7c1f09239f
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/sigcabal02.stderr
@@ -0,0 +1,4 @@
+
+ShouldFail.hs:1:8:
+ Could not find module ‘Set’
+ Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/cabal/sigcabal02/sigcabal02.stdout b/testsuite/tests/cabal/sigcabal02/sigcabal02.stdout
new file mode 100644
index 0000000000..48cb59e63a
--- /dev/null
+++ b/testsuite/tests/cabal/sigcabal02/sigcabal02.stdout
@@ -0,0 +1,5 @@
+[1 of 1] Compiling Main ( Main.hs, Main.o )
+Linking Main ...
+Nothing
+2
+True
diff --git a/testsuite/tests/concurrent/prog002/Thread.hs b/testsuite/tests/concurrent/prog002/Thread.hs
index 9e342ac977..301e8441b6 100644
--- a/testsuite/tests/concurrent/prog002/Thread.hs
+++ b/testsuite/tests/concurrent/prog002/Thread.hs
@@ -14,6 +14,13 @@ data ThreadTree req rsp m =
----------------------------------
newtype ContM req rsp m a = ContM ((a-> ThreadTree req rsp m)-> ThreadTree req rsp m)
+instance Functor (ContM req rsp m) where
+ fmap = undefined
+
+instance Applicative (ContM req rsp m) where
+ pure = undefined
+ (<*>) = undefined
+
instance Monad m => Monad (ContM req rsp m) where
m >>= f = contmBind m f
return = contmReturn
diff --git a/testsuite/tests/concurrent/prog002/all.T b/testsuite/tests/concurrent/prog002/all.T
index 54613a7e4a..5eb62382ee 100644
--- a/testsuite/tests/concurrent/prog002/all.T
+++ b/testsuite/tests/concurrent/prog002/all.T
@@ -11,6 +11,7 @@ else:
test('concprog002',
[only_ways(['threaded2','threaded2_hT']),
+ expect_broken_for(10661, ['threaded2_hT']),
extra_ways(ways),
exit_code(1),
when(fast(), skip),
diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T
index 7fe4b3caa5..80734adaf0 100644
--- a/testsuite/tests/concurrent/should_run/all.T
+++ b/testsuite/tests/concurrent/should_run/all.T
@@ -174,7 +174,8 @@ test('conc033', normal, compile_and_run, [''])
# Omit for GHCi, because it just sits there waiting for you to press ^C
test('conc034', [
- omit_ways(['ghci']),
+ normal,
+ omit_ways(['ghci']),
extra_run_opts('+RTS -C0 -RTS')],
compile_and_run, [''])
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr
index 607ecc1b24..cd14bd1754 100644
--- a/testsuite/tests/deSugar/should_compile/T2431.stderr
+++ b/testsuite/tests/deSugar/should_compile/T2431.stderr
@@ -2,6 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 8, types: 19, coercions: 1}
+-- RHS size: {terms: 2, types: 3, coercions: 1}
T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a
[GblId[DataConWrapper],
Caf=NoCafRefs,
@@ -9,9 +10,10 @@ T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=0,unsat_ok=False,boring_ok=False)
- Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ <a>_N}]
-T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ <a>_N
+ Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a ~# a)}]
+T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a ~# a)
+-- RHS size: {terms: 4, types: 7, coercions: 0}
absurd :: forall a. Int :~: Bool -> a
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>b]
absurd = \ (@ a) (x :: Int :~: Bool) -> case x of _ [Occ=Dead] { }
diff --git a/testsuite/tests/deriving/should_run/T10447.hs b/testsuite/tests/deriving/should_run/T10447.hs
new file mode 100644
index 0000000000..e91ce98f64
--- /dev/null
+++ b/testsuite/tests/deriving/should_run/T10447.hs
@@ -0,0 +1,41 @@
+{-# LANGUAGE DeriveFoldable, GADTs, StandaloneDeriving #-}
+module Main where
+
+class (a ~ Int) => Foo a
+instance Foo Int
+
+data A a where
+ A1 :: Ord a => a -> A a
+ A2 :: Int -> A Int
+ A3 :: b ~ Int => b -> A Int
+ A4 :: a ~ Int => Int -> A a
+ A5 :: a ~ Int => a -> A a
+ A6 :: (a ~ b, b ~ Int) => Int -> b -> A a
+ A7 :: Foo a => Int -> a -> A a
+
+deriving instance Foldable A
+
+data HK f a where
+ HK1 :: f a -> HK f (f a)
+ HK2 :: f a -> HK f a
+
+deriving instance Foldable f => Foldable (HK f)
+
+one :: Int
+one = 1
+
+main :: IO ()
+main = do
+ mapM_ (print . foldr (+) one)
+ [ A1 one
+ , A2 one
+ , A3 one
+ , A4 one
+ , A5 one
+ , A6 one one
+ , A7 one one
+ ]
+ mapM_ (print . foldr mappend Nothing)
+ [ HK1 (Just "Hello")
+ , HK2 (Just (Just "World"))
+ ]
diff --git a/testsuite/tests/deriving/should_run/T10447.stdout b/testsuite/tests/deriving/should_run/T10447.stdout
new file mode 100644
index 0000000000..079b327601
--- /dev/null
+++ b/testsuite/tests/deriving/should_run/T10447.stdout
@@ -0,0 +1,9 @@
+2
+1
+1
+1
+2
+1
+2
+Nothing
+Just "World"
diff --git a/testsuite/tests/deriving/should_run/all.T b/testsuite/tests/deriving/should_run/all.T
index 1ccbdd77f8..d47e5c1312 100644
--- a/testsuite/tests/deriving/should_run/all.T
+++ b/testsuite/tests/deriving/should_run/all.T
@@ -39,3 +39,4 @@ test('T7931', normal, compile_and_run, [''])
test('T9576', exit_code(1), compile_and_run, [''])
test('T9830', extra_clean(['T9830a.hi', 'T9830a.o']), multimod_compile_and_run, ['T9830','-v0'])
test('T10104', normal, compile_and_run, [''])
+test('T10447', normal, compile_and_run, [''])
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig b/testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig
new file mode 100644
index 0000000000..75d621cfec
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig
@@ -0,0 +1,5 @@
+
+module A005 where
+
+data Maybe a = Nothing | Just a
+
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile b/testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile
new file mode 100644
index 0000000000..617510eec4
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile
@@ -0,0 +1,16 @@
+TOP=../../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+checkExists = [ -f $1 ] || echo $1 missing
+
+.PHONY: dynamicToo005
+# Check that "-c -dynamic-too" works with .hsig
+dynamicToo005:
+ "$(TEST_HC)" $(TEST_HC_OPTS) -dynamic-too -v0 \
+ -sig-of A005=base:Prelude \
+ -c A005.hsig
+ $(call checkExists,A005.o)
+ $(call checkExists,A005.hi)
+ $(call checkExists,A005.dyn_o)
+ $(call checkExists,A005.dyn_hi)
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo005/test.T b/testsuite/tests/driver/dynamicToo/dynamicToo005/test.T
new file mode 100644
index 0000000000..48460f5135
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo005/test.T
@@ -0,0 +1,8 @@
+
+test('dynamicToo005',
+ [extra_clean(['A005.o', 'A005.hi', 'A005.dyn_o', 'A005.dyn_hi']),
+ unless(have_vanilla(), skip),
+ unless(have_dynamic(), skip)],
+ run_command,
+ ['$MAKE -s --no-print-directory dynamicToo005'])
+
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig b/testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig
new file mode 100644
index 0000000000..f79d5d334f
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig
@@ -0,0 +1,5 @@
+
+module A where
+
+data Maybe a = Nothing | Just a
+
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs b/testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs
new file mode 100644
index 0000000000..65900e786a
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+
+module B where
+
+import A
+
+b :: Maybe a
+b = Nothing
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile b/testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile
new file mode 100644
index 0000000000..497f2c0942
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile
@@ -0,0 +1,20 @@
+TOP=../../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+checkExists = [ -f $1 ] || echo $1 missing
+
+.PHONY: dynamicToo006
+# Check that "--make -dynamic-too" works with .hsig
+dynamicToo006:
+ "$(TEST_HC)" $(TEST_HC_OPTS) -dynamic-too -v0 \
+ -sig-of A=base:Prelude \
+ --make B
+ $(call checkExists,A.o)
+ $(call checkExists,B.o)
+ $(call checkExists,A.hi)
+ $(call checkExists,B.hi)
+ $(call checkExists,A.dyn_o)
+ $(call checkExists,B.dyn_o)
+ $(call checkExists,A.dyn_hi)
+ $(call checkExists,B.dyn_hi)
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/test.T b/testsuite/tests/driver/dynamicToo/dynamicToo006/test.T
new file mode 100644
index 0000000000..72e06ca524
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/test.T
@@ -0,0 +1,9 @@
+
+test('dynamicToo006',
+ [extra_clean(['A.o', 'A.hi', 'A.dyn_o', 'A.dyn_hi',
+ 'B.o', 'B.hi', 'B.dyn_o', 'B.dyn_hi']),
+ unless(have_vanilla(), skip),
+ unless(have_dynamic(), skip)],
+ run_command,
+ ['$MAKE -s --no-print-directory dynamicToo006'])
+
diff --git a/testsuite/tests/driver/recomp014/Makefile b/testsuite/tests/driver/recomp014/Makefile
new file mode 100644
index 0000000000..e788110097
--- /dev/null
+++ b/testsuite/tests/driver/recomp014/Makefile
@@ -0,0 +1,31 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+# -fforce-recomp makes lots of driver tests trivially pass, so we
+# filter it out from $(TEST_HC_OPTS).
+TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
+
+# Recompilation tests
+
+clean:
+ rm -f *.o *.hi
+
+recomp014: clean
+ echo 'module A where a = False' > A.hs
+ echo 'module A1 where a = False' > A1.hs
+ echo 'module B where a :: Bool' > B.hsig
+ echo 'first run'
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c A.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c A1.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c B.hsig -sig-of "B is main:A"
+ echo 'import B; main = print a' > C.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c C.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c C.hs
+ echo 'second run'
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c B.hsig -sig-of "B is main:A1"
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c C.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) A1.o C.o -o recomp014
+ ./recomp014
+
+.PHONY: clean recomp014
diff --git a/testsuite/tests/driver/recomp014/all.T b/testsuite/tests/driver/recomp014/all.T
new file mode 100644
index 0000000000..affccd2f7f
--- /dev/null
+++ b/testsuite/tests/driver/recomp014/all.T
@@ -0,0 +1,4 @@
+test('recomp014',
+ [ clean_cmd('$MAKE -s clean') ],
+ run_command,
+ ['$MAKE -s --no-print-directory recomp014'])
diff --git a/testsuite/tests/driver/recomp014/recomp014.stdout b/testsuite/tests/driver/recomp014/recomp014.stdout
new file mode 100644
index 0000000000..7d540716f0
--- /dev/null
+++ b/testsuite/tests/driver/recomp014/recomp014.stdout
@@ -0,0 +1,4 @@
+first run
+compilation IS NOT required
+second run
+False
diff --git a/testsuite/tests/driver/sigof01/Makefile b/testsuite/tests/driver/sigof01/Makefile
index 84dfc33a9f..629d4b656a 100644
--- a/testsuite/tests/driver/sigof01/Makefile
+++ b/testsuite/tests/driver/sigof01/Makefile
@@ -21,3 +21,9 @@ sigof01m:
mkdir tmp_sigof01m
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof01m --make Main.hs -sig-of "B is main:A" -o tmp_sigof01m/Main
tmp_sigof01m/Main
+
+sigof01i:
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --interactive -v0 -ignore-dot-ghci Main.hs -sig-of "B is main:A" < sigof01i.script
+
+sigof01i2:
+ '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --interactive -v0 -ignore-dot-ghci -sig-of "B is main:A" < sigof01i2.script
diff --git a/testsuite/tests/driver/sigof01/all.T b/testsuite/tests/driver/sigof01/all.T
index d0cdc3c02c..50418b9af0 100644
--- a/testsuite/tests/driver/sigof01/all.T
+++ b/testsuite/tests/driver/sigof01/all.T
@@ -7,3 +7,13 @@ test('sigof01m',
[ clean_cmd('rm -rf tmp_sigof01m') ],
run_command,
['$MAKE -s --no-print-directory sigof01m'])
+
+test('sigof01i',
+ normal,
+ run_command,
+ ['$MAKE -s --no-print-directory sigof01i'])
+
+test('sigof01i2',
+ normal,
+ run_command,
+ ['$MAKE -s --no-print-directory sigof01i2'])
diff --git a/testsuite/tests/driver/sigof01/sigof01i.script b/testsuite/tests/driver/sigof01/sigof01i.script
new file mode 100644
index 0000000000..ba2906d066
--- /dev/null
+++ b/testsuite/tests/driver/sigof01/sigof01i.script
@@ -0,0 +1 @@
+main
diff --git a/testsuite/tests/driver/sigof01/sigof01i.stdout b/testsuite/tests/driver/sigof01/sigof01i.stdout
new file mode 100644
index 0000000000..bb614cd2a0
--- /dev/null
+++ b/testsuite/tests/driver/sigof01/sigof01i.stdout
@@ -0,0 +1,3 @@
+False
+T
+True
diff --git a/testsuite/tests/driver/sigof01/sigof01i2.script b/testsuite/tests/driver/sigof01/sigof01i2.script
new file mode 100644
index 0000000000..3a91e377a3
--- /dev/null
+++ b/testsuite/tests/driver/sigof01/sigof01i2.script
@@ -0,0 +1,3 @@
+:load B
+:browse B
+:issafe
diff --git a/testsuite/tests/driver/sigof01/sigof01i2.stdout b/testsuite/tests/driver/sigof01/sigof01i2.stdout
new file mode 100644
index 0000000000..ac15dcfa1e
--- /dev/null
+++ b/testsuite/tests/driver/sigof01/sigof01i2.stdout
@@ -0,0 +1,8 @@
+class Foo a where
+ foo :: a -> a
+data T = A.T
+mkT :: T
+x :: Bool
+Trust type is (Module: Safe, Package: trusted)
+Package Trust: Off
+B is trusted!
diff --git a/testsuite/tests/gadt/all.T b/testsuite/tests/gadt/all.T
index 9a48e69894..f458553116 100644
--- a/testsuite/tests/gadt/all.T
+++ b/testsuite/tests/gadt/all.T
@@ -70,7 +70,7 @@ test('karl2', normal, compile, [''])
test('data1', normal, compile, [''])
test('data2', normal, compile, [''])
-test('termination', normal, compile, [''])
+test('termination', expect_broken_for(10658, ['optasm', 'optllvm']), compile, [''])
test('set', normal, compile, [''])
test('scoped', normal, compile, [''])
test('gadt-escape1', normal, compile_fail, [''])
diff --git a/testsuite/tests/ghc-e/Makefile b/testsuite/tests/ghc-e/Makefile
new file mode 100644
index 0000000000..9a36a1c5fe
--- /dev/null
+++ b/testsuite/tests/ghc-e/Makefile
@@ -0,0 +1,3 @@
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stderr b/testsuite/tests/ghci.debugger/scripts/break003.stderr
index 00d4237e49..bf3d2ef5a4 100644
--- a/testsuite/tests/ghci.debugger/scripts/break003.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break003.stderr
@@ -1,5 +1,5 @@
-<interactive>:5:1: error:
+<interactive>:4:1: error:
No instance for (Show (t -> t1)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stderr b/testsuite/tests/ghci.debugger/scripts/break006.stderr
index 8a90905260..9822dd785b 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stderr
@@ -1,9 +1,9 @@
-<interactive>:6:1:
+<interactive>:5:1:
No instance for (Show t1) arising from a use of ‘print’
Cannot resolve unknown runtime type ‘t1’
Use :print or :force to determine these types
- Relevant bindings include it :: t1 (bound at <interactive>:6:1)
+ Relevant bindings include it :: t1 (bound at <interactive>:5:1)
Note: there are several potential instances:
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
@@ -15,11 +15,11 @@
...plus 33 others
In a stmt of an interactive GHCi command: print it
-<interactive>:8:1:
+<interactive>:7:1:
No instance for (Show t1) arising from a use of ‘print’
Cannot resolve unknown runtime type ‘t1’
Use :print or :force to determine these types
- Relevant bindings include it :: t1 (bound at <interactive>:8:1)
+ Relevant bindings include it :: t1 (bound at <interactive>:7:1)
Note: there are several potential instances:
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
diff --git a/testsuite/tests/ghci.debugger/scripts/print019.stderr b/testsuite/tests/ghci.debugger/scripts/print019.stderr
index 0c92dba4e4..15c9f839db 100644
--- a/testsuite/tests/ghci.debugger/scripts/print019.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/print019.stderr
@@ -1,9 +1,9 @@
-<interactive>:11:1:
+<interactive>:10:1:
No instance for (Show a1) arising from a use of ‘print’
Cannot resolve unknown runtime type ‘a1’
Use :print or :force to determine these types
- Relevant bindings include it :: a1 (bound at <interactive>:11:1)
+ Relevant bindings include it :: a1 (bound at <interactive>:10:1)
Note: there are several potential instances:
instance Show TyCon -- Defined in ‘Data.Typeable.Internal’
instance Show TypeRep -- Defined in ‘Data.Typeable.Internal’
diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.stderr b/testsuite/tests/ghci/prog009/ghci.prog009.stderr
index 2ad634d746..b2072f6413 100644
--- a/testsuite/tests/ghci/prog009/ghci.prog009.stderr
+++ b/testsuite/tests/ghci/prog009/ghci.prog009.stderr
@@ -1,7 +1,7 @@
A.hs:1:16: error: parse error on input ‘where’
-<interactive>:26:1: error:
+<interactive>:25:1: error:
Variable not in scope: yan
Perhaps you meant ‘tan’ (imported from Prelude)
diff --git a/testsuite/tests/ghci/prog013/prog013.stderr b/testsuite/tests/ghci/prog013/prog013.stderr
index ce8827f6ca..a1b5651c9e 100644
--- a/testsuite/tests/ghci/prog013/prog013.stderr
+++ b/testsuite/tests/ghci/prog013/prog013.stderr
@@ -8,7 +8,7 @@ Bad.hs:3:8: error:
Bad.hs:3:8: error:
lexical error in string/character literal at character '\n'
-<interactive>:10:1: error: parse error on input ‘+’
+<interactive>:9:1: error: parse error on input ‘+’
Bad.hs:3:8: error:
lexical error in string/character literal at character '\n'
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index b5b3373489..4a92236b38 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -128,7 +128,7 @@
In an equation for ‘b’: b x = x == x
(deferred type error)
-<interactive>:8:11: error:
+<interactive>:7:11: error:
Couldn't match type ‘Bool’ with ‘Int’
Expected type: C Int
Actual type: C Bool
@@ -175,7 +175,7 @@
In an equation for ‘j’: j = myOp 23
(deferred type error)
-<interactive>:14:8: error:
+<interactive>:13:8: error:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
In the first argument of ‘print’, namely ‘(k 2)’
In the expression: print (k 2)
diff --git a/testsuite/tests/ghci/scripts/T10018.script b/testsuite/tests/ghci/scripts/T10018.script
new file mode 100644
index 0000000000..f346899f4d
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10018.script
@@ -0,0 +1,3 @@
+-- Declaring a custom fixity for an infix data constructor should work.
+data Infix a b = a :@: b; infixl 4 :@:
+:i (:@:)
diff --git a/testsuite/tests/ghci/scripts/T10018.stdout b/testsuite/tests/ghci/scripts/T10018.stdout
new file mode 100644
index 0000000000..4f7d4807b2
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10018.stdout
@@ -0,0 +1,2 @@
+data Infix a b = a :@: b -- Defined at <interactive>:2:18
+infixl 4 :@:
diff --git a/testsuite/tests/ghci/scripts/T10248.stderr b/testsuite/tests/ghci/scripts/T10248.stderr
index b54412ebc8..59b0b29078 100644
--- a/testsuite/tests/ghci/scripts/T10248.stderr
+++ b/testsuite/tests/ghci/scripts/T10248.stderr
@@ -1,12 +1,12 @@
-<interactive>:3:10: warning:
+<interactive>:2:10: warning:
Found hole: _ :: IO ()
In the second argument of ‘(<$>)’, namely ‘_’
In the first argument of ‘ghciStepIO :: IO a -> IO a’, namely
‘Just <$> _’
In a stmt of an interactive GHCi command:
it <- ghciStepIO :: IO a -> IO a (Just <$> _)
-*** Exception: <interactive>:3:10: error:
+*** Exception: <interactive>:2:10: error:
Found hole: _ :: IO ()
In the second argument of ‘(<$>)’, namely ‘_’
In the first argument of ‘ghciStepIO :: IO a -> IO a’, namely
diff --git a/testsuite/tests/ghci/scripts/T2182ghci.stderr b/testsuite/tests/ghci/scripts/T2182ghci.stderr
index 470e72945d..f5eafdfc88 100644
--- a/testsuite/tests/ghci/scripts/T2182ghci.stderr
+++ b/testsuite/tests/ghci/scripts/T2182ghci.stderr
@@ -1,25 +1,25 @@
-<interactive>:3:1: error:
+<interactive>:2:1: error:
No instance for (Show (t0 -> t0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
-<interactive>:11:1: error:
+<interactive>:10:1: error:
No instance for (Show (t0 -> t0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
-<interactive>:20:1: error:
+<interactive>:19:1: error:
No instance for (Show (t0 -> t0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
-<interactive>:29:1: error:
+<interactive>:28:1: error:
No instance for (Show (t0 -> t0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
-<interactive>:50:1: error:
+<interactive>:49:1: error:
No instance for (Show (t0 -> t0)) arising from a use of ‘print’
(maybe you haven't applied a function to enough arguments?)
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci/scripts/T2182ghci2.stderr b/testsuite/tests/ghci/scripts/T2182ghci2.stderr
index f850e1d7b4..fde88e3c8a 100644
--- a/testsuite/tests/ghci/scripts/T2182ghci2.stderr
+++ b/testsuite/tests/ghci/scripts/T2182ghci2.stderr
@@ -1,8 +1,8 @@
-<interactive>:8:1:
+<interactive>:7:1:
No instance for (Show Float) arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
-<interactive>:16:1:
+<interactive>:15:1:
No instance for (Show Float) arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci/scripts/T2816.stderr b/testsuite/tests/ghci/scripts/T2816.stderr
index 69d8349778..bc9fa44254 100644
--- a/testsuite/tests/ghci/scripts/T2816.stderr
+++ b/testsuite/tests/ghci/scripts/T2816.stderr
@@ -1,2 +1,2 @@
-<interactive>:2:1: error: Variable not in scope: α
+<interactive>:1:1: error: Variable not in scope: α
diff --git a/testsuite/tests/ghci/scripts/T4127a.stderr b/testsuite/tests/ghci/scripts/T4127a.stderr
index 58d1bb683e..829ae2f8ca 100644
--- a/testsuite/tests/ghci/scripts/T4127a.stderr
+++ b/testsuite/tests/ghci/scripts/T4127a.stderr
@@ -1,8 +1,8 @@
-<interactive>:3:68:
+<interactive>:2:68:
Multiple declarations of ‘f’
- Declared at: <interactive>:3:32
- <interactive>:3:68
+ Declared at: <interactive>:2:32
+ <interactive>:2:68
In the Template Haskell quotation
[d| f = undefined
class Foo x where
diff --git a/testsuite/tests/ghci/scripts/T5564.stderr b/testsuite/tests/ghci/scripts/T5564.stderr
index 309ff1e76c..a63bcc8a95 100644
--- a/testsuite/tests/ghci/scripts/T5564.stderr
+++ b/testsuite/tests/ghci/scripts/T5564.stderr
@@ -1,10 +1,10 @@
-<interactive>:3:1: error:
+<interactive>:2:1: error:
Variable not in scope: git
- Perhaps you meant ‘it’ (line 2)
+ Perhaps you meant ‘it’ (line 1)
-<interactive>:5:1: error:
+<interactive>:4:1: error:
Variable not in scope: fit
Perhaps you meant one of these:
‘fst’ (imported from Prelude), ‘Ghci1.it’ (imported from Ghci1),
- ‘it’ (line 4)
+ ‘it’ (line 3)
diff --git a/testsuite/tests/ghci/scripts/T6027ghci.stdout b/testsuite/tests/ghci/scripts/T6027ghci.stdout
index 2cc6934ea7..be1034b0c7 100644
--- a/testsuite/tests/ghci/scripts/T6027ghci.stdout
+++ b/testsuite/tests/ghci/scripts/T6027ghci.stdout
@@ -1 +1 @@
-data (?) -- Defined at <interactive>:3:1
+data (?) -- Defined at <interactive>:2:1
diff --git a/testsuite/tests/ghci/scripts/T7730.stdout b/testsuite/tests/ghci/scripts/T7730.stdout
index e3a08c19f4..d91d058e53 100644
--- a/testsuite/tests/ghci/scripts/T7730.stdout
+++ b/testsuite/tests/ghci/scripts/T7730.stdout
@@ -1,8 +1,8 @@
type role A phantom phantom
data A (x :: k) (y :: k1)
- -- Defined at <interactive>:3:1
+ -- Defined at <interactive>:2:1
A :: k -> k1 -> *
type role T phantom
data T (a :: k) where
MkT :: forall (k :: BOX) (a :: k) a1. a1 -> T a
- -- Defined at <interactive>:7:1
+ -- Defined at <interactive>:6:1
diff --git a/testsuite/tests/ghci/scripts/T7872.stdout b/testsuite/tests/ghci/scripts/T7872.stdout
index 81d960947c..4c577ce1cd 100644
--- a/testsuite/tests/ghci/scripts/T7872.stdout
+++ b/testsuite/tests/ghci/scripts/T7872.stdout
@@ -1,2 +1,2 @@
-type T = forall a. a -> a -- Defined at <interactive>:3:1
-data D = MkT (forall b. b -> b) -- Defined at <interactive>:4:1
+type T = forall a. a -> a -- Defined at <interactive>:2:1
+data D = MkT (forall b. b -> b) -- Defined at <interactive>:3:1
diff --git a/testsuite/tests/ghci/scripts/T7873.stdout b/testsuite/tests/ghci/scripts/T7873.stdout
index 215757bb69..79a75ec7ea 100644
--- a/testsuite/tests/ghci/scripts/T7873.stdout
+++ b/testsuite/tests/ghci/scripts/T7873.stdout
@@ -1,7 +1,7 @@
data D1 where
MkD1 :: (forall (k1 :: BOX) (p :: k1 -> *) (a :: k1). p a -> Int)
-> D1
- -- Defined at <interactive>:3:1
+ -- Defined at <interactive>:2:1
data D2 where
MkD2 :: (forall (p :: k -> *) (a :: k). p a -> Int) -> D2
- -- Defined at <interactive>:4:1
+ -- Defined at <interactive>:3:1
diff --git a/testsuite/tests/ghci/scripts/T8485.stderr b/testsuite/tests/ghci/scripts/T8485.stderr
index bbef720fe2..d1c005b9f6 100644
--- a/testsuite/tests/ghci/scripts/T8485.stderr
+++ b/testsuite/tests/ghci/scripts/T8485.stderr
@@ -1,4 +1,4 @@
-<interactive>:3:11: error:
+<interactive>:2:11: error:
The role annotation for ‘X’ lacks an accompanying binding
(The role annotation must be given where ‘X’ is declared)
diff --git a/testsuite/tests/ghci/scripts/T8579.stdout b/testsuite/tests/ghci/scripts/T8579.stdout
index 5220e7e37c..2db09d7fd4 100644
--- a/testsuite/tests/ghci/scripts/T8579.stdout
+++ b/testsuite/tests/ghci/scripts/T8579.stdout
@@ -1,2 +1,2 @@
-data A = Y -- Defined at <interactive>:3:1
-data A = Y -- Defined at <interactive>:3:1
+data A = Y -- Defined at <interactive>:2:1
+data A = Y -- Defined at <interactive>:2:1
diff --git a/testsuite/tests/ghci/scripts/T8649.stderr b/testsuite/tests/ghci/scripts/T8649.stderr
index 257b112112..ae766e5aec 100644
--- a/testsuite/tests/ghci/scripts/T8649.stderr
+++ b/testsuite/tests/ghci/scripts/T8649.stderr
@@ -1,8 +1,8 @@
-<interactive>:5:4: error:
+<interactive>:4:4: error:
Couldn't match expected type ‘Ghci1.X’
with actual type ‘X’
- NB: ‘X’ is defined at <interactive>:4:1-25
- ‘Ghci1.X’ is defined at <interactive>:2:1-14
+ NB: ‘X’ is defined at <interactive>:3:1-25
+ ‘Ghci1.X’ is defined at <interactive>:1:1-14
In the first argument of ‘f’, namely ‘(Y 3)’
In the expression: f (Y 3)
diff --git a/testsuite/tests/ghci/scripts/T8959.stderr b/testsuite/tests/ghci/scripts/T8959.stderr
index b3995c3365..3f5707bd3a 100644
--- a/testsuite/tests/ghci/scripts/T8959.stderr
+++ b/testsuite/tests/ghci/scripts/T8959.stderr
@@ -3,7 +3,7 @@
Arrow command found where an expression was expected:
() >- () -< () >>- () -<< ()
-<interactive>:7:15:
+<interactive>:6:15:
Couldn't match expected type ‘()’ with actual type ‘Bool’
In the pattern: True
In a stmt of a pattern guard for
@@ -15,7 +15,7 @@
Arrow command found where an expression was expected:
() ↣ () ↢ () ⤜ () ⤛ ()
-<interactive>:14:15:
+<interactive>:13:15:
Couldn't match expected type ‘()’ with actual type ‘Bool’
In the pattern: True
In a stmt of a pattern guard for
@@ -27,7 +27,7 @@
Arrow command found where an expression was expected:
() >- () -< () >>- () -<< ()
-<interactive>:21:15:
+<interactive>:20:15:
Couldn't match expected type ‘()’ with actual type ‘Bool’
In the pattern: True
In a stmt of a pattern guard for
diff --git a/testsuite/tests/ghci/scripts/T9140.stdout b/testsuite/tests/ghci/scripts/T9140.stdout
index 401c8741c5..d9520c0960 100644
--- a/testsuite/tests/ghci/scripts/T9140.stdout
+++ b/testsuite/tests/ghci/scripts/T9140.stdout
@@ -1,10 +1,10 @@
-<interactive>:3:5:
+<interactive>:2:5:
You can't mix polymorphic and unlifted bindings
a = (# 1 #)
Probable fix: use a bang pattern
-<interactive>:4:5:
+<interactive>:3:5:
You can't mix polymorphic and unlifted bindings
a = (# 1, 3 #)
Probable fix: use a bang pattern
diff --git a/testsuite/tests/ghci/scripts/T9293.stderr b/testsuite/tests/ghci/scripts/T9293.stderr
index a663562a60..8c7ac45202 100644
--- a/testsuite/tests/ghci/scripts/T9293.stderr
+++ b/testsuite/tests/ghci/scripts/T9293.stderr
@@ -1,5 +1,5 @@
-<interactive>:5:1: error:
+<interactive>:4:1: error:
Illegal generalised algebraic data declaration for ‘T’
(Use GADTs to allow GADTs)
In the data declaration for ‘T’
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 1efa0099f1..bbd69ee014 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -209,6 +209,7 @@ test('T9878b',
extra_run_opts('-fobject-code'),
extra_clean(['T9878b.hi','T9878b.o'])],
ghci_script, ['T9878b.script'])
+test('T10018', normal, ghci_script, ['T10018.script'])
test('T10122', normal, ghci_script, ['T10122.script'])
test('T10321', normal, ghci_script, ['T10321.script'])
diff --git a/testsuite/tests/ghci/scripts/ghci012.stdout b/testsuite/tests/ghci/scripts/ghci012.stdout
index d19785b3ee..0fc695c4d1 100644
--- a/testsuite/tests/ghci/scripts/ghci012.stdout
+++ b/testsuite/tests/ghci/scripts/ghci012.stdout
@@ -1 +1 @@
-($$$) :: [a -> c] -> [a] -> [c] -- Defined at <interactive>:2:8
+($$$) :: [a -> c] -> [a] -> [c] -- Defined at <interactive>:1:8
diff --git a/testsuite/tests/ghci/scripts/ghci040.stdout b/testsuite/tests/ghci/scripts/ghci040.stdout
index b440ef499d..d9ebd9c59e 100644
--- a/testsuite/tests/ghci/scripts/ghci040.stdout
+++ b/testsuite/tests/ghci/scripts/ghci040.stdout
@@ -1 +1 @@
-data Ghci1.T = A | ... -- Defined at <interactive>:3:10
+data Ghci1.T = A | ... -- Defined at <interactive>:2:10
diff --git a/testsuite/tests/ghci/scripts/ghci041.stdout b/testsuite/tests/ghci/scripts/ghci041.stdout
index daf48fc25d..14b8726c76 100644
--- a/testsuite/tests/ghci/scripts/ghci041.stdout
+++ b/testsuite/tests/ghci/scripts/ghci041.stdout
@@ -1 +1 @@
-data R = A | ... -- Defined at <interactive>:4:10
+data R = A | ... -- Defined at <interactive>:3:10
diff --git a/testsuite/tests/ghci/scripts/ghci042.stdout b/testsuite/tests/ghci/scripts/ghci042.stdout
index 2a75ecb496..5cb84f632f 100644
--- a/testsuite/tests/ghci/scripts/ghci042.stdout
+++ b/testsuite/tests/ghci/scripts/ghci042.stdout
@@ -1,6 +1,6 @@
-data T = A {...} -- Defined at <interactive>:3:10
-data T = A {a :: Int} -- Defined at <interactive>:3:13
-a :: Integer -- Defined at <interactive>:6:5
+data T = A {...} -- Defined at <interactive>:2:10
+data T = A {a :: Int} -- Defined at <interactive>:2:13
+a :: Integer -- Defined at <interactive>:5:5
3
-data R = B {a :: Int} -- Defined at <interactive>:9:13
-data T = A {Ghci1.a :: Int} -- Defined at <interactive>:3:1
+data R = B {a :: Int} -- Defined at <interactive>:8:13
+data T = A {Ghci1.a :: Int} -- Defined at <interactive>:2:1
diff --git a/testsuite/tests/ghci/scripts/ghci044.stderr b/testsuite/tests/ghci/scripts/ghci044.stderr
index b49978dd39..9ff8acc5c7 100644
--- a/testsuite/tests/ghci/scripts/ghci044.stderr
+++ b/testsuite/tests/ghci/scripts/ghci044.stderr
@@ -1,8 +1,8 @@
-<interactive>:10:1: error:
+<interactive>:9:1: error:
Overlapping instances for C [Int] arising from a use of ‘f’
Matching instances:
- instance [safe] C [Int] -- Defined at <interactive>:7:10
- instance [safe] C a => C [a] -- Defined at <interactive>:9:10
+ instance [safe] C [Int] -- Defined at <interactive>:6:10
+ instance [safe] C a => C [a] -- Defined at <interactive>:8:10
In the expression: f [4 :: Int]
In an equation for ‘it’: it = f [4 :: Int]
diff --git a/testsuite/tests/ghci/scripts/ghci047.stderr b/testsuite/tests/ghci/scripts/ghci047.stderr
index 9428dbc1a9..dc8dfc9ecb 100644
--- a/testsuite/tests/ghci/scripts/ghci047.stderr
+++ b/testsuite/tests/ghci/scripts/ghci047.stderr
@@ -1,5 +1,5 @@
-<interactive>:39:1:
+<interactive>:38:1:
Couldn't match type ‘HFalse’ with ‘HTrue’
Expected type: HTrue
Actual type: Or HFalse HFalse
@@ -7,7 +7,7 @@
In the expression: f $ Baz 'a'
In an equation for ‘it’: it = f $ Baz 'a'
-<interactive>:40:1:
+<interactive>:39:1:
Couldn't match type ‘HFalse’ with ‘HTrue’
Expected type: HTrue
Actual type: Or HFalse HFalse
diff --git a/testsuite/tests/ghci/scripts/ghci048.stderr b/testsuite/tests/ghci/scripts/ghci048.stderr
index 1b96e5da07..27cc18f708 100644
--- a/testsuite/tests/ghci/scripts/ghci048.stderr
+++ b/testsuite/tests/ghci/scripts/ghci048.stderr
@@ -1,10 +1,10 @@
-<interactive>:4:16:
+<interactive>:3:16:
Multiple declarations of ‘A’
- Declared at: <interactive>:4:12
- <interactive>:4:16
+ Declared at: <interactive>:3:12
+ <interactive>:3:16
-<interactive>:6:16:
+<interactive>:5:16:
Multiple declarations of ‘A’
- Declared at: <interactive>:6:12
- <interactive>:6:16
+ Declared at: <interactive>:5:12
+ <interactive>:5:16
diff --git a/testsuite/tests/ghci/scripts/ghci050.stderr b/testsuite/tests/ghci/scripts/ghci050.stderr
index d1df9b8379..4b454bd8bf 100644
--- a/testsuite/tests/ghci/scripts/ghci050.stderr
+++ b/testsuite/tests/ghci/scripts/ghci050.stderr
@@ -1,13 +1,13 @@
-<interactive>:6:49: error:
+<interactive>:5:49: error:
Couldn't match expected type ‘ListableElem (a, a)’
with actual type ‘a’
‘a’ is a rigid type variable bound by
- the instance declaration at <interactive>:6:10
+ the instance declaration at <interactive>:5:10
Relevant bindings include
- b :: a (bound at <interactive>:6:43)
- a :: a (bound at <interactive>:6:41)
+ b :: a (bound at <interactive>:5:43)
+ a :: a (bound at <interactive>:5:41)
asList :: (a, a) -> [ListableElem (a, a)]
- (bound at <interactive>:6:33)
+ (bound at <interactive>:5:33)
In the expression: a
In the expression: [a, b]
diff --git a/testsuite/tests/ghci/scripts/ghci051.stderr b/testsuite/tests/ghci/scripts/ghci051.stderr
index 2a528e847a..7a33dd57b6 100644
--- a/testsuite/tests/ghci/scripts/ghci051.stderr
+++ b/testsuite/tests/ghci/scripts/ghci051.stderr
@@ -1,9 +1,9 @@
-<interactive>:7:9: error:
+<interactive>:6:9: error:
Couldn't match type ‘T’
with ‘Ghci1.T’
- NB: ‘Ghci1.T’ is defined at <interactive>:3:1-14
- ‘T’ is defined at <interactive>:6:1-16
+ NB: ‘Ghci1.T’ is defined at <interactive>:2:1-14
+ ‘T’ is defined at <interactive>:5:1-16
Expected type: T'
Actual type: T
In the expression: C :: T'
diff --git a/testsuite/tests/ghci/scripts/ghci051.stdout b/testsuite/tests/ghci/scripts/ghci051.stdout
index f69b0e2de3..a3542869a5 100644
--- a/testsuite/tests/ghci/scripts/ghci051.stdout
+++ b/testsuite/tests/ghci/scripts/ghci051.stdout
@@ -1,9 +1,9 @@
-data T = C | D -- Defined at <interactive>:9:1
-type T' = Ghci1.T -- Defined at <interactive>:4:1
-data Ghci1.T = A | ... -- Defined at <interactive>:3:10
-data Ghci4.T = B | ... -- Defined at <interactive>:6:12
-data T = C | ... -- Defined at <interactive>:9:14
-data T = ... | D -- Defined at <interactive>:9:18
-b :: T' -- Defined at <interactive>:5:5
-c :: Ghci4.T -- Defined at <interactive>:8:5
-d :: T -- Defined at <interactive>:10:5
+data T = C | D -- Defined at <interactive>:8:1
+type T' = Ghci1.T -- Defined at <interactive>:3:1
+data Ghci1.T = A | ... -- Defined at <interactive>:2:10
+data Ghci4.T = B | ... -- Defined at <interactive>:5:12
+data T = C | ... -- Defined at <interactive>:8:14
+data T = ... | D -- Defined at <interactive>:8:18
+b :: T' -- Defined at <interactive>:4:5
+c :: Ghci4.T -- Defined at <interactive>:7:5
+d :: T -- Defined at <interactive>:9:5
diff --git a/testsuite/tests/ghci/scripts/ghci052.stderr b/testsuite/tests/ghci/scripts/ghci052.stderr
index ce221887d6..4464891168 100644
--- a/testsuite/tests/ghci/scripts/ghci052.stderr
+++ b/testsuite/tests/ghci/scripts/ghci052.stderr
@@ -1,32 +1,32 @@
-<interactive>:9:4: error:
+<interactive>:8:4: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Planet’ is defined at <interactive>:8:1-36
- ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
+ NB: ‘Planet’ is defined at <interactive>:7:1-36
+ ‘Ghci1.Planet’ is defined at <interactive>:4:1-37
In the first argument of ‘pn’, namely ‘Mercury’
In the expression: pn Mercury
-<interactive>:10:4: error:
+<interactive>:9:4: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Planet’ is defined at <interactive>:8:1-36
- ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
+ NB: ‘Planet’ is defined at <interactive>:7:1-36
+ ‘Ghci1.Planet’ is defined at <interactive>:4:1-37
In the first argument of ‘pn’, namely ‘Venus’
In the expression: pn Venus
-<interactive>:11:4: error:
+<interactive>:10:4: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Planet’ is defined at <interactive>:8:1-36
- ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
+ NB: ‘Planet’ is defined at <interactive>:7:1-36
+ ‘Ghci1.Planet’ is defined at <interactive>:4:1-37
In the first argument of ‘pn’, namely ‘Mars’
In the expression: pn Mars
-<interactive>:13:44: error:
+<interactive>:12:44: error:
Couldn't match expected type ‘Planet’
with actual type ‘Ghci1.Planet’
- NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
- ‘Planet’ is defined at <interactive>:8:1-36
+ NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-37
+ ‘Planet’ is defined at <interactive>:7:1-36
In the pattern: Earth
In an equation for ‘pn’: pn Earth = "E"
diff --git a/testsuite/tests/ghci/scripts/ghci053.stderr b/testsuite/tests/ghci/scripts/ghci053.stderr
index fe6d6c9bef..bb038faf23 100644
--- a/testsuite/tests/ghci/scripts/ghci053.stderr
+++ b/testsuite/tests/ghci/scripts/ghci053.stderr
@@ -1,16 +1,16 @@
-<interactive>:10:12: error:
+<interactive>:9:12: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Planet’ is defined at <interactive>:8:1-41
- ‘Ghci1.Planet’ is defined at <interactive>:5:1-49
+ NB: ‘Planet’ is defined at <interactive>:7:1-41
+ ‘Ghci1.Planet’ is defined at <interactive>:4:1-49
In the second argument of ‘(==)’, namely ‘Mercury’
In the expression: mercury == Mercury
-<interactive>:12:10: error:
+<interactive>:11:10: error:
Couldn't match expected type ‘Planet’
with actual type ‘Ghci1.Planet’
- NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-49
- ‘Planet’ is defined at <interactive>:8:1-41
+ NB: ‘Ghci1.Planet’ is defined at <interactive>:4:1-49
+ ‘Planet’ is defined at <interactive>:7:1-41
In the second argument of ‘(==)’, namely ‘Earth’
In the expression: Venus == Earth
diff --git a/testsuite/tests/ghci/scripts/ghci057.stderr b/testsuite/tests/ghci/scripts/ghci057.stderr
index a663562a60..8c7ac45202 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stderr
+++ b/testsuite/tests/ghci/scripts/ghci057.stderr
@@ -1,5 +1,5 @@
-<interactive>:5:1: error:
+<interactive>:4:1: error:
Illegal generalised algebraic data declaration for ‘T’
(Use GADTs to allow GADTs)
In the data declaration for ‘T’
diff --git a/testsuite/tests/ghci/should_run/T9914.stdout b/testsuite/tests/ghci/should_run/T9914.stdout
index 3dd5aff3f3..d9407d3877 100644
--- a/testsuite/tests/ghci/should_run/T9914.stdout
+++ b/testsuite/tests/ghci/should_run/T9914.stdout
@@ -1,5 +1,5 @@
1
2
2
-data T1 = MkT1 -- Defined at <interactive>:7:1
-data T2 = MkT2 -- Defined at <interactive>:9:2
+data T1 = MkT1 -- Defined at <interactive>:6:1
+data T2 = MkT2 -- Defined at <interactive>:8:2
diff --git a/testsuite/tests/ghci/should_run/T9915.stderr b/testsuite/tests/ghci/should_run/T9915.stderr
index 333f17ac81..95f5758517 100644
--- a/testsuite/tests/ghci/should_run/T9915.stderr
+++ b/testsuite/tests/ghci/should_run/T9915.stderr
@@ -1,5 +1,5 @@
-<interactive>:3:9: error:
+<interactive>:2:9: error:
parse error on input ‘=’
Perhaps you need a 'let' in a 'do' block?
e.g. 'let x = 5' instead of 'x = 5'
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T10398.hs b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.hs
new file mode 100644
index 0000000000..bbd498cfad
--- /dev/null
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.hs
@@ -0,0 +1,25 @@
+module Foo
+(
+ -- The reference to chunk2 should show up in the -ddump-parsed output.
+ -- $chunk1
+ -- $chunk2
+ foo,
+ -- $chunk3
+ bar
+)
+where
+
+{- $chunk1
+This is chunk 1.
+-}
+
+{- $chunk2
+This is chunk 2.
+-}
+
+{- $chunk3
+This is chunk 3.
+-}
+
+foo = 3
+bar = 7
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T10398.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.stderr
new file mode 100644
index 0000000000..4a51fcd55d
--- /dev/null
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/T10398.stderr
@@ -0,0 +1,13 @@
+
+==================== Parser ====================
+module Foo (
+ <IEDocNamed: chunk1>, <IEDocNamed: chunk2>, foo,
+ <IEDocNamed: chunk3>, bar
+ ) where
+<document comment>
+<document comment>
+<document comment>
+foo = 3
+bar = 7
+
+
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/all.T b/testsuite/tests/haddock/should_compile_flag_haddock/all.T
index 61b6c6c1e0..a0d1d7c07d 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/all.T
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/all.T
@@ -31,3 +31,5 @@ test('haddockA030', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA031', normal, compile, ['-haddock -ddump-parsed -XExistentialQuantification'])
test('haddockA032', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA033', normal, compile, ['-haddock -ddump-parsed'])
+test('haddockA034', normal, compile, ['-haddock -ddump-parsed'])
+test('T10398', normal, compile, ['-haddock -ddump-parsed'])
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs
new file mode 100644
index 0000000000..195d76c34a
--- /dev/null
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs #-}
+
+module Hi where
+
+-- | This is a GADT.
+data Hi where
+ -- | This is a GADT constructor.
+ Hi :: () -> Hi
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr
new file mode 100644
index 0000000000..f743393349
--- /dev/null
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA034.stderr
@@ -0,0 +1,5 @@
+
+==================== Parser ====================
+module Hi where
+<document comment>
+data Hi where This is a GADT constructor. Hi :: () -> Hi
diff --git a/testsuite/tests/numeric/should_compile/T7116.stdout b/testsuite/tests/numeric/should_compile/T7116.stdout
index 520460da36..943908249d 100644
--- a/testsuite/tests/numeric/should_compile/T7116.stdout
+++ b/testsuite/tests/numeric/should_compile/T7116.stdout
@@ -2,6 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 22, types: 14, coercions: 0}
+-- RHS size: {terms: 8, types: 3, coercions: 0}
dl :: Double -> Double
[GblId,
Arity=1,
@@ -15,6 +16,7 @@ dl :: Double -> Double
dl =
\ (x :: Double) -> case x of _ [Occ=Dead] { D# y -> D# (+## y y) }
+-- RHS size: {terms: 1, types: 0, coercions: 0}
dr :: Double -> Double
[GblId,
Arity=1,
@@ -27,6 +29,7 @@ dr :: Double -> Double
case x of _ [Occ=Dead] { D# x1 -> D# (+## x1 x1) }}]
dr = dl
+-- RHS size: {terms: 8, types: 3, coercions: 0}
fl :: Float -> Float
[GblId,
Arity=1,
@@ -41,6 +44,7 @@ fl =
\ (x :: Float) ->
case x of _ [Occ=Dead] { F# y -> F# (plusFloat# y y) }
+-- RHS size: {terms: 1, types: 0, coercions: 0}
fr :: Float -> Float
[GblId,
Arity=1,
diff --git a/testsuite/tests/package/package09e.stderr b/testsuite/tests/package/package09e.stderr
index 9cd00a2930..70c6f22d89 100644
--- a/testsuite/tests/package/package09e.stderr
+++ b/testsuite/tests/package/package09e.stderr
@@ -1,5 +1,5 @@
package09e.hs:2:1:
Ambiguous interface for ‘M’:
- it is bound as Data.Set by a package flag
it is bound as Data.Map by a package flag
+ it is bound as Data.Set by a package flag
diff --git a/testsuite/tests/parser/should_compile/all.T b/testsuite/tests/parser/should_compile/all.T
index 521b5a42a0..0030040aed 100644
--- a/testsuite/tests/parser/should_compile/all.T
+++ b/testsuite/tests/parser/should_compile/all.T
@@ -41,7 +41,7 @@ test('read025', normal, compile, [''])
test('read026', normal, compile, [''])
test('read027', normal, compile, [''])
test('read028', normal, compile, [''])
-test('read029', normal, compile, [''])
+test('read029', expect_broken_for(10181, ['optasm', 'optllvm']), compile, [''])
test('read030', normal, compile, [''])
test('read031', normal, compile, [''])
test('read032', normal, compile, [''])
diff --git a/testsuite/tests/partial-sigs/should_compile/Splices.hs b/testsuite/tests/partial-sigs/should_compile/Splices.hs
new file mode 100644
index 0000000000..9202c18995
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/Splices.hs
@@ -0,0 +1,30 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE NamedWildCards #-}
+module Splices where
+
+import Language.Haskell.TH
+import Language.Haskell.TH.Lib (wildCardT)
+
+metaType1 :: TypeQ
+metaType1 = wildCardT
+
+metaType2 :: TypeQ
+metaType2 = [t| _ |]
+
+metaType3 :: TypeQ
+metaType3 = [t| _ -> _ -> _ |]
+
+metaDec1 :: Q [Dec]
+metaDec1 = [d| foo :: _ => _
+ foo x y = x == y |]
+
+metaDec2 :: Q [Dec]
+metaDec2 = [d| bar :: _a -> _b -> (_a, _b)
+ bar x y = (not x, y) |]
+
+-- An expression with a partial type annotation
+metaExp1 :: ExpQ
+metaExp1 = [| Just True :: Maybe _ |]
+
+metaExp2 :: ExpQ
+metaExp2 = [| id :: _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs
new file mode 100644
index 0000000000..21e599dcf6
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE PartialTypeSignatures #-}
+module SplicesUsed where
+
+import Splices
+
+maybeBool :: $(metaType1)
+maybeBool = $(metaExp2) $(metaExp1)
+
+charA :: a -> $(metaType2)
+charA x = ('x', x)
+
+filter' :: $(metaType3)
+filter' = filter
+
+$(metaDec1)
+
+$(metaDec2)
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
new file mode 100644
index 0000000000..312cf25217
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
@@ -0,0 +1,73 @@
+[1 of 2] Compiling Splices ( Splices.hs, Splices.o )
+[2 of 2] Compiling SplicesUsed ( SplicesUsed.hs, SplicesUsed.o )
+
+SplicesUsed.hs:7:16: warning:
+ Found type wildcard ‘_’ standing for ‘Maybe Bool’
+ In the type signature for ‘maybeBool’: _
+
+SplicesUsed.hs:8:15: warning:
+ Found type wildcard ‘_a’ standing for ‘Maybe Bool’
+ Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+ In an expression type signature: _a -> _a
+ In the expression: id :: _a -> _a
+ In the expression: (id :: _a -> _a) (Just True :: Maybe _)
+
+SplicesUsed.hs:8:27: warning:
+ Found type wildcard ‘_’ standing for ‘Bool’
+ Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+ In an expression type signature: Maybe _
+ In the first argument of ‘id :: _a -> _a’, namely
+ ‘(Just True :: Maybe _)’
+ In the expression: (id :: _a -> _a) (Just True :: Maybe _)
+
+SplicesUsed.hs:10:17: warning:
+ Found type wildcard ‘_’ standing for ‘(Char, a)’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of charA :: a -> (Char, a)
+ at SplicesUsed.hs:10:10
+ In the type signature for ‘charA’: a -> _
+
+SplicesUsed.hs:13:14: warning:
+ 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]
+ at SplicesUsed.hs:14:1
+ In the type signature for ‘filter'’: _ -> _ -> _
+
+SplicesUsed.hs:13:14: warning:
+ Found type wildcard ‘_’ standing for ‘[a]’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ In the type signature for ‘filter'’: _ -> _ -> _
+
+SplicesUsed.hs:13:14: warning:
+ Found type wildcard ‘_’ standing for ‘[a]’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ In the type signature for ‘filter'’: _ -> _ -> _
+
+SplicesUsed.hs:16:3: warning:
+ Found hole ‘_’ with inferred constraints: Eq a
+ In the type signature for ‘foo’: _ => _
+
+SplicesUsed.hs:16:3: warning:
+ 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
+ In the type signature for ‘foo’: _ => _
+
+SplicesUsed.hs:18:3: warning:
+ Found type wildcard ‘_a’ standing for ‘Bool’
+ In the type signature for ‘bar’: _a -> _b -> (_a, _b)
+
+SplicesUsed.hs:18:3: warning:
+ Found type wildcard ‘_b’ standing for ‘w_b’
+ Where: ‘w_b’ is a rigid type variable bound by
+ the inferred type of bar :: Bool -> w_b -> (Bool, w_b)
+ at SplicesUsed.hs:18:3
+ In the type signature for ‘bar’: _a -> _b -> (_a, _b)
diff --git a/testsuite/tests/partial-sigs/should_compile/TypedSplice.hs b/testsuite/tests/partial-sigs/should_compile/TypedSplice.hs
new file mode 100644
index 0000000000..ef09c4d093
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/TypedSplice.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE NamedWildCards #-}
+{-# LANGUAGE PartialTypeSignatures #-}
+module TypedSplice where
+
+import Language.Haskell.TH
+
+metaExp :: Q (TExp (Bool -> Bool))
+metaExp = [|| not :: _ -> _b ||]
diff --git a/testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr b/testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr
new file mode 100644
index 0000000000..3cfa776ef1
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr
@@ -0,0 +1,16 @@
+
+TypedSplice.hs:9:22: warning:
+ Found type wildcard ‘_’ standing for ‘Bool’
+ Relevant bindings include
+ metaExp :: Q (TExp (Bool -> Bool)) (bound at TypedSplice.hs:9:1)
+ In an expression type signature: _ -> _b
+ In the Template Haskell quotation [|| not :: _ -> _b ||]
+ In the expression: [|| not :: _ -> _b ||]
+
+TypedSplice.hs:9:27: warning:
+ Found type wildcard ‘_b’ standing for ‘Bool’
+ Relevant bindings include
+ metaExp :: Q (TExp (Bool -> Bool)) (bound at TypedSplice.hs:9:1)
+ In an expression type signature: _ -> _b
+ In the Template Haskell quotation [|| not :: _ -> _b ||]
+ In the expression: [|| not :: _ -> _b ||]
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index c86e14ed38..5597183712 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -46,6 +46,10 @@ test('SomethingShowable', normal, compile, ['-ddump-types -fno-warn-partial-type
test('Uncurry', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('UncurryNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('WarningWildcardInstantiations', normal, compile, ['-ddump-types'])
+test('SplicesUsed', [req_interp, only_compiler_types(['ghc']), when(compiler_profiled(), skip),
+ extra_clean(['Splices.o', 'Splices.hi'])],
+ multimod_compile, ['SplicesUsed', ''])
+test('TypedSplice', [req_interp, normal], compile, [''])
test('T10403', normal, compile, [''])
test('T10438', normal, compile, [''])
test('T10519', normal, compile, [''])
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs
new file mode 100644
index 0000000000..8a7ce369e8
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs
@@ -0,0 +1,3 @@
+module ExtraConstraintsWildcardInExpressionSignature where
+
+foo x y = ((==) :: _ => _) x y
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
new file mode 100644
index 0000000000..5432eafc4e
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
@@ -0,0 +1,6 @@
+
+ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error:
+ Invalid partial type: _ => _
+ An extra-constraints wild card is only allowed
+ in the top-level context
+ In an expression type signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs
new file mode 100644
index 0000000000..9fcbf51cbe
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+module ExtraConstraintsWildcardInPatternSignature where
+
+foo (x :: _ => _) y = x == y
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
new file mode 100644
index 0000000000..71b3132dc5
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
@@ -0,0 +1,6 @@
+
+ExtraConstraintsWildcardInPatternSignature.hs:4:11: error:
+ Invalid partial type: _ => _
+ An extra-constraints wild card is only allowed
+ in the top-level context
+ In a pattern type-signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs
new file mode 100644
index 0000000000..1015fd53d1
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+module ExtraConstraintsWildcardInPatternSplice where
+
+foo $( [p| (x :: _) |] ) = x
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
new file mode 100644
index 0000000000..784f437966
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
@@ -0,0 +1,4 @@
+
+ExtraConstraintsWildcardInPatternSplice.hs:5:8: error:
+ Type signatures in patterns not (yet) handled by Template Haskell
+ x :: _
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs
new file mode 100644
index 0000000000..c8c54f7819
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+module ExtraConstraintsWildcardInTypeSplice where
+
+import Language.Haskell.TH
+
+metaType :: TypeQ
+metaType = [t| _ => _ |]
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
new file mode 100644
index 0000000000..4f6822c7c4
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+module ExtraConstraintsWildcardInTypeSplice2 where
+
+import Language.Haskell.TH.Lib (wildCardT)
+
+show' :: $(wildCardT) => a -> String
+show' x = show x
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
new file mode 100644
index 0000000000..30efa4d83f
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
@@ -0,0 +1,4 @@
+
+ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error:
+ Unexpected wild card: ‘_’
+ In the type signature for ‘show'’: show' :: (_) => a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs
new file mode 100644
index 0000000000..632f66798f
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TemplateHaskell #-}
+module ExtraConstraintsWildcardInTypeSpliceUsed where
+
+import ExtraConstraintsWildcardInTypeSplice
+
+-- An extra-constraints wild card is not supported in type splices
+eq :: $(metaType)
+eq x y = x == y
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
new file mode 100644
index 0000000000..c13fe94d89
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
@@ -0,0 +1,8 @@
+[1 of 2] Compiling ExtraConstraintsWildcardInTypeSplice ( ExtraConstraintsWildcardInTypeSplice.hs, ExtraConstraintsWildcardInTypeSplice.o )
+[2 of 2] Compiling ExtraConstraintsWildcardInTypeSpliceUsed ( ExtraConstraintsWildcardInTypeSpliceUsed.hs, ExtraConstraintsWildcardInTypeSpliceUsed.o )
+
+ExtraConstraintsWildcardInTypeSpliceUsed.hs:7:9: error:
+ Invalid partial type: _ => _
+ An extra-constraints wild card is not allowed in a type splice
+ In the spliced type _ => _
+ In the untyped splice: $metaType
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs
new file mode 100644
index 0000000000..c0c5fcab7c
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE NamedWildCards #-}
+module NamedWildcardInTypeSplice where
+
+import Language.Haskell.TH
+
+metaType :: TypeQ
+metaType = [t| _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
new file mode 100644
index 0000000000..9071531a13
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
@@ -0,0 +1,5 @@
+
+NamedWildcardInTypeSplice.hs:8:16: error:
+ Unexpected wild card: ‘_a’
+ In a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs
deleted file mode 100644
index f11ac5a9f1..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-{-# LANGUAGE TemplateHaskell #-}
-module WildcardInTypeBrackets where
-
-foo = [t| _ |]
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr
deleted file mode 100644
index f72fa7a3aa..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr
+++ /dev/null
@@ -1,2 +0,0 @@
-
-WildcardInTypeBrackets.hs:4:11: Unexpected wild card: ‘_’
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index 44a35b1cee..9417a3ed8f 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -1,6 +1,16 @@
test('AnnotatedConstraint', normal, compile_fail, [''])
test('AnnotatedConstraintNotForgotten', normal, compile_fail, [''])
test('Defaulting1MROff', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInExpressionSignature', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInTypeSpliceUsed',
+ [req_interp, when(compiler_profiled(), skip),
+ extra_clean(['ExtraConstraintsWildcardInTypeSplice.o', 'ExtraConstraintsWildcardInTypeSplice.hi'])],
+ multimod_compile_fail, ['ExtraConstraintsWildcardInTypeSpliceUsed', ''])
+test('ExtraConstraintsWildcardInTypeSplice2',
+ [req_interp, when(compiler_profiled(), skip)],
+ compile_fail, [''])
test('ExtraConstraintsWildcardNotEnabled', normal, compile_fail, [''])
test('ExtraConstraintsWildcardNotLast', normal, compile_fail, [''])
test('ExtraConstraintsWildcardNotPresent', normal, compile_fail, [''])
@@ -8,6 +18,7 @@ test('ExtraConstraintsWildcardTwice', normal, compile_fail, [''])
test('Forall1Bad', normal, compile_fail, [''])
test('InstantiatedNamedWildcardsInConstraints', normal, compile_fail, [''])
test('NamedExtraConstraintsWildcard', normal, compile_fail, [''])
+test('NamedWildcardInTypeSplice', normal, compile_fail, [''])
test('NamedWildcardsEnabled', normal, compile_fail, [''])
test('NamedWildcardsNotEnabled', normal, compile_fail, [''])
test('NamedWildcardsNotInMonotype', normal, compile_fail, [''])
@@ -42,7 +53,6 @@ test('WildcardInPatSynSig', normal, compile_fail, [''])
test('WildcardInNewtype', normal, compile_fail, [''])
test('WildcardInStandaloneDeriving', normal, compile_fail, [''])
test('WildcardInstantiations', normal, compile_fail, [''])
-test('WildcardInTypeBrackets', req_interp, compile_fail, [''])
test('WildcardInTypeFamilyInstanceLHS', normal, compile_fail, [''])
test('WildcardInTypeFamilyInstanceRHS', normal, compile_fail, [''])
test('WildcardInTypeSynonymLHS', normal, compile_fail, [''])
diff --git a/testsuite/tests/patsyn/should_run/ghci.stderr b/testsuite/tests/patsyn/should_run/ghci.stderr
index 9593b15633..9740d06859 100644
--- a/testsuite/tests/patsyn/should_run/ghci.stderr
+++ b/testsuite/tests/patsyn/should_run/ghci.stderr
@@ -1,2 +1,2 @@
-*** Exception: <interactive>:6:5-35: Non-exhaustive patterns in function foo
+*** Exception: <interactive>:5:5-35: Non-exhaustive patterns in function foo
diff --git a/testsuite/tests/patsyn/should_run/ghci.stdout b/testsuite/tests/patsyn/should_run/ghci.stdout
index e434de3dd6..3dcecbc7a6 100644
--- a/testsuite/tests/patsyn/should_run/ghci.stdout
+++ b/testsuite/tests/patsyn/should_run/ghci.stdout
@@ -1,3 +1,3 @@
-pattern Single :: t -> [t] -- Defined at <interactive>:4:1
+pattern Single :: t -> [t] -- Defined at <interactive>:3:1
foo :: [Bool] -> [Bool]
[False]
diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index 94f7cbd8ac..1e5a16c9c7 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -5,7 +5,7 @@
test('haddock.base',
[unless(in_tree_compiler(), skip), req_haddock
,stats_num_field('bytes allocated',
- [(wordsize(64), 9014511528, 5)
+ [(wordsize(64), 9418857192, 5)
# 2012-08-14: 5920822352 (amd64/Linux)
# 2012-09-20: 5829972376 (amd64/Linux)
# 2012-10-08: 5902601224 (amd64/Linux)
@@ -23,6 +23,7 @@ test('haddock.base',
# 2014-10-07: 8322584616 (x86_64/Linux)
# 2014-12-14: 9502647104 (x86_64/Linux) - Update to Haddock 2.16
# 2014-01-08: 9014511528 (x86_64/Linux) - Eliminate so-called "silent superclass parameters" (and others)
+ # 2015-07-22: 9418857192 (x86_64/Linux) - Just slowly creeping up.
,(platform('i386-unknown-mingw32'), 4434804940, 5)
# 2013-02-10: 3358693084 (x86/Windows)
diff --git a/testsuite/tests/polykinds/T10670.hs b/testsuite/tests/polykinds/T10670.hs
new file mode 100644
index 0000000000..5b9cc72e21
--- /dev/null
+++ b/testsuite/tests/polykinds/T10670.hs
@@ -0,0 +1,24 @@
+{-# LANGUAGE ScopedTypeVariables, RankNTypes, GADTs, PolyKinds #-}
+
+module T10670 where
+
+import Unsafe.Coerce
+
+data TypeRepT (a::k) where
+ TRCon :: TypeRepT a
+
+data G2 c a where
+ G2 :: TypeRepT a -> TypeRepT b -> G2 c (c a b)
+
+getT2 :: TypeRepT (c :: k2 -> k1 -> k) -> TypeRepT (a :: k) -> Maybe (G2 c a)
+{-# NOINLINE getT2 #-}
+getT2 c t = Nothing
+
+tyRepTArr :: TypeRepT (->)
+{-# NOINLINE tyRepTArr #-}
+tyRepTArr = TRCon
+
+s :: forall a x. TypeRepT (a :: *) -> Maybe x
+s tf = case getT2 tyRepTArr tf :: Maybe (G2 (->) a) of
+ Just (G2 _ _) -> Nothing
+ _ -> Nothing
diff --git a/testsuite/tests/polykinds/T10670a.hs b/testsuite/tests/polykinds/T10670a.hs
new file mode 100644
index 0000000000..d398cb72a8
--- /dev/null
+++ b/testsuite/tests/polykinds/T10670a.hs
@@ -0,0 +1,54 @@
+{-# LANGUAGE GADTs , PolyKinds #-}
+
+module Bug2 where
+
+import Unsafe.Coerce
+
+data TyConT (a::k) = TyConT String
+
+eqTyConT :: TyConT a -> TyConT b -> Bool
+eqTyConT (TyConT a) (TyConT b) = a == b
+
+
+
+tyConTArr :: TyConT (->)
+tyConTArr = TyConT "(->)"
+
+
+data TypeRepT (a::k) where
+ TRCon :: TyConT a -> TypeRepT a
+ TRApp :: TypeRepT a -> TypeRepT b -> TypeRepT (a b)
+
+
+data GetAppT a where
+ GA :: TypeRepT a -> TypeRepT b -> GetAppT (a b)
+
+getAppT :: TypeRepT a -> Maybe (GetAppT a)
+getAppT (TRApp a b) = Just $ GA a b
+getAppT _ = Nothing
+
+
+
+eqTT :: TypeRepT (a::k1) -> TypeRepT (b::k2) -> Bool
+eqTT (TRCon a) (TRCon b) = eqTyConT a b
+eqTT (TRApp c a) (TRApp d b) = eqTT c d && eqTT a b
+eqTT _ _ = False
+
+
+data G2 c a where
+ G2 :: TypeRepT a -> TypeRepT b -> G2 c (c a b)
+
+
+getT2 :: TypeRepT (c :: k2 -> k1 -> k) -> TypeRepT (a :: k) -> Maybe (G2 c a)
+getT2 c t = do GA t' b <- getAppT t
+ GA c' a <- getAppT t'
+ if eqTT c c'
+ then Just (unsafeCoerce $ G2 a b :: G2 c a)
+ else Nothing
+
+tyRepTArr :: TypeRepT (->)
+tyRepTArr = TRCon tyConTArr
+
+s tf = case getT2 tyRepTArr tf
+ of Just (G2 _ _) -> Nothing
+ _ -> Nothing
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index c05e47e4a9..3c8096cbcb 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -117,3 +117,5 @@ test('T10451', normal, compile_fail, [''])
test('T10516', normal, compile_fail, [''])
test('T10503', normal, compile_fail, [''])
test('T10570', normal, compile_fail, [''])
+test('T10670', normal, compile, [''])
+test('T10670a', normal, compile, [''])
diff --git a/testsuite/tests/primops/should_run/T9430.hs b/testsuite/tests/primops/should_run/T9430.hs
index 571b6db37d..aec2d264a1 100644
--- a/testsuite/tests/primops/should_run/T9430.hs
+++ b/testsuite/tests/primops/should_run/T9430.hs
@@ -73,3 +73,21 @@ main = do
checkW (1, minBound + 1) plusWord2# maxBound 2
check "plusWord2# 2 maxBound" $
checkW (1, minBound + 1) plusWord2# 2 maxBound
+
+ check "timesWord2# maxBound 0" $ checkW (0, 0) timesWord2# maxBound 0
+ check "timesWord2# 0 maxBound" $ checkW (0, 0) timesWord2# 0 maxBound
+ check "timesWord2# maxBound 1" $ checkW (0, maxBound) timesWord2# maxBound 1
+ check "timesWord2# 1 maxBound" $ checkW (0, maxBound) timesWord2# 1 maxBound
+ -- Overflows
+ check "timesWord2# " $ checkW (1, 0) timesWord2# (2 ^ 63) 2
+ check "timesWord2# " $ checkW (2, 0) timesWord2# (2 ^ 63) (2 ^ 2)
+ check "timesWord2# " $ checkW (4, 0) timesWord2# (2 ^ 63) (2 ^ 3)
+ check "timesWord2# " $ checkW (8, 0) timesWord2# (2 ^ 63) (2 ^ 4)
+ check "timesWord2# maxBound 2" $
+ checkW (1, maxBound - 1) timesWord2# maxBound 2
+ check "timesWord2# 2 maxBound" $
+ checkW (1, maxBound - 1) timesWord2# 2 maxBound
+ check "timesWord2# maxBound 3" $
+ checkW (2, maxBound - 2) timesWord2# maxBound 3
+ check "timesWord2# 3 maxBound" $
+ checkW (2, maxBound - 2) timesWord2# 3 maxBound
diff --git a/testsuite/tests/quasiquotation/qq007/test.T b/testsuite/tests/quasiquotation/qq007/test.T
index 0b4448cdc0..d9a2df31d3 100644
--- a/testsuite/tests/quasiquotation/qq007/test.T
+++ b/testsuite/tests/quasiquotation/qq007/test.T
@@ -2,6 +2,7 @@ test('qq007',
[when(fast(), skip),
extra_clean(['QQ.hi', 'QQ.o', 'Test.hi', 'Test.o']),
pre_cmd('$MAKE -s --no-print-directory TH_QQ'),
+ expect_broken(10047),
],
multimod_compile,
['Test', '-v0'])
diff --git a/testsuite/tests/quasiquotation/qq008/test.T b/testsuite/tests/quasiquotation/qq008/test.T
index 8cac1a9f0a..5bdd2a9822 100644
--- a/testsuite/tests/quasiquotation/qq008/test.T
+++ b/testsuite/tests/quasiquotation/qq008/test.T
@@ -2,6 +2,7 @@ test('qq008',
[when(fast(), skip),
extra_clean(['QQ.hi', 'QQ.o', 'Test.hi', 'Test.o']),
pre_cmd('$MAKE -s --no-print-directory TH_QQ'),
+ expect_broken(10047),
],
multimod_compile,
['Test', '-v0'])
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 7f0d410b58..8a597827fe 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -53,7 +53,7 @@ test('rn037', normal, compile, [''])
test('rn039', normal, compile, [''])
test('rn040', normal, compile, ['-fwarn-unused-binds -fwarn-unused-matches'])
-test('rn041', normal, compile, [''])
+test('rn041', expect_broken_for(10181, ['optasm', 'optllvm']), compile, [''])
test('rn042',
extra_clean(['Rn042_A.hi', 'Rn042_A.o']),
multimod_compile,
diff --git a/testsuite/tests/rename/should_fail/T10668.hs b/testsuite/tests/rename/should_fail/T10668.hs
new file mode 100644
index 0000000000..111637b19b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T10668.hs
@@ -0,0 +1,3 @@
+module T10668 where
+
+import Data.Type.Equality(Refl)
diff --git a/testsuite/tests/rename/should_fail/T10668.stderr b/testsuite/tests/rename/should_fail/T10668.stderr
new file mode 100644
index 0000000000..8c96fad1a8
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T10668.stderr
@@ -0,0 +1,8 @@
+
+T10668.hs:3:27: error:
+ In module ‘Data.Type.Equality’:
+ ‘Refl’ is a data constructor of ‘(:~:)’
+ To import it use
+ ‘import’ Data.Type.Equality( (:~:)( Refl ) )
+ or
+ ‘import’ Data.Type.Equality( (:~:)(..) )
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index bfd81c51f9..80471a6960 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -134,3 +134,4 @@ test('T9032',
run_command,
['$MAKE -s --no-print-directory T9032'])
test('T10618', normal, compile_fail, [''])
+test('T10668', normal, compile_fail, [''])
diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr
index dc03073428..5ecdd16e10 100644
--- a/testsuite/tests/roles/should_compile/Roles13.stderr
+++ b/testsuite/tests/roles/should_compile/Roles13.stderr
@@ -2,10 +2,12 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 5, types: 9, coercions: 5}
+-- RHS size: {terms: 2, types: 2, coercions: 0}
a :: Wrap Age -> Wrap Age
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType]
a = \ (ds :: Wrap Age) -> ds
+-- RHS size: {terms: 1, types: 0, coercions: 5}
convert :: Wrap Age -> Int
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType]
convert =
diff --git a/testsuite/tests/rts/Makefile b/testsuite/tests/rts/Makefile
index 644d74110e..52de19c876 100644
--- a/testsuite/tests/rts/Makefile
+++ b/testsuite/tests/rts/Makefile
@@ -7,19 +7,19 @@ outofmem-prep::
outofmem::
@$(MAKE) outofmem-prep
- @ulimit -v 10000000 2>/dev/null; ./outofmem || echo "exit($$?)"
+ @ulimit -m 10000000 2>/dev/null; ./outofmem || echo "exit($$?)"
outofmem2-prep::
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -rtsopts --make -fforce-recomp outofmem2.hs -o outofmem2
outofmem2::
@$(MAKE) outofmem2-prep
- @ulimit -v 1000000 2>/dev/null; ./outofmem2 +RTS -M5m -RTS || echo "exit($$?)"
+ @ulimit -m 1000000 2>/dev/null; ./outofmem2 +RTS -M5m -RTS || echo "exit($$?)"
T2615-prep:
$(RM) libfoo_T2615.so
'$(TEST_HC)' $(TEST_HC_OPTS) -fPIC -c libfoo_T2615.c -o libfoo_T2615.o
- '$(TEST_HC)' $(TEST_HC_OPTS) -shared -no-auto-link-packages libfoo_T2615.o -o libfoo_T2615.so
+ '$(TEST_HC)' $(filter-out -rtsopts, $(TEST_HC_OPTS)) -shared -no-auto-link-packages libfoo_T2615.o -o libfoo_T2615.so
.PHONY: T4059
T4059:
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index 0e892499e0..0e891e8f1b 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -2,6 +2,13 @@ test('testblockalloc',
[c_src, only_ways(['normal','threaded1']), extra_run_opts('+RTS -I0')],
compile_and_run, [''])
+test('testmblockalloc',
+ [c_src, only_ways(['normal','threaded1']), extra_run_opts('+RTS -I0')],
+ compile_and_run, [''])
+# -I0 is important: the idle GC will run the memory leak detector,
+# which will crash because the mblocks we allocate are not in a state
+# the leak detector is expecting.
+
# See bug #101, test requires +RTS -c (or equivalently +RTS -M<something>)
# only GHCi triggers the bug, but we run the test all ways for completeness.
@@ -217,6 +224,7 @@ test('ffishutdown', [ ignore_output, only_ways(['threaded1','threaded2']) ], com
test('T7919', [extra_clean(['T7919A.o','T7919A.hi',
'T7919A.dyn_o','T7919A.dyn_hi']),
+ expect_broken_for(7919, ['optasm','dyn','optllvm']),
when(fast(),skip) ],
compile_and_run, [config.ghc_th_way_flags])
diff --git a/testsuite/tests/rts/outofmem.stderr-ws-64 b/testsuite/tests/rts/outofmem.stderr-ws-64
index 42a4696fcf..dca02c7ed8 100644
--- a/testsuite/tests/rts/outofmem.stderr-ws-64
+++ b/testsuite/tests/rts/outofmem.stderr-ws-64
@@ -1 +1 @@
-outofmem: out of memory (requested 2148532224 bytes)
+outofmem: out of memory
diff --git a/testsuite/tests/rts/outofmem.stdout b/testsuite/tests/rts/outofmem.stdout
index 63a3a6988c..1acdde769d 100644
--- a/testsuite/tests/rts/outofmem.stdout
+++ b/testsuite/tests/rts/outofmem.stdout
@@ -1 +1 @@
-exit(1)
+exit(251)
diff --git a/testsuite/tests/rts/testmblockalloc.c b/testsuite/tests/rts/testmblockalloc.c
new file mode 100644
index 0000000000..df03658387
--- /dev/null
+++ b/testsuite/tests/rts/testmblockalloc.c
@@ -0,0 +1,75 @@
+#include "Rts.h"
+
+#include <stdio.h>
+
+// 16 * 64 == max 1GB
+const int MAXALLOC = 16;
+const int ARRSIZE = 64;
+
+const int LOOPS = 1000;
+const int SEED = 0xf00f00;
+
+extern lnat mblocks_allocated;
+
+int main (int argc, char *argv[])
+{
+ int i, j, b;
+
+ void *a[ARRSIZE];
+ nat sizes[ARRSIZE];
+
+ srand(SEED);
+
+ {
+ RtsConfig conf = defaultRtsConfig;
+ conf.rts_opts_enabled = RtsOptsAll;
+ hs_init_ghc(&argc, &argv, conf);
+ }
+
+ // repeatedly sweep though the array, allocating new random-sized
+ // objects and deallocating the old ones.
+ for (i=0; i < LOOPS; i++)
+ {
+ for (j=0; j < ARRSIZE; j++)
+ {
+ if (i > 0)
+ {
+ freeMBlocks(a[j], sizes[j]);
+ }
+ b = (rand() % MAXALLOC) + 1;
+ a[j] = getMBlocks(b);
+ sizes[j] = b;
+ }
+ }
+
+ releaseFreeMemory();
+
+ for (j=0; j < ARRSIZE; j++)
+ {
+ freeMBlocks(a[j], sizes[j]);
+ }
+
+ releaseFreeMemory();
+
+ // this time, sweep forwards allocating new blocks, and then
+ // backwards deallocating them.
+ for (i=0; i < LOOPS; i++)
+ {
+ for (j=0; j < ARRSIZE; j++)
+ {
+ b = (rand() % MAXALLOC) + 1;
+ a[j] = getMBlocks(b);
+ sizes[j] = b;
+ }
+ for (j=ARRSIZE-1; j >= 0; j--)
+ {
+ freeMBlocks(a[j], sizes[j]);
+ }
+ }
+
+ releaseFreeMemory();
+
+ hs_exit(); // will do a memory leak test
+
+ exit(0);
+}
diff --git a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
index 12223e534a..a3810ffb8b 100644
--- a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
+++ b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
@@ -29,17 +29,17 @@ trusted: safe
require own pkg trusted: True
M_SafePkg6
-package dependencies: array-0.5.1.0 bytestring-0.10.6.0* deepseq-1.4.1.1 base-4.8.2.0* ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
+package dependencies: bytestring-0.10.6.0* deepseq-1.4.1.1 array-0.5.1.0 base-4.8.2.0* ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
trusted: trustworthy
require own pkg trusted: False
M_SafePkg7
-package dependencies: array-0.5.1.0 bytestring-0.10.6.0* deepseq-1.4.1.1 base-4.8.2.0* ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
+package dependencies: bytestring-0.10.6.0* deepseq-1.4.1.1 array-0.5.1.0 base-4.8.2.0* ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
trusted: safe
require own pkg trusted: False
M_SafePkg8
-package dependencies: array-0.5.1.0 bytestring-0.10.6.0* deepseq-1.4.1.1 base-4.8.2.0 ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
+package dependencies: bytestring-0.10.6.0* deepseq-1.4.1.1 array-0.5.1.0 base-4.8.2.0 ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
trusted: trustworthy
require own pkg trusted: False
diff --git a/testsuite/tests/safeHaskell/ghci/p10.stderr b/testsuite/tests/safeHaskell/ghci/p10.stderr
index e20f84f241..5104dd6a96 100644
--- a/testsuite/tests/safeHaskell/ghci/p10.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p10.stderr
@@ -1,2 +1,2 @@
-<interactive>:10:1: error: Variable not in scope: b
+<interactive>:9:1: error: Variable not in scope: b
diff --git a/testsuite/tests/safeHaskell/ghci/p13.stderr b/testsuite/tests/safeHaskell/ghci/p13.stderr
index f7e8b8524b..7ba149a36b 100644
--- a/testsuite/tests/safeHaskell/ghci/p13.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p13.stderr
@@ -1,10 +1,10 @@
-<interactive>:11:1: error:
+<interactive>:10:1: error:
Unsafe overlapping instances for Pos [Int]
arising from a use of ‘res’
The matching instance is:
instance [overlapping] [safe] Pos [Int]
- -- Defined at <interactive>:9:30
+ -- Defined at <interactive>:8:30
It is compiled in a Safe module and as such can only
overlap instances from the same module, however it
overlaps the following instances from different modules:
diff --git a/testsuite/tests/safeHaskell/ghci/p14.stderr b/testsuite/tests/safeHaskell/ghci/p14.stderr
index 4d0b14e970..b015016622 100644
--- a/testsuite/tests/safeHaskell/ghci/p14.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p14.stderr
@@ -1,2 +1,2 @@
-<interactive>:10:1: parse error on input ‘{-# RULES’
+<interactive>:9:1: parse error on input ‘{-# RULES’
diff --git a/testsuite/tests/safeHaskell/ghci/p16.stderr b/testsuite/tests/safeHaskell/ghci/p16.stderr
index 9540119eae..e14727bc49 100644
--- a/testsuite/tests/safeHaskell/ghci/p16.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p16.stderr
@@ -2,14 +2,14 @@
<no location info>: warning:
-XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
-<interactive>:16:29: error:
+<interactive>:15:29: error:
Can't make a derived instance of ‘Op T2’:
‘Op’ is not a derivable class
Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension
In the newtype declaration for ‘T2’
-<interactive>:19:9: error:
+<interactive>:18:9: error:
Data constructor not in scope: T2 :: T -> t
- Perhaps you meant ‘T1’ (line 13)
+ Perhaps you meant ‘T1’ (line 12)
-<interactive>:22:4: error: Variable not in scope: y
+<interactive>:21:4: error: Variable not in scope: y
diff --git a/testsuite/tests/safeHaskell/ghci/p4.stderr b/testsuite/tests/safeHaskell/ghci/p4.stderr
index 2160c00d7d..5d70969f3a 100644
--- a/testsuite/tests/safeHaskell/ghci/p4.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p4.stderr
@@ -1,8 +1,8 @@
-<interactive>:6:9: error:
+<interactive>:5:9: error:
Not in scope: ‘System.IO.Unsafe.unsafePerformIO’
-<interactive>:7:9: error:
+<interactive>:6:9: error:
Variable not in scope: x :: IO Integer -> t
-<interactive>:8:1: error: Variable not in scope: y
+<interactive>:7:1: error: Variable not in scope: y
diff --git a/testsuite/tests/safeHaskell/ghci/p6.stderr b/testsuite/tests/safeHaskell/ghci/p6.stderr
index 83343029d4..8cca54eb2f 100644
--- a/testsuite/tests/safeHaskell/ghci/p6.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p6.stderr
@@ -1,10 +1,10 @@
-<interactive>:12:1: error:
+<interactive>:11:1: error:
Unacceptable result type in foreign declaration:
Safe Haskell is on, all FFI imports must be in the IO monad
When checking declaration:
foreign import ccall safe "static sin" c_sin :: Double -> Double
-<interactive>:13:1: error:
+<interactive>:12:1: error:
Variable not in scope: c_sin :: Integer -> t
- Perhaps you meant ‘c_sin'’ (line 8)
+ Perhaps you meant ‘c_sin'’ (line 7)
diff --git a/testsuite/tests/safeHaskell/ghci/p9.stderr b/testsuite/tests/safeHaskell/ghci/p9.stderr
index e20f84f241..5104dd6a96 100644
--- a/testsuite/tests/safeHaskell/ghci/p9.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p9.stderr
@@ -1,2 +1,2 @@
-<interactive>:10:1: error: Variable not in scope: b
+<interactive>:9:1: error: Variable not in scope: b
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index a7460b0d14..7f43dafdc8 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -126,3 +126,9 @@ T8221:
T5996:
$(RM) -f T5996.o T5996.hi
'$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5996.hs -ddump-simpl -dsuppress-uniques -dsuppress-all | grep y2
+
+T10083:
+ $(RM) -f T10083.o T10083.hi T10083.hi-boot T10083a.o T10083a.hi
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T10083.hs-boot
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T10083a.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T10083.hs
diff --git a/testsuite/tests/simplCore/should_compile/T10083.hs b/testsuite/tests/simplCore/should_compile/T10083.hs
new file mode 100644
index 0000000000..df896e6dab
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T10083.hs
@@ -0,0 +1,5 @@
+module T10083 where
+ import T10083a
+ data RSR = MkRSR SR
+ eqRSR (MkRSR s1) (MkRSR s2) = (eqSR s1 s2)
+ foo x y = not (eqRSR x y)
diff --git a/testsuite/tests/simplCore/should_compile/T10083.hs-boot b/testsuite/tests/simplCore/should_compile/T10083.hs-boot
new file mode 100644
index 0000000000..3d3e4a1281
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T10083.hs-boot
@@ -0,0 +1,3 @@
+module T10083 where
+ data RSR
+ eqRSR :: RSR -> RSR -> Bool
diff --git a/testsuite/tests/simplCore/should_compile/T10083a.hs b/testsuite/tests/simplCore/should_compile/T10083a.hs
new file mode 100644
index 0000000000..f4fd782a99
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T10083a.hs
@@ -0,0 +1,4 @@
+module T10083a where
+ import {-# SOURCE #-} T10083
+ data SR = MkSR RSR
+ eqSR (MkSR r1) (MkSR r2) = eqRSR r1 r2
diff --git a/testsuite/tests/simplCore/should_compile/T10181.hs b/testsuite/tests/simplCore/should_compile/T10181.hs
new file mode 100644
index 0000000000..1983507cd2
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T10181.hs
@@ -0,0 +1,3 @@
+module T10181 where
+
+t a = t a
diff --git a/testsuite/tests/simplCore/should_compile/T3717.stderr b/testsuite/tests/simplCore/should_compile/T3717.stderr
index 9515266807..374533605e 100644
--- a/testsuite/tests/simplCore/should_compile/T3717.stderr
+++ b/testsuite/tests/simplCore/should_compile/T3717.stderr
@@ -3,6 +3,7 @@
Result size of Tidy Core = {terms: 22, types: 10, coercions: 0}
Rec {
+-- RHS size: {terms: 10, types: 2, coercions: 0}
T3717.$wfoo [InlPrag=[0], Occ=LoopBreaker] :: Int# -> Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>]
T3717.$wfoo =
@@ -13,6 +14,7 @@ T3717.$wfoo =
}
end Rec }
+-- RHS size: {terms: 10, types: 4, coercions: 0}
foo [InlPrag=INLINE[0]] :: Int -> Int
[GblId,
Arity=1,
diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout
index 3d236823a6..e74fa39cb5 100644
--- a/testsuite/tests/simplCore/should_compile/T3772.stdout
+++ b/testsuite/tests/simplCore/should_compile/T3772.stdout
@@ -3,6 +3,7 @@
Result size of Tidy Core = {terms: 26, types: 11, coercions: 0}
Rec {
+-- RHS size: {terms: 10, types: 2, coercions: 0}
$wxs :: Int# -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>]
$wxs =
@@ -13,6 +14,7 @@ $wxs =
}
end Rec }
+-- RHS size: {terms: 14, types: 5, coercions: 0}
foo [InlPrag=NOINLINE] :: Int -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U(U)>]
foo =
diff --git a/testsuite/tests/simplCore/should_compile/T4908.stderr b/testsuite/tests/simplCore/should_compile/T4908.stderr
index ee3418c5bf..6ad89470bb 100644
--- a/testsuite/tests/simplCore/should_compile/T4908.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4908.stderr
@@ -3,6 +3,7 @@
Result size of Tidy Core = {terms: 54, types: 38, coercions: 0}
Rec {
+-- RHS size: {terms: 19, types: 5, coercions: 0}
T4908.f_$s$wf [Occ=LoopBreaker] :: Int# -> Int -> Int# -> Bool
[GblId, Arity=3, Caf=NoCafRefs, Str=DmdType <S,1*U><L,A><L,U>]
T4908.f_$s$wf =
@@ -17,6 +18,7 @@ T4908.f_$s$wf =
}
end Rec }
+-- RHS size: {terms: 24, types: 13, coercions: 0}
T4908.$wf [InlPrag=[0]] :: Int# -> (Int, Int) -> Bool
[GblId,
Arity=2,
@@ -39,6 +41,7 @@ T4908.$wf =
0# -> True
}
+-- RHS size: {terms: 8, types: 6, coercions: 0}
f [InlPrag=INLINE[0]] :: Int -> (Int, Int) -> Bool
[GblId,
Arity=2,
diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr
index faf513477d..3e140ddc92 100644
--- a/testsuite/tests/simplCore/should_compile/T4930.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4930.stderr
@@ -2,14 +2,17 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 23, types: 11, coercions: 0}
+-- RHS size: {terms: 2, types: 0, coercions: 0}
lvl :: [Char]
[GblId, Str=DmdType]
lvl = unpackCString# "Too small"#
+-- RHS size: {terms: 2, types: 1, coercions: 0}
T4930.foo1 :: Int
[GblId, Str=DmdType b]
T4930.foo1 = error @ Int lvl
+-- RHS size: {terms: 16, types: 5, coercions: 0}
foo :: Int -> Int
[GblId,
Arity=1,
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr
index ec3c4b08fb..f7979075ac 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7360.stderr
@@ -2,6 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 36, types: 29, coercions: 0}
+-- RHS size: {terms: 6, types: 3, coercions: 0}
T7360.$WFoo3 [InlPrag=INLINE] :: Int -> Foo
[GblId[DataConWrapper],
Arity=1,
@@ -16,10 +17,12 @@ T7360.$WFoo3 =
\ (dt [Occ=Once!] :: Int) ->
case dt of _ [Occ=Dead] { I# dt [Occ=Once] -> T7360.Foo3 dt }
+-- RHS size: {terms: 5, types: 2, coercions: 0}
fun1 [InlPrag=NOINLINE] :: Foo -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>]
fun1 = \ (x :: Foo) -> case x of _ [Occ=Dead] { __DEFAULT -> () }
+-- RHS size: {terms: 2, types: 0, coercions: 0}
T7360.fun5 :: ()
[GblId,
Str=DmdType,
@@ -27,6 +30,7 @@ T7360.fun5 :: ()
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}]
T7360.fun5 = fun1 T7360.Foo1
+-- RHS size: {terms: 2, types: 0, coercions: 0}
T7360.fun4 :: Int
[GblId,
Caf=NoCafRefs,
@@ -35,6 +39,7 @@ T7360.fun4 :: Int
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
T7360.fun4 = I# 0#
+-- RHS size: {terms: 16, types: 12, coercions: 0}
fun2 :: forall a. [a] -> ((), Int)
[GblId,
Arity=1,
diff --git a/testsuite/tests/simplCore/should_compile/T9400.stderr b/testsuite/tests/simplCore/should_compile/T9400.stderr
index 2600dd00ba..5216d1ed5f 100644
--- a/testsuite/tests/simplCore/should_compile/T9400.stderr
+++ b/testsuite/tests/simplCore/should_compile/T9400.stderr
@@ -2,6 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 23, types: 16, coercions: 0}
+-- RHS size: {terms: 22, types: 14, coercions: 0}
main :: IO ()
[GblId, Str=DmdType]
main =
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index ee2f63170b..b675077fda 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -106,6 +106,10 @@ test('T4918',
run_command,
['$MAKE -s --no-print-directory T4918'])
+# This test flips too and fro about whether it passes
+# I'm not sure why it is so delicate, but it greps the
+# result of -ddump-simpl, which is never advertised to
+# be very stable
test('T4945',
expect_broken(4945),
run_command,
@@ -214,3 +218,8 @@ test('T10176', only_ways(['optasm']), compile, [''])
test('T10180', only_ways(['optasm']), compile, [''])
test('T10602', only_ways(['optasm']), multimod_compile, ['T10602','-v0'])
test('T10627', only_ways(['optasm']), compile, [''])
+test('T10181', [expect_broken(10181), only_ways(['optasm'])], compile, [''])
+test('T10083',
+ expect_broken(10083),
+ run_command,
+ ['$MAKE -s --no-print-directory T10083'])
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index 4bc2226554..392d4fba73 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -2,12 +2,14 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 162, types: 61, coercions: 0}
+-- RHS size: {terms: 2, types: 1, coercions: 0}
Roman.foo3 :: Int
[GblId, Str=DmdType b]
Roman.foo3 =
patError @ Int "spec-inline.hs:(19,5)-(29,25)|function go"#
Rec {
+-- RHS size: {terms: 55, types: 9, coercions: 0}
Roman.foo_$s$wgo [Occ=LoopBreaker] :: Int# -> Int# -> Int#
[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType <L,U><L,U>]
Roman.foo_$s$wgo =
@@ -30,6 +32,7 @@ Roman.foo_$s$wgo =
}
end Rec }
+-- RHS size: {terms: 74, types: 22, coercions: 0}
Roman.$wgo [InlPrag=[0]] :: Maybe Int -> Maybe Int -> Int#
[GblId,
Arity=2,
@@ -67,6 +70,7 @@ Roman.$wgo =
}
}
+-- RHS size: {terms: 9, types: 5, coercions: 0}
Roman.foo_go [InlPrag=INLINE[0]] :: Maybe Int -> Maybe Int -> Int
[GblId,
Arity=2,
@@ -80,6 +84,7 @@ Roman.foo_go =
\ (w :: Maybe Int) (w1 :: Maybe Int) ->
case Roman.$wgo w w1 of ww { __DEFAULT -> I# ww }
+-- RHS size: {terms: 2, types: 0, coercions: 0}
Roman.foo2 :: Int
[GblId,
Caf=NoCafRefs,
@@ -88,6 +93,7 @@ Roman.foo2 :: Int
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Roman.foo2 = I# 6#
+-- RHS size: {terms: 2, types: 1, coercions: 0}
Roman.foo1 :: Maybe Int
[GblId,
Caf=NoCafRefs,
@@ -96,6 +102,7 @@ Roman.foo1 :: Maybe Int
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Roman.foo1 = Just @ Int Roman.foo2
+-- RHS size: {terms: 11, types: 4, coercions: 0}
foo :: Int -> Int
[GblId,
Arity=1,
diff --git a/testsuite/tests/th/T10620.hs b/testsuite/tests/th/T10620.hs
new file mode 100644
index 0000000000..3fe2519891
--- /dev/null
+++ b/testsuite/tests/th/T10620.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash, TemplateHaskell #-}
+module Main where
+
+import Language.Haskell.TH
+
+main :: IO ()
+main = do
+ putStrLn $([| 'a'# |] >>= stringE . show)
+ putStrLn $([| "abc"# |] >>= stringE . show)
diff --git a/testsuite/tests/th/T10620.stdout b/testsuite/tests/th/T10620.stdout
new file mode 100644
index 0000000000..a0415d2442
--- /dev/null
+++ b/testsuite/tests/th/T10620.stdout
@@ -0,0 +1,2 @@
+LitE (CharPrimL 'a')
+LitE (StringPrimL [97,98,99])
diff --git a/testsuite/tests/th/T10638.hs b/testsuite/tests/th/T10638.hs
new file mode 100644
index 0000000000..7dd17eba41
--- /dev/null
+++ b/testsuite/tests/th/T10638.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE GHCForeignImportPrim, UnliftedFFITypes, QuasiQuotes, MagicHash #-}
+
+import Language.Haskell.TH
+import Language.Haskell.TH.Syntax
+
+import GHC.Exts
+
+{-
+ the prim and javascript calling conventions do not support
+ headers and the static keyword.
+-}
+
+-- check that quasiquoting roundtrips succesfully and that the declaration
+-- does not include the static keyword
+test1 :: String
+test1 = $(do (ds@[ForeignD (ImportF _ _ p _ _)]) <-
+ [d| foreign import prim "test1" cmm_test1 :: Int# -> Int# |]
+ addTopDecls ds
+ case p of
+ "test1" -> return (LitE . stringL $ p)
+ _ -> error $ "unexpected value: " ++ show p
+ )
+
+-- check that constructed prim imports with the static keyword are rejected
+test2 :: String
+test2 = $(do t <- [t| Int# -> Int# |]
+ cmm_test2 <- newName "cmm_test2"
+ addTopDecls
+ [ForeignD (ImportF Prim Safe "static test2" cmm_test2 t)]
+ [| test1 |]
+ )
diff --git a/testsuite/tests/th/T10638.stderr b/testsuite/tests/th/T10638.stderr
new file mode 100644
index 0000000000..3a626ce46a
--- /dev/null
+++ b/testsuite/tests/th/T10638.stderr
@@ -0,0 +1,6 @@
+
+T10638.hs:26:11:
+ ‘static test2’ is not a valid C identifier
+ When checking declaration:
+ foreign import prim safe "static static test2" cmm_test2
+ :: Int# -> Int#
diff --git a/testsuite/tests/th/T7276a.stdout b/testsuite/tests/th/T7276a.stdout
index 6aad44f6d5..3e8c4878a8 100644
--- a/testsuite/tests/th/T7276a.stdout
+++ b/testsuite/tests/th/T7276a.stdout
@@ -1,5 +1,5 @@
-<interactive>:4:9: Warning:
+<interactive>:3:9: Warning:
Couldn't match type ‘[Dec]’ with ‘Exp’
Expected type: Q Exp
Actual type: DecsQ
@@ -8,7 +8,7 @@
<interactive>:1:1:
Exception when trying to run compile-time code:
- <interactive>:4:9:
+ <interactive>:3:9:
Couldn't match type ‘[Dec]’ with ‘Exp’
Expected type: Q Exp
Actual type: DecsQ
diff --git a/testsuite/tests/th/TH_Roles2.stderr b/testsuite/tests/th/TH_Roles2.stderr
index 1c0a217a05..98029ab3a8 100644
--- a/testsuite/tests/th/TH_Roles2.stderr
+++ b/testsuite/tests/th/TH_Roles2.stderr
@@ -4,9 +4,9 @@ TYPE CONSTRUCTORS
data T (a :: k)
COERCION AXIOMS
Dependent modules: []
-Dependent packages: [array-0.5.1.0, deepseq-1.4.1.1,
- pretty-1.1.2.0, base-4.8.2.0, ghc-prim-0.4.0.0,
- integer-gmp-1.0.0.0, template-haskell-2.10.0.0]
+Dependent packages: [pretty-1.1.2.0, deepseq-1.4.1.1,
+ array-0.5.1.0, base-4.8.2.0, ghc-prim-0.4.0.0, integer-gmp-1.0.0.0,
+ template-haskell-2.10.0.0]
==================== Typechecker ====================
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 6c2453f488..9e8f92d53d 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -345,3 +345,5 @@ test('T10019', normal, ghci_script, ['T10019.script'])
test('T10279', normal, compile_fail, ['-v0'])
test('T10306', normal, compile, ['-v0'])
test('T10596', normal, compile, ['-v0'])
+test('T10620', normal, compile_and_run, ['-v0'])
+test('T10638', normal, compile_fail, ['-v0'])
diff --git a/testsuite/tests/typecheck/should_compile/T10632.hs b/testsuite/tests/typecheck/should_compile/T10632.hs
new file mode 100644
index 0000000000..5c1a1778af
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T10632.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE ImplicitParams #-}
+
+f :: (?file1 :: String) => IO ()
+f = putStrLn $ "f2: "
+
+main :: IO ()
+main = let ?file1 = "A" in f
diff --git a/testsuite/tests/typecheck/should_compile/T10632.stderr b/testsuite/tests/typecheck/should_compile/T10632.stderr
new file mode 100644
index 0000000000..81377b3364
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T10632.stderr
@@ -0,0 +1,4 @@
+
+T10632.hs:3:6: warning:
+ Redundant constraint: ?file1::String
+ In the type signature for: f :: (?file1::String) => IO ()
diff --git a/testsuite/tests/typecheck/should_compile/T2497.hs b/testsuite/tests/typecheck/should_compile/T2497.hs
index 24933e086f..87b717ddbe 100644
--- a/testsuite/tests/typecheck/should_compile/T2497.hs
+++ b/testsuite/tests/typecheck/should_compile/T2497.hs
@@ -14,9 +14,13 @@ foo x = x
-- Trac #2213; eq should not be reported as unused
eq,beq :: Eq a => a -> a -> Bool
+{-# NOINLINE [0] eq #-}
+-- The pragma and [~1] in the RULE are to prevent an infinite loo
+-- in the simplifier, where the RULE fires infinitely in its
+-- own RHS
eq = (==) -- Used
beq = (==) -- Unused
{-# RULES
- "rule 1" forall x y. x == y = y `eq` x
+ "rule 1" [~1] forall x y. x == y = y `eq` x
#-}
diff --git a/testsuite/tests/typecheck/should_compile/T2497.stderr b/testsuite/tests/typecheck/should_compile/T2497.stderr
index cd7ad8bc20..da730a05aa 100644
--- a/testsuite/tests/typecheck/should_compile/T2497.stderr
+++ b/testsuite/tests/typecheck/should_compile/T2497.stderr
@@ -1,2 +1,2 @@
-T2497.hs:18:1: Warning: Defined but not used: ‘beq’
+T2497.hs:22:1: warning: Defined but not used: ‘beq’
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index a277b33b3a..db9ad0e657 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -165,7 +165,7 @@ test('tc161', normal, compile, [''])
test('tc162', normal, compile, [''])
test('tc163', normal, compile, [''])
test('tc164', normal, compile, [''])
-test('tc165', normal, compile, [''])
+test('tc165', expect_broken_for(10181, ['optasm', 'optllvm']), compile, [''])
test('tc166', normal, compile, [''])
test('tc167', normal, compile_fail, [''])
test('tc168', normal, compile_fail, [''])
@@ -283,7 +283,7 @@ test('T2433', extra_clean(['T2433_Help.hi', 'T2433_Help.o']),
multimod_compile, ['T2433', '-v0'])
test('T2494', normal, compile_fail, [''])
test('T2494-2', normal, compile, [''])
-test('T2497', normal, compile, [''])
+test('T2497', expect_broken_for(10657, ['optasm', 'optllvm']), compile, [''])
# Omitting temporarily
@@ -466,4 +466,5 @@ test('T10428', normal, compile, [''])
test('RepArrow', normal, compile, [''])
test('T10562', normal, compile, [''])
test('T10564', normal, compile, [''])
+test('T10632', normal, compile, [''])
test('T10642', normal, compile, [''])
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail1.hs b/testsuite/tests/typecheck/should_fail/ExpandSynsFail1.hs
new file mode 100644
index 0000000000..7317371e8e
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail1.hs
@@ -0,0 +1,4 @@
+type Foo = Int
+type Bar = Bool
+
+main = print $ (1 :: Foo) == (False :: Bar)
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail1.stderr b/testsuite/tests/typecheck/should_fail/ExpandSynsFail1.stderr
new file mode 100644
index 0000000000..0d5a9109a4
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail1.stderr
@@ -0,0 +1,11 @@
+ExpandSynsFail1.hs:4:31: error:
+ Couldn't match type ‘Bool’ with ‘Int’
+ Expected type: Foo
+ Actual type: Bar
+ Type synonyms expanded:
+ Expected type: Int
+ Actual type: Bool
+ In the second argument of ‘(==)’, namely ‘(False :: Bar)’
+ In the second argument of ‘($)’, namely
+ ‘(1 :: Foo) == (False :: Bar)’
+ In the expression: print $ (1 :: Foo) == (False :: Bar)
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail2.hs b/testsuite/tests/typecheck/should_fail/ExpandSynsFail2.hs
new file mode 100644
index 0000000000..e9c79c8975
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail2.hs
@@ -0,0 +1,19 @@
+-- In case of types with nested type synonyms, all synonyms should be expanded
+
+{-# LANGUAGE RankNTypes #-}
+
+import Control.Monad.ST
+
+type Foo = Int
+type Bar = Bool
+
+type MyFooST s = ST s Foo
+type MyBarST s = ST s Bar
+
+fooGen :: forall s . MyFooST s
+fooGen = undefined
+
+barGen :: forall s . MyBarST s
+barGen = undefined
+
+main = print (runST fooGen == runST barGen)
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail2.stderr b/testsuite/tests/typecheck/should_fail/ExpandSynsFail2.stderr
new file mode 100644
index 0000000000..6ded98e0bd
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail2.stderr
@@ -0,0 +1,9 @@
+ExpandSynsFail2.hs:19:37: error:
+ Couldn't match type ‘Int’ with ‘Bool’
+ Expected type: ST s Foo
+ Actual type: MyBarST s
+ Type synonyms expanded:
+ Expected type: ST s Int
+ Actual type: ST s Bool
+ In the first argument of ‘runST’, namely ‘barGen’
+ In the second argument of ‘(==)’, namely ‘runST barGen’
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail3.hs b/testsuite/tests/typecheck/should_fail/ExpandSynsFail3.hs
new file mode 100644
index 0000000000..31afaf21b9
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail3.hs
@@ -0,0 +1,23 @@
+-- We test two things here:
+--
+-- 1. We expand only as much as necessary. In this case, we shouldn't expand T.
+-- 2. When we find a difference(T3 and T5 in this case), we do minimal expansion
+-- e.g. we don't expand both of them to T1, instead we expand T5 to T3.
+
+module Main where
+
+type T5 = T4
+type T4 = T3
+type T3 = T2
+type T2 = T1
+type T1 = Int
+
+type T a = Int -> Bool -> a -> String
+
+f :: T (T3, T5, Int) -> Int
+f = undefined
+
+a :: Int
+a = f (undefined :: T (T5, T3, Bool))
+
+main = print a
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail3.stderr b/testsuite/tests/typecheck/should_fail/ExpandSynsFail3.stderr
new file mode 100644
index 0000000000..65d91351f5
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail3.stderr
@@ -0,0 +1,11 @@
+ExpandSynsFail3.hs:21:8: error:
+ Couldn't match type ‘Int’ with ‘Bool’
+ Expected type: T (T3, T5, Int)
+ Actual type: T (T5, T3, Bool)
+ Type synonyms expanded:
+ Expected type: T (T3, T3, Int)
+ Actual type: T (T3, T3, Bool)
+ In the first argument of ‘f’, namely
+ ‘(undefined :: T (T5, T3, Bool))’
+ In the expression: f (undefined :: T (T5, T3, Bool))
+ In an equation for ‘a’: a = f (undefined :: T (T5, T3, Bool))
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail4.hs b/testsuite/tests/typecheck/should_fail/ExpandSynsFail4.hs
new file mode 100644
index 0000000000..1007594920
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail4.hs
@@ -0,0 +1,11 @@
+-- Synonyms shouldn't be expanded since type error is visible without
+-- expansions. Error message should not have `Type synonyms expanded: ...` part.
+
+module Main where
+
+type T a = [a]
+
+f :: T Int -> String
+f = undefined
+
+main = putStrLn $ f (undefined :: T Bool)
diff --git a/testsuite/tests/typecheck/should_fail/ExpandSynsFail4.stderr b/testsuite/tests/typecheck/should_fail/ExpandSynsFail4.stderr
new file mode 100644
index 0000000000..bae53ce104
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/ExpandSynsFail4.stderr
@@ -0,0 +1,7 @@
+ExpandSynsFail4.hs:11:22: error:
+ Couldn't match type ‘Bool’ with ‘Int’
+ Expected type: T Int
+ Actual type: T Bool
+ In the first argument of ‘f’, namely ‘(undefined :: T Bool)’
+ In the second argument of ‘($)’, namely ‘f (undefined :: T Bool)’
+ In the expression: putStrLn $ f (undefined :: T Bool)
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index a0a98e7e87..fbbeddbbe0 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -246,6 +246,7 @@ test('tcfail219', normal, multimod_compile_fail, ['tcfail219.hsig', '-sig-of "Sh
test('tcfail220', normal, multimod_compile_fail, ['tcfail220.hsig', '-sig-of "ShouldFail is base:Prelude"'])
test('tcfail221', normal, multimod_compile_fail, ['tcfail221.hsig', '-sig-of "ShouldFail is base:Prelude"'])
test('tcfail222', normal, multimod_compile_fail, ['tcfail222.hsig', '-sig-of "ShouldFail is base:Data.STRef"'])
+test('tcfail223', normal, compile_fail, [''])
test('SilentParametersOverlapping', normal, compile, [''])
test('FailDueToGivenOverlapping', normal, compile_fail, [''])
@@ -368,3 +369,8 @@ test('T10351', normal, compile_fail, [''])
test('T10534', extra_clean(['T10534a.hi', 'T10534a.o']),
multimod_compile_fail, ['T10534', '-v0'])
test('T10495', normal, compile_fail, [''])
+
+test('ExpandSynsFail1', normal, compile_fail, ['-fprint-expanded-synonyms'])
+test('ExpandSynsFail2', normal, compile_fail, ['-fprint-expanded-synonyms'])
+test('ExpandSynsFail3', normal, compile_fail, ['-fprint-expanded-synonyms'])
+test('ExpandSynsFail4', normal, compile_fail, ['-fprint-expanded-synonyms'])
diff --git a/testsuite/tests/typecheck/should_fail/tcfail223.hs b/testsuite/tests/typecheck/should_fail/tcfail223.hs
new file mode 100644
index 0000000000..e5e0d5c8f8
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/tcfail223.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
+module ShouldFail where
+
+class Class1 a
+class Class1 a => Class2 a
+class Class2 a => Class3 a
+
+-- This was wrongfully accepted by ghc-7.0 to ghc-7.10.
+-- It is missing a `Class1 a` constraint.
+instance Class3 a => Class2 a
diff --git a/testsuite/tests/typecheck/should_fail/tcfail223.stderr b/testsuite/tests/typecheck/should_fail/tcfail223.stderr
new file mode 100644
index 0000000000..e4a4fcda54
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/tcfail223.stderr
@@ -0,0 +1,9 @@
+
+tcfail223.hs:10:10: error:
+ Could not deduce (Class1 a)
+ arising from the superclasses of an instance declaration
+ from the context: Class3 a
+ bound by the instance declaration at tcfail223.hs:10:10-29
+ Possible fix:
+ add (Class1 a) to the context of the instance declaration
+ In the instance declaration for ‘Class2 a’
diff --git a/testsuite/tests/typecheck/should_run/T3500a.hs b/testsuite/tests/typecheck/should_run/T3500a.hs
index c3adeb0c61..b614008ad4 100644
--- a/testsuite/tests/typecheck/should_run/T3500a.hs
+++ b/testsuite/tests/typecheck/should_run/T3500a.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE UndecidableInstances #-}
module Main where
diff --git a/testsuite/tests/typecheck/should_run/T5751.hs b/testsuite/tests/typecheck/should_run/T5751.hs
index 423a40736d..7c7d8ab0b9 100644
--- a/testsuite/tests/typecheck/should_run/T5751.hs
+++ b/testsuite/tests/typecheck/should_run/T5751.hs
@@ -25,7 +25,7 @@ main =
class (Widgets x) => MonadRender x
class (XMLGenerator m) => Widgets m
-- instance Widgets (IdentityT IO) -- if you uncomment this, it will work
-instance MonadRender m => Widgets m
+instance (XMLGenerator m, MonadRender m) => Widgets m
instance MonadRender (IdentityT IO)
web :: ( MonadIO m
diff --git a/testsuite/tests/typecheck/should_run/T7126.hs b/testsuite/tests/typecheck/should_run/T7126.hs
index ce9792de37..184d5df1f0 100644
--- a/testsuite/tests/typecheck/should_run/T7126.hs
+++ b/testsuite/tests/typecheck/should_run/T7126.hs
@@ -24,7 +24,7 @@ class Class2 a => Class3 a where
instance Class1 Int where
func1 = id
-instance Class3 a => Class2 a where
+instance (Class1 a, Class3 a) => Class2 a where
func2 = func3
instance Class3 Int where
diff --git a/testsuite/tests/typecheck/should_run/T7861.hs b/testsuite/tests/typecheck/should_run/T7861.hs
index 9ff9a43604..19a9c9d1fe 100644
--- a/testsuite/tests/typecheck/should_run/T7861.hs
+++ b/testsuite/tests/typecheck/should_run/T7861.hs
@@ -1,20 +1,22 @@
{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ImpredicativeTypes #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}
module Main where
-type A a = forall b. a
-
-doA :: A a -> [a]
+doA :: (forall b. a) -> [a]
doA = undefined
-f :: A a -> a
+f :: (forall b. a) -> a
f = doA
main = do { print "Hello 1"
; f `seq` print "Hello 2"
-- The casts are pushed inside the lambda
- -- for f, so this seq succeds fine
+ -- for f, so this seq succeeds fine
+ -- It does require ImpredicativeTypes, because we instantiate
+ -- seq's type (c->d->d) with f's type (c:= (forall b. a) -> a),
+ -- which is polymorphic (it has foralls).
; f (error "urk") `seq` print "Bad"
-- But when we *call* f we get a type error
diff --git a/testsuite/tests/typecheck/should_run/T7861.stderr b/testsuite/tests/typecheck/should_run/T7861.stderr
index f9f238605e..62b0dcda34 100644
--- a/testsuite/tests/typecheck/should_run/T7861.stderr
+++ b/testsuite/tests/typecheck/should_run/T7861.stderr
@@ -1,10 +1,11 @@
-T7861: T7861.hs:11:5:
+T7861: T7861.hs:10:5: error:
Couldn't match type ‘a’ with ‘[a]’
- ‘a’ is a rigid type variable bound by
- the type signature for: f :: A a -> a at T7861.hs:10:6
- Expected type: A a -> a
- Actual type: A a -> [a]
- Relevant bindings include f :: A a -> a (bound at T7861.hs:11:1)
+ ‘a’ is a rigid type variable bound by
+ the type signature for: f :: (forall b. a) -> a at T7861.hs:9:6
+ Expected type: (forall b. a) -> a
+ Actual type: (forall b. a) -> [a]
+ Relevant bindings include
+ f :: (forall b. a) -> a (bound at T7861.hs:10:1)
In the expression: doA
In an equation for ‘f’: f = doA
(deferred type error)
diff --git a/testsuite/tests/typecheck/should_run/T9497a-run.stderr b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
index 192f78f6a2..43f720be7e 100644
--- a/testsuite/tests/typecheck/should_run/T9497a-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
@@ -1,5 +1,5 @@
-T9497a-run: T9497a-run.hs:2:8:
- Found hole ‘_main’ with type: IO ()
+T9497a-run: T9497a-run.hs:2:8: error:
+ Found hole: _main :: IO ()
Or perhaps ‘_main’ is mis-spelled, or not in scope
Relevant bindings include
main :: IO () (bound at T9497a-run.hs:2:1)
diff --git a/testsuite/tests/typecheck/should_run/T9497b-run.stderr b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
index a53262e17d..02fda3473c 100644
--- a/testsuite/tests/typecheck/should_run/T9497b-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
@@ -1,5 +1,5 @@
-T9497b-run: T9497b-run.hs:2:8:
- Found hole ‘_main’ with type: IO ()
+T9497b-run: T9497b-run.hs:2:8: error:
+ Found hole: _main :: IO ()
Or perhaps ‘_main’ is mis-spelled, or not in scope
Relevant bindings include
main :: IO () (bound at T9497b-run.hs:2:1)
diff --git a/testsuite/tests/typecheck/should_run/T9497c-run.stderr b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
index f991cd6c44..5fe0743d6c 100644
--- a/testsuite/tests/typecheck/should_run/T9497c-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
@@ -1,5 +1,5 @@
-T9497c-run: T9497c-run.hs:2:8:
- Found hole ‘_main’ with type: IO ()
+T9497c-run: T9497c-run.hs:2:8: error:
+ Found hole: _main :: IO ()
Or perhaps ‘_main’ is mis-spelled, or not in scope
Relevant bindings include
main :: IO () (bound at T9497c-run.hs:2:1)
diff --git a/testsuite/tests/warnings/should_compile/DeprM.hs b/testsuite/tests/warnings/should_compile/DeprM.hs
new file mode 100644
index 0000000000..2a84622e21
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/DeprM.hs
@@ -0,0 +1,4 @@
+module DeprM {-# DEPRECATED "Here can be your menacing deprecation warning!" #-} where
+
+f :: Int
+f = 42
diff --git a/testsuite/tests/warnings/should_compile/DeprU.hs b/testsuite/tests/warnings/should_compile/DeprU.hs
new file mode 100644
index 0000000000..d15a7c51f7
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/DeprU.hs
@@ -0,0 +1,6 @@
+module A where
+
+import DeprM -- here should be emitted deprecation warning
+
+g :: Int
+g = f
diff --git a/testsuite/tests/warnings/should_compile/DeprU.stderr b/testsuite/tests/warnings/should_compile/DeprU.stderr
new file mode 100644
index 0000000000..c27dccb474
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/DeprU.stderr
@@ -0,0 +1,10 @@
+[1 of 2] Compiling DeprM ( DeprM.hs, DeprM.o )
+[2 of 2] Compiling A ( DeprU.hs, DeprU.o )
+
+DeprU.hs:3:1: Warning:
+ Module ‘DeprM’ is deprecated:
+ Here can be your menacing deprecation warning!
+
+DeprU.hs:6:5: Warning:
+ In the use of ‘f’ (imported from DeprM):
+ Deprecated: "Here can be your menacing deprecation warning!"
diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T
index 7fa8caf584..bbf5d1cc85 100644
--- a/testsuite/tests/warnings/should_compile/all.T
+++ b/testsuite/tests/warnings/should_compile/all.T
@@ -4,3 +4,9 @@ test('T9178', extra_clean(['T9178.o', 'T9178DataType.o',
'T9178.hi', 'T9178DataType.hi']),
multimod_compile, ['T9178', '-Wall'])
test('T9230', normal, compile_without_flag('-fno-warn-tabs'), [''])
+
+test('DeprU',
+ extra_clean([
+ 'DeprM.o', 'DeprU.o',
+ 'DeprM.hi', 'DeprU.hi']),
+ multimod_compile, ['DeprU', '-Wall'])
diff --git a/testsuite/timeout/timeout.hs b/testsuite/timeout/timeout.hs
index f78baa10ea..3532497eef 100644
--- a/testsuite/timeout/timeout.hs
+++ b/testsuite/timeout/timeout.hs
@@ -33,8 +33,8 @@ main = do
_ -> die ("Can't parse " ++ show secs ++ " as a number of seconds")
_ -> die ("Bad arguments " ++ show args)
-timeoutMsg :: String
-timeoutMsg = "Timeout happened...killing process..."
+timeoutMsg :: String -> String
+timeoutMsg cmd = "Timeout happened...killing process "++cmd++"..."
run :: Int -> String -> IO ()
#if !defined(mingw32_HOST_OS)
@@ -61,7 +61,7 @@ run secs cmd = do
r <- takeMVar m
case r of
Nothing -> do
- hPutStrLn stderr timeoutMsg
+ hPutStrLn stderr (timeoutMsg cmd)
killProcess pid
exitWith (ExitFailure 99)
Just (Exited r) -> exitWith r
@@ -122,7 +122,7 @@ run secs cmd =
let millisecs = secs * 1000
rc <- waitForSingleObject handle (fromIntegral millisecs)
if rc == cWAIT_TIMEOUT
- then do hPutStrLn stderr timeoutMsg
+ then do hPutStrLn stderr (timeoutMsg cmd)
terminateJobObject job 99
exitWith (ExitFailure 99)
else alloca $ \p_exitCode ->
diff --git a/testsuite/timeout/timeout.py b/testsuite/timeout/timeout.py
index df50806b9b..1016e2db33 100644
--- a/testsuite/timeout/timeout.py
+++ b/testsuite/timeout/timeout.py
@@ -35,7 +35,8 @@ try:
else:
# parent
def handler(signum, frame):
- sys.stderr.write('Timeout happened...killing process...\n')
+ msg = 'Timeout happened...killing process %s...\n' % cmd
+ sys.stderr.write(msg)
killProcess(pid)
sys.exit(99)
old = signal.signal(signal.SIGALRM, handler)