summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2011-07-20 11:09:03 -0700
committerDavid Terei <davidterei@gmail.com>2011-07-20 11:26:35 -0700
commit16514f272fb42af6e9c7674a9bd6c9dce369231f (patch)
treee4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/rename
parentebd422aed41048476aa61dd4c520d43becd78682 (diff)
downloadhaskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r--testsuite/tests/rename/Makefile3
-rw-r--r--testsuite/tests/rename/prog001/Makefile3
-rw-r--r--testsuite/tests/rename/prog001/Rn037Help.hs3
-rw-r--r--testsuite/tests/rename/prog001/rn037.hs9
-rw-r--r--testsuite/tests/rename/prog001/test.T4
-rw-r--r--testsuite/tests/rename/prog002/Makefile3
-rw-r--r--testsuite/tests/rename/prog002/Rn037Help.hs3
-rw-r--r--testsuite/tests/rename/prog002/rename.prog002.stderr2
-rw-r--r--testsuite/tests/rename/prog002/rename.prog002.stderr-hugs1
-rw-r--r--testsuite/tests/rename/prog002/rnfail037.hs8
-rw-r--r--testsuite/tests/rename/prog002/test.T4
-rw-r--r--testsuite/tests/rename/prog003/A.hs2
-rw-r--r--testsuite/tests/rename/prog003/B.hs5
-rw-r--r--testsuite/tests/rename/prog003/Makefile3
-rw-r--r--testsuite/tests/rename/prog003/rename.prog003.stderr2
-rw-r--r--testsuite/tests/rename/prog003/rename.prog003.stderr-hugs1
-rw-r--r--testsuite/tests/rename/prog003/test.T4
-rw-r--r--testsuite/tests/rename/prog004/A.hs6
-rw-r--r--testsuite/tests/rename/prog004/B.hs4
-rw-r--r--testsuite/tests/rename/prog004/C.hs7
-rw-r--r--testsuite/tests/rename/prog004/Makefile3
-rw-r--r--testsuite/tests/rename/prog004/rename.prog004.stderr0
-rw-r--r--testsuite/tests/rename/prog004/test.T4
-rw-r--r--testsuite/tests/rename/prog005/Makefile3
-rw-r--r--testsuite/tests/rename/prog005/VersionGraphClient.hs8
-rw-r--r--testsuite/tests/rename/prog005/VersionGraphClient.hs-boot3
-rw-r--r--testsuite/tests/rename/prog005/View.hs42
-rw-r--r--testsuite/tests/rename/prog005/ViewType.hs12
-rw-r--r--testsuite/tests/rename/prog005/test.T7
-rw-r--r--testsuite/tests/rename/prog006/A.hs9
-rw-r--r--testsuite/tests/rename/prog006/B/C.hs5
-rw-r--r--testsuite/tests/rename/prog006/Main.hs7
-rw-r--r--testsuite/tests/rename/prog006/Makefile39
-rw-r--r--testsuite/tests/rename/prog006/Setup.lhs5
-rw-r--r--testsuite/tests/rename/prog006/all.T7
-rw-r--r--testsuite/tests/rename/prog006/pwd.hs12
-rw-r--r--testsuite/tests/rename/prog006/rn.prog006.stderr0
-rw-r--r--testsuite/tests/rename/prog006/test.cabal4
-rw-r--r--testsuite/tests/rename/should_compile/2334.hs7
-rw-r--r--testsuite/tests/rename/should_compile/Imp100Aux.hs14
-rw-r--r--testsuite/tests/rename/should_compile/Imp100Aux.hs-boot11
-rw-r--r--testsuite/tests/rename/should_compile/Imp10Aux.hs13
-rw-r--r--testsuite/tests/rename/should_compile/Imp10Aux.hs-boot11
-rw-r--r--testsuite/tests/rename/should_compile/Imp500Aux.hs14
-rw-r--r--testsuite/tests/rename/should_compile/Imp500Aux.hs-boot11
-rw-r--r--testsuite/tests/rename/should_compile/Makefile44
-rw-r--r--testsuite/tests/rename/should_compile/Rn042_A.hs3
-rw-r--r--testsuite/tests/rename/should_compile/Rn043_A.hs3
-rw-r--r--testsuite/tests/rename/should_compile/Rn043_B.hs3
-rw-r--r--testsuite/tests/rename/should_compile/Rn044_A.hs3
-rw-r--r--testsuite/tests/rename/should_compile/Rn044_B.hs3
-rw-r--r--testsuite/tests/rename/should_compile/Rn050_A.hs10
-rw-r--r--testsuite/tests/rename/should_compile/Rn052Aux.hs6
-rw-r--r--testsuite/tests/rename/should_compile/Rn053_A.hs5
-rw-r--r--testsuite/tests/rename/should_compile/Rn053_B.hs5
-rw-r--r--testsuite/tests/rename/should_compile/Rn059_A.hs5
-rw-r--r--testsuite/tests/rename/should_compile/Rn059_B.hs5
-rw-r--r--testsuite/tests/rename/should_compile/Rn065A.hs4
-rw-r--r--testsuite/tests/rename/should_compile/Rn066_A.hs10
-rw-r--r--testsuite/tests/rename/should_compile/Rn067_A.hs4
-rw-r--r--testsuite/tests/rename/should_compile/RnAux017.hs14
-rw-r--r--testsuite/tests/rename/should_compile/RnAux017.hs-boot8
-rw-r--r--testsuite/tests/rename/should_compile/T1074b.hs4
-rw-r--r--testsuite/tests/rename/should_compile/T1789.hs11
-rw-r--r--testsuite/tests/rename/should_compile/T1789.stderr12
-rw-r--r--testsuite/tests/rename/should_compile/T1789_2.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T1792_imports.hs6
-rw-r--r--testsuite/tests/rename/should_compile/T1792_imports.stdout1
-rw-r--r--testsuite/tests/rename/should_compile/T1954.hs6
-rw-r--r--testsuite/tests/rename/should_compile/T1972.hs20
-rw-r--r--testsuite/tests/rename/should_compile/T1972.stderr11
-rw-r--r--testsuite/tests/rename/should_compile/T2205.hs17
-rw-r--r--testsuite/tests/rename/should_compile/T2436.hs14
-rw-r--r--testsuite/tests/rename/should_compile/T2436a.hs4
-rw-r--r--testsuite/tests/rename/should_compile/T2506.hs6
-rw-r--r--testsuite/tests/rename/should_compile/T2914.hs14
-rw-r--r--testsuite/tests/rename/should_compile/T3221.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T3262.hs21
-rw-r--r--testsuite/tests/rename/should_compile/T3262.stderr-ghc8
-rw-r--r--testsuite/tests/rename/should_compile/T3371.hs10
-rw-r--r--testsuite/tests/rename/should_compile/T3371.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T3449.hs13
-rw-r--r--testsuite/tests/rename/should_compile/T3449.hs-boot9
-rw-r--r--testsuite/tests/rename/should_compile/T3449.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T3449A.hs10
-rw-r--r--testsuite/tests/rename/should_compile/T3640.hs11
-rw-r--r--testsuite/tests/rename/should_compile/T3823.stderr6
-rw-r--r--testsuite/tests/rename/should_compile/T3823A.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T3823A.hs-boot5
-rw-r--r--testsuite/tests/rename/should_compile/T3823B.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T3901.hs14
-rw-r--r--testsuite/tests/rename/should_compile/T3943.hs10
-rw-r--r--testsuite/tests/rename/should_compile/T4003A.hs15
-rw-r--r--testsuite/tests/rename/should_compile/T4003A.hs-boot8
-rw-r--r--testsuite/tests/rename/should_compile/T4003B.hs19
-rw-r--r--testsuite/tests/rename/should_compile/T4239.hs14
-rw-r--r--testsuite/tests/rename/should_compile/T4239A.hs10
-rw-r--r--testsuite/tests/rename/should_compile/T4240.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T4240.stdout1
-rw-r--r--testsuite/tests/rename/should_compile/T4240A.hs9
-rw-r--r--testsuite/tests/rename/should_compile/T4240B.hs5
-rw-r--r--testsuite/tests/rename/should_compile/T4478.hs7
-rw-r--r--testsuite/tests/rename/should_compile/T4489.hs6
-rw-r--r--testsuite/tests/rename/should_compile/T4489.stderr6
-rw-r--r--testsuite/tests/rename/should_compile/T4534.hs9
-rw-r--r--testsuite/tests/rename/should_compile/T5331.hs19
-rw-r--r--testsuite/tests/rename/should_compile/T5331.stderr18
-rw-r--r--testsuite/tests/rename/should_compile/T5334.hs14
-rw-r--r--testsuite/tests/rename/should_compile/T5334.stderr13
-rw-r--r--testsuite/tests/rename/should_compile/all.T179
-rw-r--r--testsuite/tests/rename/should_compile/mc09.hs10
-rw-r--r--testsuite/tests/rename/should_compile/mc10.hs15
-rw-r--r--testsuite/tests/rename/should_compile/mc10.stderr-ghc2
-rw-r--r--testsuite/tests/rename/should_compile/mc11.hs14
-rw-r--r--testsuite/tests/rename/should_compile/mc12.hs11
-rw-r--r--testsuite/tests/rename/should_compile/rn003.hs9
-rw-r--r--testsuite/tests/rename/should_compile/rn003.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn005.hs8
-rw-r--r--testsuite/tests/rename/should_compile/rn005.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn006.hs14
-rw-r--r--testsuite/tests/rename/should_compile/rn006.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn009.hs2
-rw-r--r--testsuite/tests/rename/should_compile/rn009.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn010.hs12
-rw-r--r--testsuite/tests/rename/should_compile/rn010.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn011.hs101
-rw-r--r--testsuite/tests/rename/should_compile/rn011.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn012.hs503
-rw-r--r--testsuite/tests/rename/should_compile/rn012.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn013.hs21
-rw-r--r--testsuite/tests/rename/should_compile/rn013.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn016.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn017.hs14
-rw-r--r--testsuite/tests/rename/should_compile/rn018.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn019.hs4
-rw-r--r--testsuite/tests/rename/should_compile/rn020.hs11
-rw-r--r--testsuite/tests/rename/should_compile/rn022.hs11
-rw-r--r--testsuite/tests/rename/should_compile/rn022.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn023.hs3
-rw-r--r--testsuite/tests/rename/should_compile/rn024.hs9
-rw-r--r--testsuite/tests/rename/should_compile/rn025.hs5
-rw-r--r--testsuite/tests/rename/should_compile/rn025.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn026.hs12
-rw-r--r--testsuite/tests/rename/should_compile/rn027.hs12
-rw-r--r--testsuite/tests/rename/should_compile/rn028.hs18
-rw-r--r--testsuite/tests/rename/should_compile/rn029.hs17
-rw-r--r--testsuite/tests/rename/should_compile/rn031.hs12
-rw-r--r--testsuite/tests/rename/should_compile/rn032.hs18
-rw-r--r--testsuite/tests/rename/should_compile/rn033.hs14
-rw-r--r--testsuite/tests/rename/should_compile/rn034.hs12
-rw-r--r--testsuite/tests/rename/should_compile/rn035.hs10
-rw-r--r--testsuite/tests/rename/should_compile/rn036.hs14
-rw-r--r--testsuite/tests/rename/should_compile/rn037.hs4
-rw-r--r--testsuite/tests/rename/should_compile/rn037.stderr-ghc5
-rw-r--r--testsuite/tests/rename/should_compile/rn039.hs6
-rw-r--r--testsuite/tests/rename/should_compile/rn039.stderr-ghc4
-rw-r--r--testsuite/tests/rename/should_compile/rn040.hs8
-rw-r--r--testsuite/tests/rename/should_compile/rn040.stderr-ghc4
-rw-r--r--testsuite/tests/rename/should_compile/rn041.hs13
-rw-r--r--testsuite/tests/rename/should_compile/rn041.stderr-ghc6
-rw-r--r--testsuite/tests/rename/should_compile/rn042.hs5
-rw-r--r--testsuite/tests/rename/should_compile/rn043.hs6
-rw-r--r--testsuite/tests/rename/should_compile/rn044.hs8
-rw-r--r--testsuite/tests/rename/should_compile/rn045.hs9
-rw-r--r--testsuite/tests/rename/should_compile/rn046.hs6
-rw-r--r--testsuite/tests/rename/should_compile/rn046.stderr-ghc8
-rw-r--r--testsuite/tests/rename/should_compile/rn047.hs13
-rw-r--r--testsuite/tests/rename/should_compile/rn047.stderr-ghc2
-rw-r--r--testsuite/tests/rename/should_compile/rn048.hs15
-rw-r--r--testsuite/tests/rename/should_compile/rn049.hs13
-rw-r--r--testsuite/tests/rename/should_compile/rn049.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/rn050.hs13
-rw-r--r--testsuite/tests/rename/should_compile/rn050.stderr10
-rw-r--r--testsuite/tests/rename/should_compile/rn051.hs13
-rw-r--r--testsuite/tests/rename/should_compile/rn052.hs10
-rw-r--r--testsuite/tests/rename/should_compile/rn053.hs7
-rw-r--r--testsuite/tests/rename/should_compile/rn054.hs5
-rw-r--r--testsuite/tests/rename/should_compile/rn055.hs6
-rw-r--r--testsuite/tests/rename/should_compile/rn055.stderr-ghc2
-rw-r--r--testsuite/tests/rename/should_compile/rn056.hs9
-rw-r--r--testsuite/tests/rename/should_compile/rn056.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn057.hs6
-rw-r--r--testsuite/tests/rename/should_compile/rn057.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/rn058.hs14
-rw-r--r--testsuite/tests/rename/should_compile/rn059.hs13
-rw-r--r--testsuite/tests/rename/should_compile/rn060.hs6
-rw-r--r--testsuite/tests/rename/should_compile/rn061.hs3
-rw-r--r--testsuite/tests/rename/should_compile/rn062.hs8
-rw-r--r--testsuite/tests/rename/should_compile/rn063.hs14
-rw-r--r--testsuite/tests/rename/should_compile/rn063.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/rn064.hs17
-rw-r--r--testsuite/tests/rename/should_compile/rn064.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/rn065.hs10
-rw-r--r--testsuite/tests/rename/should_compile/rn066.hs13
-rw-r--r--testsuite/tests/rename/should_compile/rn066.stderr10
-rw-r--r--testsuite/tests/rename/should_compile/rn067.hs14
-rw-r--r--testsuite/tests/rename/should_compile/timing001.hs507
-rw-r--r--testsuite/tests/rename/should_compile/timing001.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/timing002.hs504
-rw-r--r--testsuite/tests/rename/should_compile/timing002.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/timing003.hs508
-rw-r--r--testsuite/tests/rename/should_compile/timing003.stderr0
-rw-r--r--testsuite/tests/rename/should_fail/Makefile3
-rw-r--r--testsuite/tests/rename/should_fail/RnFail047_A.hs8
-rw-r--r--testsuite/tests/rename/should_fail/RnFail047_A.hs-boot6
-rw-r--r--testsuite/tests/rename/should_fail/RnFail055.hs48
-rw-r--r--testsuite/tests/rename/should_fail/RnFail055.hs-boot29
-rw-r--r--testsuite/tests/rename/should_fail/RnFail055_aux.hs3
-rw-r--r--testsuite/tests/rename/should_fail/Rnfail040_A.hs2
-rw-r--r--testsuite/tests/rename/should_fail/T1595a.hs5
-rw-r--r--testsuite/tests/rename/should_fail/T1595a.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T2310.hs5
-rw-r--r--testsuite/tests/rename/should_fail/T2310.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/T2490.hs10
-rw-r--r--testsuite/tests/rename/should_fail/T2490.stderr15
-rw-r--r--testsuite/tests/rename/should_fail/T2723.hs16
-rw-r--r--testsuite/tests/rename/should_fail/T2723.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/T2901.hs6
-rw-r--r--testsuite/tests/rename/should_fail/T2901.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/T2993.hs8
-rw-r--r--testsuite/tests/rename/should_fail/T2993.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T3265.hs9
-rw-r--r--testsuite/tests/rename/should_fail/T3265.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/T3792.hs4
-rw-r--r--testsuite/tests/rename/should_fail/T3792.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T4042.hs12
-rw-r--r--testsuite/tests/rename/should_fail/T4042.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T5211.hs16
-rw-r--r--testsuite/tests/rename/should_fail/T5211.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/all.T83
-rw-r--r--testsuite/tests/rename/should_fail/mc13.hs14
-rw-r--r--testsuite/tests/rename/should_fail/mc13.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/mc14.hs16
-rw-r--r--testsuite/tests/rename/should_fail/mc14.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rn_dup.hs19
-rw-r--r--testsuite/tests/rename/should_fail/rn_dup.stderr22
-rw-r--r--testsuite/tests/rename/should_fail/rnfail001.hs3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail001.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail001.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail002.hs10
-rw-r--r--testsuite/tests/rename/should_fail/rnfail002.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail002.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail003.hs4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail003.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail003.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail004.hs8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail004.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/rnfail004.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail005.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail007.hs5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail007.stderr3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail008.hs19
-rw-r--r--testsuite/tests/rename/should_fail/rnfail008.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail008.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail009.hs5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail009.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail009.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail010.hs6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail010.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail010.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail011.hs6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail011.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail011.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail012.hs9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail012.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail012.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail013.hs9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail013.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail013.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail015.hs20
-rw-r--r--testsuite/tests/rename/should_fail/rnfail015.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail015.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail016.hs8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail016.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail016.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail017.hs17
-rw-r--r--testsuite/tests/rename/should_fail/rnfail017.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail018.hs15
-rw-r--r--testsuite/tests/rename/should_fail/rnfail018.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail019.hs7
-rw-r--r--testsuite/tests/rename/should_fail/rnfail019.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail019.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail020.hs21
-rw-r--r--testsuite/tests/rename/should_fail/rnfail020.stderr0
-rw-r--r--testsuite/tests/rename/should_fail/rnfail021.hs6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail021.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail021.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail022.hs9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail022.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail022.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail023.hs15
-rw-r--r--testsuite/tests/rename/should_fail/rnfail023.stderr9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail023.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail024.hs6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail024.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail024.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail025.hs6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail025.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail025.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail026.hs19
-rw-r--r--testsuite/tests/rename/should_fail/rnfail026.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/rnfail026.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail027.hs5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail027.stderr3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail027.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail028.hs2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail028.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail028.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail029.hs4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail029.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail029.stderr-hugs2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail030.hs3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail030.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail030.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail031.hs3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail031.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail031.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail032.hs3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail032.stderr7
-rw-r--r--testsuite/tests/rename/should_fail/rnfail032.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail033.hs3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail033.stderr7
-rw-r--r--testsuite/tests/rename/should_fail/rnfail033.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail034.hs4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail034.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail034.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail035.hs3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail035.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail035.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail038.hs4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail038.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail038.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail039.hs12
-rw-r--r--testsuite/tests/rename/should_fail/rnfail039.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail039.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail040.hs11
-rw-r--r--testsuite/tests/rename/should_fail/rnfail040.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail040.stderr-hugs2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail041.hs7
-rw-r--r--testsuite/tests/rename/should_fail/rnfail041.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail041.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail042.hs9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail042.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail042.stderr-hugs1
-rw-r--r--testsuite/tests/rename/should_fail/rnfail043.hs10
-rw-r--r--testsuite/tests/rename/should_fail/rnfail043.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail044.hs8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail044.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail045.hs9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail045.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/rnfail046.hs4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail046.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail047.hs9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail047.stderr3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail048.hs13
-rw-r--r--testsuite/tests/rename/should_fail/rnfail048.stderr9
-rw-r--r--testsuite/tests/rename/should_fail/rnfail049.hs14
-rw-r--r--testsuite/tests/rename/should_fail/rnfail049.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail050.hs12
-rw-r--r--testsuite/tests/rename/should_fail/rnfail050.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail051.hs11
-rw-r--r--testsuite/tests/rename/should_fail/rnfail051.stderr3
-rw-r--r--testsuite/tests/rename/should_fail/rnfail052.hs15
-rw-r--r--testsuite/tests/rename/should_fail/rnfail052.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail053.hs6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail053.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/rnfail054.hs6
-rw-r--r--testsuite/tests/rename/should_fail/rnfail054.stderr5
-rw-r--r--testsuite/tests/rename/should_fail/rnfail055.stderr107
-rw-r--r--testsuite/tests/rename/should_fail/rnfail056.hs8
-rw-r--r--testsuite/tests/rename/should_fail/rnfail056.stderr4
371 files changed, 5116 insertions, 0 deletions
diff --git a/testsuite/tests/rename/Makefile b/testsuite/tests/rename/Makefile
new file mode 100644
index 0000000000..9a36a1c5fe
--- /dev/null
+++ b/testsuite/tests/rename/Makefile
@@ -0,0 +1,3 @@
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/rename/prog001/Makefile b/testsuite/tests/rename/prog001/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/rename/prog001/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/rename/prog001/Rn037Help.hs b/testsuite/tests/rename/prog001/Rn037Help.hs
new file mode 100644
index 0000000000..64d1224f49
--- /dev/null
+++ b/testsuite/tests/rename/prog001/Rn037Help.hs
@@ -0,0 +1,3 @@
+module Rn037Help( T(C) ) where
+
+data T = C
diff --git a/testsuite/tests/rename/prog001/rn037.hs b/testsuite/tests/rename/prog001/rn037.hs
new file mode 100644
index 0000000000..544de2fdd9
--- /dev/null
+++ b/testsuite/tests/rename/prog001/rn037.hs
@@ -0,0 +1,9 @@
+-- !!! Checking that you can hide a constructor
+module ShouldCompile where
+
+import Rn037Help hiding( C )
+ -- C is the constructor, but we should
+ -- still be able to hide it
+
+-- we should still be able to refer to the type constructor, though
+type Foo = T
diff --git a/testsuite/tests/rename/prog001/test.T b/testsuite/tests/rename/prog001/test.T
new file mode 100644
index 0000000000..ad1a5fef70
--- /dev/null
+++ b/testsuite/tests/rename/prog001/test.T
@@ -0,0 +1,4 @@
+test('rename.prog001',
+ extra_clean(['Rn037Help.hi', 'Rn037Help.o', 'rn037.hi', 'rn037.o']),
+ multimod_compile,
+ ['rn037', '-v0'])
diff --git a/testsuite/tests/rename/prog002/Makefile b/testsuite/tests/rename/prog002/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/rename/prog002/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/rename/prog002/Rn037Help.hs b/testsuite/tests/rename/prog002/Rn037Help.hs
new file mode 100644
index 0000000000..64d1224f49
--- /dev/null
+++ b/testsuite/tests/rename/prog002/Rn037Help.hs
@@ -0,0 +1,3 @@
+module Rn037Help( T(C) ) where
+
+data T = C
diff --git a/testsuite/tests/rename/prog002/rename.prog002.stderr b/testsuite/tests/rename/prog002/rename.prog002.stderr
new file mode 100644
index 0000000000..31b672b539
--- /dev/null
+++ b/testsuite/tests/rename/prog002/rename.prog002.stderr
@@ -0,0 +1,2 @@
+
+rnfail037.hs:8:7: Not in scope: data constructor `Rn037Help.C'
diff --git a/testsuite/tests/rename/prog002/rename.prog002.stderr-hugs b/testsuite/tests/rename/prog002/rename.prog002.stderr-hugs
new file mode 100644
index 0000000000..cc2a587de2
--- /dev/null
+++ b/testsuite/tests/rename/prog002/rename.prog002.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail037.hs":8 - Undefined data constructor "Rn037Help.C"
diff --git a/testsuite/tests/rename/prog002/rnfail037.hs b/testsuite/tests/rename/prog002/rnfail037.hs
new file mode 100644
index 0000000000..0a2935c5ad
--- /dev/null
+++ b/testsuite/tests/rename/prog002/rnfail037.hs
@@ -0,0 +1,8 @@
+-- !!! Checking that you can hide a constructor
+module ShouldCompile where
+
+import Rn037Help hiding( C )
+ -- C is the constructor, but we should
+ -- still be able to hide it
+
+f x = Rn037Help.C
diff --git a/testsuite/tests/rename/prog002/test.T b/testsuite/tests/rename/prog002/test.T
new file mode 100644
index 0000000000..0aa4c39057
--- /dev/null
+++ b/testsuite/tests/rename/prog002/test.T
@@ -0,0 +1,4 @@
+test('rename.prog002',
+ extra_clean(['Rn037Help.hi', 'Rn037Help.o']),
+ multimod_compile_fail,
+ ['rnfail037', '-v0'])
diff --git a/testsuite/tests/rename/prog003/A.hs b/testsuite/tests/rename/prog003/A.hs
new file mode 100644
index 0000000000..6b68075f96
--- /dev/null
+++ b/testsuite/tests/rename/prog003/A.hs
@@ -0,0 +1,2 @@
+module A(method) where
+class Class a where method :: a -> a
diff --git a/testsuite/tests/rename/prog003/B.hs b/testsuite/tests/rename/prog003/B.hs
new file mode 100644
index 0000000000..77be6cbc0e
--- /dev/null
+++ b/testsuite/tests/rename/prog003/B.hs
@@ -0,0 +1,5 @@
+-- !!! Exporting a class method should not export the class too
+module B where
+import A
+f :: Class a => a -> a
+f = method
diff --git a/testsuite/tests/rename/prog003/Makefile b/testsuite/tests/rename/prog003/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/rename/prog003/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/rename/prog003/rename.prog003.stderr b/testsuite/tests/rename/prog003/rename.prog003.stderr
new file mode 100644
index 0000000000..49c264cae8
--- /dev/null
+++ b/testsuite/tests/rename/prog003/rename.prog003.stderr
@@ -0,0 +1,2 @@
+
+B.hs:4:6: Not in scope: type constructor or class `Class'
diff --git a/testsuite/tests/rename/prog003/rename.prog003.stderr-hugs b/testsuite/tests/rename/prog003/rename.prog003.stderr-hugs
new file mode 100644
index 0000000000..5cb62fcdf2
--- /dev/null
+++ b/testsuite/tests/rename/prog003/rename.prog003.stderr-hugs
@@ -0,0 +1 @@
+ERROR "B.hs":4 - Undefined class "Class"
diff --git a/testsuite/tests/rename/prog003/test.T b/testsuite/tests/rename/prog003/test.T
new file mode 100644
index 0000000000..7d4c06ab0e
--- /dev/null
+++ b/testsuite/tests/rename/prog003/test.T
@@ -0,0 +1,4 @@
+test('rename.prog003',
+ extra_clean(['A.hi', 'A.o']),
+ multimod_compile_fail,
+ ['B', '-v0'])
diff --git a/testsuite/tests/rename/prog004/A.hs b/testsuite/tests/rename/prog004/A.hs
new file mode 100644
index 0000000000..23fe5bb187
--- /dev/null
+++ b/testsuite/tests/rename/prog004/A.hs
@@ -0,0 +1,6 @@
+module A(foo, Bar(..)) where
+
+foo :: Bar
+foo = MkBar 42
+
+data Bar = MkBar Int
diff --git a/testsuite/tests/rename/prog004/B.hs b/testsuite/tests/rename/prog004/B.hs
new file mode 100644
index 0000000000..47d2903abb
--- /dev/null
+++ b/testsuite/tests/rename/prog004/B.hs
@@ -0,0 +1,4 @@
+module B(module A) where
+
+import A hiding (Bar)
+import A(Bar)
diff --git a/testsuite/tests/rename/prog004/C.hs b/testsuite/tests/rename/prog004/C.hs
new file mode 100644
index 0000000000..e66231afec
--- /dev/null
+++ b/testsuite/tests/rename/prog004/C.hs
@@ -0,0 +1,7 @@
+module C where
+
+import B
+
+baz :: Bar
+baz = foo
+
diff --git a/testsuite/tests/rename/prog004/Makefile b/testsuite/tests/rename/prog004/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/rename/prog004/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/rename/prog004/rename.prog004.stderr b/testsuite/tests/rename/prog004/rename.prog004.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/prog004/rename.prog004.stderr
diff --git a/testsuite/tests/rename/prog004/test.T b/testsuite/tests/rename/prog004/test.T
new file mode 100644
index 0000000000..4d97d580c0
--- /dev/null
+++ b/testsuite/tests/rename/prog004/test.T
@@ -0,0 +1,4 @@
+test('rename.prog004',
+ extra_clean(['A.hi', 'A.o', 'B.hi', 'B.o', 'C.hi', 'C.o']),
+ multimod_compile,
+ ['C', '-v0'])
diff --git a/testsuite/tests/rename/prog005/Makefile b/testsuite/tests/rename/prog005/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/rename/prog005/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/rename/prog005/VersionGraphClient.hs b/testsuite/tests/rename/prog005/VersionGraphClient.hs
new file mode 100644
index 0000000000..3aad9f5180
--- /dev/null
+++ b/testsuite/tests/rename/prog005/VersionGraphClient.hs
@@ -0,0 +1,8 @@
+module VersionGraphClient(
+ VersionGraphClient,
+
+ ) where
+
+import ViewType
+
+newtype VersionGraphClient = VersionGraphClient Int
diff --git a/testsuite/tests/rename/prog005/VersionGraphClient.hs-boot b/testsuite/tests/rename/prog005/VersionGraphClient.hs-boot
new file mode 100644
index 0000000000..6bca0bbf5e
--- /dev/null
+++ b/testsuite/tests/rename/prog005/VersionGraphClient.hs-boot
@@ -0,0 +1,3 @@
+module VersionGraphClient where
+
+data VersionGraphClient
diff --git a/testsuite/tests/rename/prog005/View.hs b/testsuite/tests/rename/prog005/View.hs
new file mode 100644
index 0000000000..c14d301c3d
--- /dev/null
+++ b/testsuite/tests/rename/prog005/View.hs
@@ -0,0 +1,42 @@
+{-
+Bug report submitted by George Russell, 1/10/2004:
+
+With both ghc6.2 and 6.2.20040915 on Linux, ghc --make cannot compile
+the attached files and produces a confusing error message.
+
+ # ghc --make View.hs
+Chasing modules from: View.hs
+Compiling ViewType ( ./ViewType.hs, ./ViewType.o )
+Compiling VersionGraphClient ( ./VersionGraphClient.hs, ./VersionGraphClient.o )Compiling View ( View.hs, View.o )
+
+View.hs:14:
+ Couldn't match `VersionGraphClient' against `VersionGraphClient'
+ Expected type: VersionGraphClient
+ Inferred type: VersionGraphClient
+ In the `graphClient1' field of a record
+ In the record construction: View {graphClient1 = graphClient}
+
+However ghc without make has no problems.
+
+# ghc -c ViewType.hs
+# ghc -c VersionGraphClient.hs
+# ghc -c View.hs
+-}
+
+-- | This module defines the fundamental structure of the (untyped)
+-- objects in a repository.
+--
+-- We depend circularly on CodedValue.hs. This module is compiled
+-- first and uses CodedValue.hi-boot.
+module View(
+ ) where
+
+import ViewType
+import VersionGraphClient
+
+createView :: VersionGraphClient -> IO View
+createView graphClient =
+ do
+ return (View {
+ graphClient1 = graphClient
+ })
diff --git a/testsuite/tests/rename/prog005/ViewType.hs b/testsuite/tests/rename/prog005/ViewType.hs
new file mode 100644
index 0000000000..8e9dd3cd49
--- /dev/null
+++ b/testsuite/tests/rename/prog005/ViewType.hs
@@ -0,0 +1,12 @@
+module ViewType(
+
+ View(..),
+ ) where
+
+
+import {-# SOURCE #-} VersionGraphClient
+
+data View = View {
+ graphClient1 :: VersionGraphClient
+ }
+
diff --git a/testsuite/tests/rename/prog005/test.T b/testsuite/tests/rename/prog005/test.T
new file mode 100644
index 0000000000..35769bd2bb
--- /dev/null
+++ b/testsuite/tests/rename/prog005/test.T
@@ -0,0 +1,7 @@
+test('rename.prog005',
+ [only_compiler_types(['ghc']),
+ extra_clean(['VersionGraphClient.o-boot','VersionGraphClient.hi-boot',
+ 'VersionGraphClient.hi', 'VersionGraphClient.o',
+ 'ViewType.hi', 'ViewType.o', 'View.hi', 'View.o'])],
+ multimod_compile,
+ ['View', '-v0'])
diff --git a/testsuite/tests/rename/prog006/A.hs b/testsuite/tests/rename/prog006/A.hs
new file mode 100644
index 0000000000..52e442a0c2
--- /dev/null
+++ b/testsuite/tests/rename/prog006/A.hs
@@ -0,0 +1,9 @@
+module A (f, y) where
+
+import B.C (T(..))
+
+f (T x) = x
+
+y = T 42
+
+
diff --git a/testsuite/tests/rename/prog006/B/C.hs b/testsuite/tests/rename/prog006/B/C.hs
new file mode 100644
index 0000000000..ece50b9002
--- /dev/null
+++ b/testsuite/tests/rename/prog006/B/C.hs
@@ -0,0 +1,5 @@
+module B.C where
+
+newtype T = T Int
+ deriving Show
+
diff --git a/testsuite/tests/rename/prog006/Main.hs b/testsuite/tests/rename/prog006/Main.hs
new file mode 100644
index 0000000000..13f7265fc4
--- /dev/null
+++ b/testsuite/tests/rename/prog006/Main.hs
@@ -0,0 +1,7 @@
+module Main (main, z) where
+
+import A
+
+main = print (f y)
+
+z = y
diff --git a/testsuite/tests/rename/prog006/Makefile b/testsuite/tests/rename/prog006/Makefile
new file mode 100644
index 0000000000..1e643fd6fb
--- /dev/null
+++ b/testsuite/tests/rename/prog006/Makefile
@@ -0,0 +1,39 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+# Original comments relating to GHC 6.4:
+# This test caused a panic in GHC 6.4, but in reality it is user
+# error, caused by compiling separate modules in the program using
+# different search paths. GHC gets confused when it can't find a
+# module mentioned as a dependency in another interface file.
+
+# Update for GHC 6.6:
+# This test now succeeds, because A.hi records the fact that B.C
+# came from the package test-1.0, so there's no conflict.
+
+# If the package format changes, we might have to re-generate pkg.conf
+# using the supplied Cabal configuration.
+
+LOCAL_PKGCONF=local.package.conf
+LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF)
+
+rn.prog006:
+ rm -f A.hi A.o B/C.hi B/C.o Main.hi Main.o pkg.conf
+ rm -f pwd pwd.exe pwd.exe.manifest pwd.hi pwd.o
+ '$(TEST_HC)' $(TEST_HC_OPTS) --make pwd -v0
+ '$(TEST_HC)' $(TEST_HC_OPTS) --make -package-name test-1.0 B.C -fforce-recomp -v0
+ rm -f pkg.conf
+ echo "name: test" >>pkg.conf
+ echo "version: 1.0" >>pkg.conf
+ echo "id: test-XXX" >>pkg.conf
+ echo "import-dirs: `./pwd`" >>pkg.conf
+ echo "exposed-modules: B.C" >>pkg.conf
+ echo "[]" >$(LOCAL_PKGCONF)
+ $(LOCAL_GHC_PKG) register pkg.conf -v0
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c -package-conf $(LOCAL_PKGCONF) -package test -fforce-recomp A.hs -i
+# The -i clears the search path, so A.hs will find B.C from package test
+ -'$(TEST_HC)' $(TEST_HC_OPTS) -c -package-conf $(LOCAL_PKGCONF) -package test -fforce-recomp Main.hs
+# No -i when compiling Main, so a from-scratch search would find a home-pkg module B.C
+# However, A.hi remembers that B.C came from package test, so all is ok.
+
diff --git a/testsuite/tests/rename/prog006/Setup.lhs b/testsuite/tests/rename/prog006/Setup.lhs
new file mode 100644
index 0000000000..b28a8234f9
--- /dev/null
+++ b/testsuite/tests/rename/prog006/Setup.lhs
@@ -0,0 +1,5 @@
+#!/usr/bin/runhaskell
+> module Main where
+> import Distribution.Simple
+> main :: IO ()
+> main = defaultMain
diff --git a/testsuite/tests/rename/prog006/all.T b/testsuite/tests/rename/prog006/all.T
new file mode 100644
index 0000000000..4126e6cdf4
--- /dev/null
+++ b/testsuite/tests/rename/prog006/all.T
@@ -0,0 +1,7 @@
+test('rn.prog006',
+ extra_clean(['A.hi', 'A.o', 'B/C.hi', 'B/C.o',
+ 'Main.hi', 'Main.o', 'pkg.conf',
+ 'pwd', 'pwd.exe', 'pwd.exe.manifest',
+ 'pwd.hi', 'pwd.o']),
+ run_command,
+ ['$MAKE -s --no-print-directory rn.prog006'])
diff --git a/testsuite/tests/rename/prog006/pwd.hs b/testsuite/tests/rename/prog006/pwd.hs
new file mode 100644
index 0000000000..177e836fe1
--- /dev/null
+++ b/testsuite/tests/rename/prog006/pwd.hs
@@ -0,0 +1,12 @@
+
+module Main where
+
+import System.Directory
+import System.Environment
+
+main :: IO ()
+main = do d <- getCurrentDirectory
+ putStr $ concatMap f d
+ where f '\\' = "/"
+ f c = [c]
+
diff --git a/testsuite/tests/rename/prog006/rn.prog006.stderr b/testsuite/tests/rename/prog006/rn.prog006.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/prog006/rn.prog006.stderr
diff --git a/testsuite/tests/rename/prog006/test.cabal b/testsuite/tests/rename/prog006/test.cabal
new file mode 100644
index 0000000000..64fb00e11a
--- /dev/null
+++ b/testsuite/tests/rename/prog006/test.cabal
@@ -0,0 +1,4 @@
+name: test
+version: 1.0
+exposed-modules: B.C
+
diff --git a/testsuite/tests/rename/should_compile/2334.hs b/testsuite/tests/rename/should_compile/2334.hs
new file mode 100644
index 0000000000..6c1cd80e1f
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/2334.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TypeFamilies,EmptyDataDecls,MultiParamTypeClasses #-}
+module Test where
+
+type family Fam1 a
+
+class C b where
+ f :: ( Fam1 s ~ () ) => b -> s
diff --git a/testsuite/tests/rename/should_compile/Imp100Aux.hs b/testsuite/tests/rename/should_compile/Imp100Aux.hs
new file mode 100644
index 0000000000..2ae5f0baa4
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Imp100Aux.hs
@@ -0,0 +1,14 @@
+
+module Imp100Aux where
+import Imp100
+
+data T1 a
+data T2 a b
+data T3 a b c
+data T4 a b c d
+data T5 a b c d e
+data T6 a
+data T7 a b
+data T8 a b c
+data T9 a b c d
+data T10 a b c d e
diff --git a/testsuite/tests/rename/should_compile/Imp100Aux.hs-boot b/testsuite/tests/rename/should_compile/Imp100Aux.hs-boot
new file mode 100644
index 0000000000..934db61841
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Imp100Aux.hs-boot
@@ -0,0 +1,11 @@
+module Imp100Aux where
+data T1 a
+data T2 a b
+data T3 a b c
+data T4 a b c d
+data T5 a b c d e
+data T6 a
+data T7 a b
+data T8 a b c
+data T9 a b c d
+data T10 a b c d e
diff --git a/testsuite/tests/rename/should_compile/Imp10Aux.hs b/testsuite/tests/rename/should_compile/Imp10Aux.hs
new file mode 100644
index 0000000000..f838aa558d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Imp10Aux.hs
@@ -0,0 +1,13 @@
+
+module Imp10Aux where
+import Imp10
+data T1 a
+data T2 a b
+data T3 a b c
+data T4 a b c d
+data T5 a b c d e
+data T6 a
+data T7 a b
+data T8 a b c
+data T9 a b c d
+data T10 a b c d e
diff --git a/testsuite/tests/rename/should_compile/Imp10Aux.hs-boot b/testsuite/tests/rename/should_compile/Imp10Aux.hs-boot
new file mode 100644
index 0000000000..248c113ba2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Imp10Aux.hs-boot
@@ -0,0 +1,11 @@
+module Imp10Aux where
+data T1 a
+data T2 a b
+data T3 a b c
+data T4 a b c d
+data T5 a b c d e
+data T6 a
+data T7 a b
+data T8 a b c
+data T9 a b c d
+data T10 a b c d e
diff --git a/testsuite/tests/rename/should_compile/Imp500Aux.hs b/testsuite/tests/rename/should_compile/Imp500Aux.hs
new file mode 100644
index 0000000000..20c3c79415
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Imp500Aux.hs
@@ -0,0 +1,14 @@
+
+module Imp500Aux where
+import Imp500
+
+data T1 a
+data T2 a b
+data T3 a b c
+data T4 a b c d
+data T5 a b c d e
+data T6 a
+data T7 a b
+data T8 a b c
+data T9 a b c d
+data T10 a b c d e
diff --git a/testsuite/tests/rename/should_compile/Imp500Aux.hs-boot b/testsuite/tests/rename/should_compile/Imp500Aux.hs-boot
new file mode 100644
index 0000000000..251ac8012c
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Imp500Aux.hs-boot
@@ -0,0 +1,11 @@
+module Imp500Aux where
+data T1 a
+data T2 a b
+data T3 a b c
+data T4 a b c d
+data T5 a b c d e
+data T6 a
+data T7 a b
+data T8 a b c
+data T9 a b c d
+data T10 a b c d e
diff --git a/testsuite/tests/rename/should_compile/Makefile b/testsuite/tests/rename/should_compile/Makefile
new file mode 100644
index 0000000000..5823823c06
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Makefile
@@ -0,0 +1,44 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+T1792_imports:
+ $(RM) T1792_imports.hi T1792_imports.o T1792_imports.imports
+ '$(TEST_HC)' $(TEST_HC_OPTS) -ddump-minimal-imports -c T1792_imports.hs
+ cat T1792_imports.imports
+
+T3823:
+ $(RM) T3823A.hi-boot T3823A.hi T3823B.hi
+ $(RM) T3823A.o-boot T3823A.o T3823B.o
+ -'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make T3823A.hs
+
+T4003:
+ $(RM) T4003A.hi-boot T4003A.hi T4003B.hi
+ $(RM) T4003A.o-boot T4003A.o T4003B.o
+ '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4003A.hs-boot
+ '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4003B.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4003A.hs
+
+T3449:
+ $(RM) T3449.hi-boot T3449.hi T3449A.hi
+ $(RM) T3449.o-boot T3449.o T3449A.o
+ '$(TEST_HC)' $(TEST_HC_OPTS) -Wall -c T3449.hs-boot
+ '$(TEST_HC)' $(TEST_HC_OPTS) -Wall -c T3449A.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -Wall -c T3449.hs
+
+T4239:
+ $(RM) T4239A.hi T4239A.o
+ $(RM) T4239.hi T4239.o T4239.imports
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c T4239A.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c T4239.hs -ddump-minimal-imports
+ cat T4239.imports
+
+T4240:
+ $(RM) T4240A.hi T4240A.o
+ $(RM) T4240B.hi T4240B.o
+ $(RM) T4240.hi T4240.o T4240.imports
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c T4240A.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c T4240B.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c T4240.hs -ddump-minimal-imports
+ cat T4240.imports
+
diff --git a/testsuite/tests/rename/should_compile/Rn042_A.hs b/testsuite/tests/rename/should_compile/Rn042_A.hs
new file mode 100644
index 0000000000..ea19a1a3f8
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn042_A.hs
@@ -0,0 +1,3 @@
+module Rn042_A( Type(..) ) where
+
+data Type a = Constr { field :: a }
diff --git a/testsuite/tests/rename/should_compile/Rn043_A.hs b/testsuite/tests/rename/should_compile/Rn043_A.hs
new file mode 100644
index 0000000000..ab24017637
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn043_A.hs
@@ -0,0 +1,3 @@
+module Rn043_A where
+
+x = True
diff --git a/testsuite/tests/rename/should_compile/Rn043_B.hs b/testsuite/tests/rename/should_compile/Rn043_B.hs
new file mode 100644
index 0000000000..b7f49f4143
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn043_B.hs
@@ -0,0 +1,3 @@
+module Rn043_B where
+
+x = 'x'
diff --git a/testsuite/tests/rename/should_compile/Rn044_A.hs b/testsuite/tests/rename/should_compile/Rn044_A.hs
new file mode 100644
index 0000000000..475ffe83cb
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn044_A.hs
@@ -0,0 +1,3 @@
+module Rn044_A where
+
+x = True
diff --git a/testsuite/tests/rename/should_compile/Rn044_B.hs b/testsuite/tests/rename/should_compile/Rn044_B.hs
new file mode 100644
index 0000000000..e11f03c10b
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn044_B.hs
@@ -0,0 +1,3 @@
+module Rn044_B where
+
+x = 'x'
diff --git a/testsuite/tests/rename/should_compile/Rn050_A.hs b/testsuite/tests/rename/should_compile/Rn050_A.hs
new file mode 100644
index 0000000000..d4e1f55c7c
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn050_A.hs
@@ -0,0 +1,10 @@
+module Rn050_A where
+
+{-# DEPRECATED C "Use D instead" #-}
+{-# DEPRECATED op "Use bop instead" #-}
+
+data T = C | D
+
+class Foo a where
+ op :: a -> a
+ bop :: a -> a
diff --git a/testsuite/tests/rename/should_compile/Rn052Aux.hs b/testsuite/tests/rename/should_compile/Rn052Aux.hs
new file mode 100644
index 0000000000..748da06728
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn052Aux.hs
@@ -0,0 +1,6 @@
+
+module Rn052Aux where
+
+class C a where
+ f :: a -> Bool
+
diff --git a/testsuite/tests/rename/should_compile/Rn053_A.hs b/testsuite/tests/rename/should_compile/Rn053_A.hs
new file mode 100644
index 0000000000..d454462034
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn053_A.hs
@@ -0,0 +1,5 @@
+
+module Rn053_A where
+
+data D = C1 | C2
+
diff --git a/testsuite/tests/rename/should_compile/Rn053_B.hs b/testsuite/tests/rename/should_compile/Rn053_B.hs
new file mode 100644
index 0000000000..49603e8543
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn053_B.hs
@@ -0,0 +1,5 @@
+
+module Rn053_B where
+
+data D = C1 | C2
+
diff --git a/testsuite/tests/rename/should_compile/Rn059_A.hs b/testsuite/tests/rename/should_compile/Rn059_A.hs
new file mode 100644
index 0000000000..ddebd78b11
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn059_A.hs
@@ -0,0 +1,5 @@
+
+module Rn059_A where
+
+data A = A { label :: Char }
+
diff --git a/testsuite/tests/rename/should_compile/Rn059_B.hs b/testsuite/tests/rename/should_compile/Rn059_B.hs
new file mode 100644
index 0000000000..df93ae3688
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn059_B.hs
@@ -0,0 +1,5 @@
+
+module Rn059_B where
+
+data B = B { label :: Char }
+
diff --git a/testsuite/tests/rename/should_compile/Rn065A.hs b/testsuite/tests/rename/should_compile/Rn065A.hs
new file mode 100644
index 0000000000..4c6ff53cd4
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn065A.hs
@@ -0,0 +1,4 @@
+
+module Rn065A where
+
+data T = T { a :: Int }
diff --git a/testsuite/tests/rename/should_compile/Rn066_A.hs b/testsuite/tests/rename/should_compile/Rn066_A.hs
new file mode 100644
index 0000000000..c6624c3c67
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn066_A.hs
@@ -0,0 +1,10 @@
+module Rn066_A where
+
+{-# WARNING C "Are you sure you want to do that?" #-}
+{-# WARNING op "Is that really a good idea?" #-}
+
+data T = C | D
+
+class Foo a where
+ op :: a -> a
+ bop :: a -> a
diff --git a/testsuite/tests/rename/should_compile/Rn067_A.hs b/testsuite/tests/rename/should_compile/Rn067_A.hs
new file mode 100644
index 0000000000..8d7958d64c
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/Rn067_A.hs
@@ -0,0 +1,4 @@
+module Rn067_A where
+
+x = True
+
diff --git a/testsuite/tests/rename/should_compile/RnAux017.hs b/testsuite/tests/rename/should_compile/RnAux017.hs
new file mode 100644
index 0000000000..5514524fee
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/RnAux017.hs
@@ -0,0 +1,14 @@
+module RnAux017 where
+import Test -- Import main module so there really is a loop
+ -- (avoid warning message)
+data Wibble = Wibble
+data Wobble = Wobble
+
+a :: Int -> Int
+a = undefined
+
+b :: Int -> Int
+b = undefined
+
+c :: Int -> Int
+c = undefined
diff --git a/testsuite/tests/rename/should_compile/RnAux017.hs-boot b/testsuite/tests/rename/should_compile/RnAux017.hs-boot
new file mode 100644
index 0000000000..a2f3cd3916
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/RnAux017.hs-boot
@@ -0,0 +1,8 @@
+module RnAux017 where
+
+data Wibble
+data Wobble
+
+a :: Int -> Int
+b :: Int -> Int
+c :: Int -> Int
diff --git a/testsuite/tests/rename/should_compile/T1074b.hs b/testsuite/tests/rename/should_compile/T1074b.hs
new file mode 100644
index 0000000000..f236e9b52e
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1074b.hs
@@ -0,0 +1,4 @@
+
+module Foo (Monad(..)) where
+
+import Prelude (Monad((>>=), return))
diff --git a/testsuite/tests/rename/should_compile/T1789.hs b/testsuite/tests/rename/should_compile/T1789.hs
new file mode 100644
index 0000000000..efe3840e4f
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1789.hs
@@ -0,0 +1,11 @@
+{-# OPTIONS_GHC -fwarn-missing-import-lists #-}
+
+-- Test Trac #1789
+module T1789 where
+
+import Prelude
+import Data.Map
+import Data.Map (size)
+import Data.Maybe (Maybe(..))
+import Data.Maybe hiding (isJust)
+import qualified Data.Set as Set \ No newline at end of file
diff --git a/testsuite/tests/rename/should_compile/T1789.stderr b/testsuite/tests/rename/should_compile/T1789.stderr
new file mode 100644
index 0000000000..dc9a794935
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1789.stderr
@@ -0,0 +1,12 @@
+
+T1789.hs:6:1:
+ Warning: The module `Prelude' does not have an explicit import list
+
+T1789.hs:7:1:
+ Warning: The module `Data.Map' does not have an explicit import list
+
+T1789.hs:9:1:
+ Warning: The import item `Maybe(..)' does not have an explicit import list
+
+T1789.hs:10:1:
+ Warning: The module `Data.Maybe' does not have an explicit import list
diff --git a/testsuite/tests/rename/should_compile/T1789_2.hs b/testsuite/tests/rename/should_compile/T1789_2.hs
new file mode 100644
index 0000000000..2ac2a509fe
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1789_2.hs
@@ -0,0 +1,8 @@
+{-# OPTIONS_GHC -fwarn-missing-import-lists #-}
+
+-- Test Trac #1789
+module T1789_2 where
+
+import Data.Map (size)
+import Data.Maybe (Maybe(Just, Nothing))
+import qualified Data.Set as Set (insert)
diff --git a/testsuite/tests/rename/should_compile/T1792_imports.hs b/testsuite/tests/rename/should_compile/T1792_imports.hs
new file mode 100644
index 0000000000..8830bd03e8
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1792_imports.hs
@@ -0,0 +1,6 @@
+
+module T1792_imports (B.putStr, z, zipWith) where
+
+import qualified Data.ByteString as B (putStr, readFile, zip, zipWith)
+
+z = B.readFile
diff --git a/testsuite/tests/rename/should_compile/T1792_imports.stdout b/testsuite/tests/rename/should_compile/T1792_imports.stdout
new file mode 100644
index 0000000000..b497d12ec6
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1792_imports.stdout
@@ -0,0 +1 @@
+import qualified Data.ByteString as B ( putStr, readFile )
diff --git a/testsuite/tests/rename/should_compile/T1954.hs b/testsuite/tests/rename/should_compile/T1954.hs
new file mode 100644
index 0000000000..07bfa3a3e8
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1954.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# OPTIONS_GHC -Wall -Werror #-}
+module Bug(P) where
+
+newtype P a = P (IO a) deriving Monad
+
diff --git a/testsuite/tests/rename/should_compile/T1972.hs b/testsuite/tests/rename/should_compile/T1972.hs
new file mode 100644
index 0000000000..09dd8acaf4
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1972.hs
@@ -0,0 +1,20 @@
+{-# OPTIONS_GHC -fwarn-name-shadowing -fwarn-unused-binds #-}
+
+-- Trac #1972
+
+module Temp where
+
+import Data.List
+
+data Data = Data {name :: String}
+
+h :: a -> a
+h name = name
+
+f mapAccumL x = x
+
+mapAccumL y = y
+
+test x = a+b
+ where
+ (a,b,c) = x \ No newline at end of file
diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr
new file mode 100644
index 0000000000..4f9344c4bc
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T1972.stderr
@@ -0,0 +1,11 @@
+
+T1972.hs:12:3:
+ Warning: This binding for `name' shadows the existing binding
+ defined at T1972.hs:9:19
+
+T1972.hs:14:3:
+ Warning: This binding for `mapAccumL' shadows the existing bindings
+ defined at T1972.hs:16:1
+ imported from Data.List at T1972.hs:7:1-16
+
+T1972.hs:20:10: Warning: Defined but not used: `c'
diff --git a/testsuite/tests/rename/should_compile/T2205.hs b/testsuite/tests/rename/should_compile/T2205.hs
new file mode 100644
index 0000000000..580dea247a
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T2205.hs
@@ -0,0 +1,17 @@
+{-# OPTIONS_GHC -XTypeOperators #-}
+
+-- Test fixity of type operators
+-- Trac #2205
+
+module ShouldCompile where
+
+ infixr 0 :->
+ data a :-> b = P a b
+
+ fst3:: (a :-> (b :-> c)) -> a
+ fst3 (P a (P b c)) = a
+
+
+ fst3':: (a :-> b :-> c) -> a
+ fst3' (P a (P b c)) = a
+
diff --git a/testsuite/tests/rename/should_compile/T2436.hs b/testsuite/tests/rename/should_compile/T2436.hs
new file mode 100644
index 0000000000..5cfd64100a
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T2436.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# OPTIONS_GHC -fwarn-duplicate-exports #-}
+
+module T2436( C(..), T(..), module T2436a, S(..) ) where
+
+import T2436a
+
+class C a where
+ data T a
+
+instance C Int where
+ data T Int = TInt Int
+
+data instance S Int = SInt \ No newline at end of file
diff --git a/testsuite/tests/rename/should_compile/T2436a.hs b/testsuite/tests/rename/should_compile/T2436a.hs
new file mode 100644
index 0000000000..4813fd918d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T2436a.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE TypeFamilies #-}
+module T2436a( S ) where
+
+data family S a \ No newline at end of file
diff --git a/testsuite/tests/rename/should_compile/T2506.hs b/testsuite/tests/rename/should_compile/T2506.hs
new file mode 100644
index 0000000000..1e31a12c12
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T2506.hs
@@ -0,0 +1,6 @@
+-- Trac #2506
+
+module ShouldCompile where
+import Control.Exception (assert)
+
+foo = True `assert` ()
diff --git a/testsuite/tests/rename/should_compile/T2914.hs b/testsuite/tests/rename/should_compile/T2914.hs
new file mode 100644
index 0000000000..788efef59d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T2914.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TypeFamilies, RecordWildCards #-}
+module AssocWildCards where
+
+class FooClass a where
+ data FooType a
+
+instance FooClass Int where
+ data FooType Int = FooInt { fooIntVal :: Int }
+
+fooInt :: Int -> FooType Int
+fooInt fooIntVal = FooInt{..}
+
+fromFooInt :: FooType Int -> Int
+fromFooInt (FooInt{..}) = fooIntVal
diff --git a/testsuite/tests/rename/should_compile/T3221.hs b/testsuite/tests/rename/should_compile/T3221.hs
new file mode 100644
index 0000000000..5550fd3fa7
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3221.hs
@@ -0,0 +1,8 @@
+{-# OPTIONS_GHC -Werror -fwarn-unused-binds #-}
+
+-- Test Trac #3221: the constructors are used by the deriving
+-- clause, even though they are not exported
+
+module T3221( Foo ) where
+
+data Foo = Bar | Baz deriving (Show,Read)
diff --git a/testsuite/tests/rename/should_compile/T3262.hs b/testsuite/tests/rename/should_compile/T3262.hs
new file mode 100644
index 0000000000..01437d8d2f
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3262.hs
@@ -0,0 +1,21 @@
+{-# OPTIONS -fwarn-name-shadowing #-}
+
+-- Trac #3262: report shadowing in g but not f
+
+module T3262 where
+
+f x = let _ignored = 10 in
+ let _ignored = 20 in
+ x + _ignored
+
+g x = let not_ignored = 10 in
+ let not_ignored = 20 in
+ x + not_ignored
+
+mf x = do let _ignored = 10
+ let _ignored = 20
+ return (x + _ignored)
+
+mg x = do let not_ignored = 10
+ let not_ignored = 20
+ return (x + not_ignored)
diff --git a/testsuite/tests/rename/should_compile/T3262.stderr-ghc b/testsuite/tests/rename/should_compile/T3262.stderr-ghc
new file mode 100644
index 0000000000..4e730efa8d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3262.stderr-ghc
@@ -0,0 +1,8 @@
+
+T3262.hs:12:11:
+ Warning: This binding for `not_ignored' shadows the existing binding
+ bound at T3262.hs:11:11
+
+T3262.hs:20:15:
+ Warning: This binding for `not_ignored' shadows the existing binding
+ bound at T3262.hs:19:15
diff --git a/testsuite/tests/rename/should_compile/T3371.hs b/testsuite/tests/rename/should_compile/T3371.hs
new file mode 100644
index 0000000000..9b3d4459f9
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3371.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE RecordWildCards #-}
+{-# OPTIONS_GHC -fwarn-unused-matches #-}
+
+-- Should warn about the unused 'a', but not about the unused 'c'
+
+module T3371(bar) where
+
+data Foo = Foo { a,b,c :: Int } deriving(Eq)
+
+bar Foo{ a = a, ..} = print b
diff --git a/testsuite/tests/rename/should_compile/T3371.stderr b/testsuite/tests/rename/should_compile/T3371.stderr
new file mode 100644
index 0000000000..b354d9d3d6
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3371.stderr
@@ -0,0 +1,2 @@
+
+T3371.hs:10:14: Warning: Defined but not used: `a'
diff --git a/testsuite/tests/rename/should_compile/T3449.hs b/testsuite/tests/rename/should_compile/T3449.hs
new file mode 100644
index 0000000000..462bde67af
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3449.hs
@@ -0,0 +1,13 @@
+
+module T3449 (Foo, f1) where
+
+import T3449A
+
+class Foo a where
+ f1 :: a
+ f2 :: a
+
+instance Foo Char where
+ f1 = f2
+ f2 = aChar
+
diff --git a/testsuite/tests/rename/should_compile/T3449.hs-boot b/testsuite/tests/rename/should_compile/T3449.hs-boot
new file mode 100644
index 0000000000..153f29eef8
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3449.hs-boot
@@ -0,0 +1,9 @@
+
+module T3449 (Foo, f1) where
+
+class Foo a where
+ f1 :: a
+ f2 :: a
+
+unused :: Int
+
diff --git a/testsuite/tests/rename/should_compile/T3449.stderr b/testsuite/tests/rename/should_compile/T3449.stderr
new file mode 100644
index 0000000000..da36d24465
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3449.stderr
@@ -0,0 +1,2 @@
+
+T3449.hs-boot:8:1: Warning: Defined but not used: `unused'
diff --git a/testsuite/tests/rename/should_compile/T3449A.hs b/testsuite/tests/rename/should_compile/T3449A.hs
new file mode 100644
index 0000000000..6af161cdfd
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3449A.hs
@@ -0,0 +1,10 @@
+
+module T3449A where
+
+import {-# SOURCE #-} T3449
+
+z :: Foo a => a
+z = f1
+
+aChar :: Char
+aChar = 'a'
diff --git a/testsuite/tests/rename/should_compile/T3640.hs b/testsuite/tests/rename/should_compile/T3640.hs
new file mode 100644
index 0000000000..2f8c2253ab
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3640.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE NamedFieldPuns #-}
+
+module T3640 where
+
+data Record = Record { f1, f2, f3 :: Int }
+
+goodPun Record{f1,f2,f3} = f1 + f2 + f3
+
+badPun r = f1 + f2 + f3
+ where Record{f1=f1,f2,f3} = r
+
diff --git a/testsuite/tests/rename/should_compile/T3823.stderr b/testsuite/tests/rename/should_compile/T3823.stderr
new file mode 100644
index 0000000000..0eb8234554
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3823.stderr
@@ -0,0 +1,6 @@
+
+T3823B.hs:8:7:
+ Couldn't match expected type `A' with actual type `Bool'
+ In the first argument of `y', namely `a'
+ In the expression: y a
+ In an equation for `b': b = y a
diff --git a/testsuite/tests/rename/should_compile/T3823A.hs b/testsuite/tests/rename/should_compile/T3823A.hs
new file mode 100644
index 0000000000..0a5c230973
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3823A.hs
@@ -0,0 +1,8 @@
+module T3823A where
+
+import T3823B
+
+data A = X { x :: Bool } | Y
+
+y :: A -> A
+y = \_ -> Y
diff --git a/testsuite/tests/rename/should_compile/T3823A.hs-boot b/testsuite/tests/rename/should_compile/T3823A.hs-boot
new file mode 100644
index 0000000000..3b7dd8bb17
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3823A.hs-boot
@@ -0,0 +1,5 @@
+module T3823A where
+
+data A = X { x :: Bool } | Y
+
+y :: A -> A
diff --git a/testsuite/tests/rename/should_compile/T3823B.hs b/testsuite/tests/rename/should_compile/T3823B.hs
new file mode 100644
index 0000000000..9f4d03e091
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3823B.hs
@@ -0,0 +1,8 @@
+module T3823B where
+
+import {-# SOURCE #-} T3823A
+
+data B = A A
+
+a = x (X True)
+b = y a
diff --git a/testsuite/tests/rename/should_compile/T3901.hs b/testsuite/tests/rename/should_compile/T3901.hs
new file mode 100644
index 0000000000..39b521977b
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3901.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE RecordWildCards, TransformListComp, NamedFieldPuns #-}
+
+module T3901 where
+
+data Rec = Rec {a :: Int} deriving (Show)
+
+recs1 = [a | Rec {a=a} <- [Rec 1], then group by a]
+
+recs2 = [a | Rec {a} <- [Rec 1], then group by a]
+
+recs3 = [a | Rec {..} <- [Rec 1], then group by a]
+
+recs4 :: [[Int]]
+recs4 = [a | Rec {..} <- [Rec 1], then group by a]
diff --git a/testsuite/tests/rename/should_compile/T3943.hs b/testsuite/tests/rename/should_compile/T3943.hs
new file mode 100644
index 0000000000..efbeb295be
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3943.hs
@@ -0,0 +1,10 @@
+{-# OPTIONS_GHC -Wall #-}
+{-# LANGUAGE ViewPatterns #-}
+
+module T3943 where
+
+-- Note that 'r' is used, in the view pattern
+-- The bug was that 'r' was reported unused
+
+test :: ([a], [a]) -> [a]
+test x = let (r,(r++) -> rs) = x in rs
diff --git a/testsuite/tests/rename/should_compile/T4003A.hs b/testsuite/tests/rename/should_compile/T4003A.hs
new file mode 100644
index 0000000000..c17fbae456
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4003A.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+
+module T4003A where
+
+import T4003B
+
+import Data.Data
+
+data MyId = MyId
+ deriving (Data, Typeable)
+
+data HsExpr id
+ = HsOverLit (HsOverLit id)
+ | HsBracketOut (HsExpr MyId)
+ deriving (Data, Typeable)
diff --git a/testsuite/tests/rename/should_compile/T4003A.hs-boot b/testsuite/tests/rename/should_compile/T4003A.hs-boot
new file mode 100644
index 0000000000..b750e47474
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4003A.hs-boot
@@ -0,0 +1,8 @@
+module T4003A where
+
+import Data.Data
+
+data HsExpr i
+
+instance Typeable1 HsExpr
+instance Data i => Data (HsExpr i)
diff --git a/testsuite/tests/rename/should_compile/T4003B.hs b/testsuite/tests/rename/should_compile/T4003B.hs
new file mode 100644
index 0000000000..24ce2432a2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4003B.hs
@@ -0,0 +1,19 @@
+
+{-# LANGUAGE DeriveDataTypeable #-}
+
+module T4003B where
+
+import {-# SOURCE #-} T4003A (HsExpr)
+
+import Data.Data
+
+data HsLit = HsChar
+ deriving (Data, Typeable)
+
+data HsOverLit id
+ = OverLit (HsExpr id)
+ deriving (Data, Typeable)
+
+data OverLitVal = HsIntegral
+ deriving (Data, Typeable)
+
diff --git a/testsuite/tests/rename/should_compile/T4239.hs b/testsuite/tests/rename/should_compile/T4239.hs
new file mode 100644
index 0000000000..5d4f94f857
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4239.hs
@@ -0,0 +1,14 @@
+
+module T4239 where
+
+import T4239A
+
+v1 :: (:+++)
+v1 = (:+++)
+
+v2 :: (:+++)
+v2 = X
+
+v3 :: (:+++)
+v3 = (:---)
+
diff --git a/testsuite/tests/rename/should_compile/T4239A.hs b/testsuite/tests/rename/should_compile/T4239A.hs
new file mode 100644
index 0000000000..ea92d9653b
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4239A.hs
@@ -0,0 +1,10 @@
+
+{-# LANGUAGE TypeOperators #-}
+
+module T4239A where
+
+data (:+++) = (:+++)
+ | (:---)
+ | X
+ | Y
+
diff --git a/testsuite/tests/rename/should_compile/T4240.hs b/testsuite/tests/rename/should_compile/T4240.hs
new file mode 100644
index 0000000000..75621cf4d5
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4240.hs
@@ -0,0 +1,8 @@
+
+module T4240 where
+
+import T4240B
+
+v :: Int
+v = m
+
diff --git a/testsuite/tests/rename/should_compile/T4240.stdout b/testsuite/tests/rename/should_compile/T4240.stdout
new file mode 100644
index 0000000000..c73585f4a4
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4240.stdout
@@ -0,0 +1 @@
+import T4240B ( m )
diff --git a/testsuite/tests/rename/should_compile/T4240A.hs b/testsuite/tests/rename/should_compile/T4240A.hs
new file mode 100644
index 0000000000..15215e7080
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4240A.hs
@@ -0,0 +1,9 @@
+
+module T4240A where
+
+class C a where
+ m :: a
+
+instance C Int where
+ m = 5
+
diff --git a/testsuite/tests/rename/should_compile/T4240B.hs b/testsuite/tests/rename/should_compile/T4240B.hs
new file mode 100644
index 0000000000..b3165b3c12
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4240B.hs
@@ -0,0 +1,5 @@
+
+module T4240B (m) where
+
+import T4240A
+
diff --git a/testsuite/tests/rename/should_compile/T4478.hs b/testsuite/tests/rename/should_compile/T4478.hs
new file mode 100644
index 0000000000..0d6a5e1ea6
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4478.hs
@@ -0,0 +1,7 @@
+
+-- We don't want to warn about duplicate exports for things exported
+-- by both "module" exports
+module T4478 (module Prelude, module Data.List) where
+
+import Prelude
+import Data.List
diff --git a/testsuite/tests/rename/should_compile/T4489.hs b/testsuite/tests/rename/should_compile/T4489.hs
new file mode 100644
index 0000000000..a967cad06d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4489.hs
@@ -0,0 +1,6 @@
+{-# OPTIONS_GHC -fwarn-missing-import-lists #-}
+module T4489 where
+
+import Data.Maybe
+import Data.Maybe( Maybe(..) )
+import Data.Maybe( Maybe(Just) )
diff --git a/testsuite/tests/rename/should_compile/T4489.stderr b/testsuite/tests/rename/should_compile/T4489.stderr
new file mode 100644
index 0000000000..8cd400a720
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4489.stderr
@@ -0,0 +1,6 @@
+
+T4489.hs:4:1:
+ Warning: The module `Data.Maybe' does not have an explicit import list
+
+T4489.hs:5:1:
+ Warning: The import item `Maybe(..)' does not have an explicit import list
diff --git a/testsuite/tests/rename/should_compile/T4534.hs b/testsuite/tests/rename/should_compile/T4534.hs
new file mode 100644
index 0000000000..03eb67f23d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T4534.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TransformListComp #-}
+
+-- GHC 7.0.1 failed because the renamer didn't attach
+-- all the used variables to the TransformListComp constructor
+
+module List where
+
+intersectFront :: Ord a => [a] -> [a] -> [a]
+intersectFront xs ys = [x | (x,y) <- zip xs ys, then takeWhile by x == y]
diff --git a/testsuite/tests/rename/should_compile/T5331.hs b/testsuite/tests/rename/should_compile/T5331.hs
new file mode 100644
index 0000000000..4e7343e56b
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T5331.hs
@@ -0,0 +1,19 @@
+{-# LANGUAGE GADTs, ScopedTypeVariables #-}
+{-# OPTIONS_GHC -Wall #-}
+
+module Foo where
+
+data T a
+
+instance Eq (T a)
+{-# SPECIALISE instance forall a.Eq (T Int) #-}
+
+data S = forall a.S1
+
+data W where
+ W1 :: forall a. W
+
+f :: forall a. Int
+f = 3
+
+
diff --git a/testsuite/tests/rename/should_compile/T5331.stderr b/testsuite/tests/rename/should_compile/T5331.stderr
new file mode 100644
index 0000000000..36261c539d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T5331.stderr
@@ -0,0 +1,18 @@
+
+T5331.hs:9:32:
+ Warning: Unused quantified type variable `a'
+ In the type `forall a. Eq (T Int)'
+ In a SPECIALISE instance pragma
+
+T5331.hs:11:17:
+ Warning: Unused quantified type variable `a'
+ In the definition of data constructor `S1'
+
+T5331.hs:14:16:
+ Warning: Unused quantified type variable `a'
+ In the definition of data constructor `W1'
+
+T5331.hs:16:13:
+ Warning: Unused quantified type variable `a'
+ In the type `forall a. Int'
+ In the type signature for `f'
diff --git a/testsuite/tests/rename/should_compile/T5334.hs b/testsuite/tests/rename/should_compile/T5334.hs
new file mode 100644
index 0000000000..83f539d492
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T5334.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE RecordWildCards #-}
+
+module T5334 where
+
+data T = T { a, b :: Int }
+
+t = T {..}
+ where
+ a = 1
+ -- b = 2
+
+data S = S { x, y :: Int }
+
+s = S { x = 1 }
diff --git a/testsuite/tests/rename/should_compile/T5334.stderr b/testsuite/tests/rename/should_compile/T5334.stderr
new file mode 100644
index 0000000000..de906b9dd6
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T5334.stderr
@@ -0,0 +1,13 @@
+
+T5334.hs:7:5:
+ Warning: Fields of `T' not initialised: b
+ In the expression: T {..}
+ In an equation for `t':
+ t = T {..}
+ where
+ a = 1
+
+T5334.hs:14:5:
+ Warning: Fields of `S' not initialised: y
+ In the expression: S {x = 1}
+ In an equation for `s': s = S {x = 1}
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
new file mode 100644
index 0000000000..3946987e37
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -0,0 +1,179 @@
+# Args to vtc are: extra compile flags
+
+test('rn003', normal, compile, [''])
+test('rn005', normal, compile, [''])
+test('rn006', normal, compile, [''])
+test('rn009',
+ [only_compiler_types(['ghc']),
+ extra_clean(['Imp10Aux.hi', 'Imp10Aux.o',
+ 'Imp10Aux.hi-boot', 'Imp10Aux.o-boot'])],
+ multimod_compile,
+ ['rn009', '-v0'])
+# rn10 tests the same things as 009,011,012
+#test('rn010', only_compiler_types(['ghc']), multimod_compile, ['rn010', '-v0'])
+test('rn011',
+ [only_compiler_types(['ghc']),
+ extra_clean(['Imp100Aux.hi', 'Imp100Aux.o',
+ 'Imp100Aux.hi-boot', 'Imp100Aux.o-boot'])],
+ multimod_compile,
+ ['rn011', '-v0'])
+test('rn012',
+ [only_compiler_types(['ghc']),
+ extra_clean(['Imp500Aux.hi', 'Imp500Aux.o',
+ 'Imp500Aux.hi-boot', 'Imp500Aux.o-boot'])],
+ multimod_compile,
+ ['rn012', '-v0'])
+test('rn013', normal, compile, [''])
+test('rn017',
+ [only_compiler_types(['ghc']),
+ extra_clean(['RnAux017.hi', 'RnAux017.o',
+ 'RnAux017.hi-boot', 'RnAux017.o-boot'])],
+ multimod_compile,
+ ['rn017', '-v0'])
+test('rn019', normal, compile, [''])
+test('rn020', normal, compile, [''])
+test('rn022', normal, compile, [''])
+test('rn023', normal, compile, [''])
+test('rn024', normal, compile, [''])
+test('rn025', normal, compile, [''])
+test('rn026', normal, compile, [''])
+test('rn027', normal, compile, [''])
+test('rn028', normal, compile, [''])
+test('rn029', normal, compile, [''])
+test('rn031', normal, compile, [''])
+test('rn032', normal, compile, [''])
+test('rn033', normal, compile, [''])
+test('rn034', normal, compile, [''])
+test('rn035', normal, compile, [''])
+test('rn036', normal, compile, [''])
+test('rn037', normal, compile, [''])
+
+# Missing:
+# test('rn038', normal, compile, [''])
+
+test('rn039', normal, compile, [''])
+test('rn040', normal, compile, ['-fwarn-unused-binds -fwarn-unused-matches'])
+test('rn041', normal, compile, [''])
+test('rn042',
+ extra_clean(['Rn042_A.hi', 'Rn042_A.o']),
+ multimod_compile,
+ ['rn042', '-v0'])
+test('rn043',
+ extra_clean(['Rn043_A.hi', 'Rn043_A.o', 'Rn043_B.hi', 'Rn043_B.o']),
+ multimod_compile, ['rn043', '-v0'])
+test('rn044',
+ extra_clean(['Rn044_A.hi', 'Rn044_A.o', 'Rn044_B.hi', 'Rn044_B.o']),
+ multimod_compile, ['rn044', '-v0'])
+test('rn045', normal, compile, [''])
+test('rn046', normal, compile, ['-W'])
+test('rn047', normal, compile, ['-W'])
+test('rn048', normal, compile, ['-W'])
+test('rn049', normal, compile, ['-W'])
+
+test('rn050',
+ extra_clean(['Rn050_A.hi', 'Rn050_A.o']),
+ multimod_compile, ['rn050', '-v0'])
+
+test('rn051', normal, compile, [''])
+
+test('rn052',
+ extra_clean(['Rn052Aux.hi', 'Rn052Aux.o']),
+ multimod_compile, ['rn052', '-v0'])
+
+test('rn053',
+ extra_clean(['Rn053_A.hi', 'Rn053_A.o', 'Rn053_B.hi', 'Rn053_B.o']),
+ multimod_compile, ['rn053', '-v0'])
+
+test('rn054', normal, compile, [''])
+test('rn055', normal, compile, [''])
+test('rn056', normal, compile, [''])
+test('rn057', normal, compile, [''])
+test('rn058', normal, compile, [''])
+test('rn059',
+ extra_clean(['Rn059_A.hi', 'Rn059_A.o', 'Rn059_B.hi', 'Rn059_B.o']),
+ multimod_compile, ['rn059', '-v0'])
+test('rn060', normal, compile, [''])
+test('rn061', normal, compile, [''])
+test('rn062', normal, compile, [''])
+test('rn063', normal, compile, [''])
+test('rn064', normal, compile, [''])
+test('rn065',
+ extra_clean(['Rn065A.hi', 'Rn065A.o']),
+ multimod_compile,
+ ['rn065', '-v0'])
+
+test('rn066',
+ extra_clean(['Rn066_A.hi', 'Rn066_A.o']),
+ multimod_compile, ['rn066', '-v0'])
+
+test('rn067',
+ extra_clean(['Rn067_A.hi', 'Rn067_A.o']),
+ multimod_compile, ['rn067', '-v0'])
+
+test('T1972', normal, compile, [''])
+test('T2205', normal, compile, [''])
+
+test('2334', normal, compile, [''])
+test('T2506', normal, compile, [''])
+test('T2914', normal, compile, [''])
+test('T3221', normal, compile, [''])
+test('T3262', normal, compile, [''])
+test('T3371', normal, compile, [''])
+test('T1074b', normal, compile, ['-Wall'])
+test('T3640', normal, compile, [''])
+test('T3901', normal, compile, [''])
+test('T1954', normal, compile, [''])
+test('T3943', normal, compile, [''])
+
+test('timing001', normal, compile, [''])
+test('timing002', normal, compile, [''])
+test('timing003', normal, compile, [''])
+
+test('T1792_imports', extra_clean(['T1792_imports.imports']), run_command,
+ ['$MAKE -s --no-print-directory T1792_imports'])
+
+test('T3823',
+ extra_clean(['T3823A.hi-boot', 'T3823A.hi', 'T3823B.hi',
+ 'T3823A.o-boot', 'T3823A.o', 'T3823B.o']),
+ run_command,
+ ['$MAKE -s --no-print-directory T3823'])
+
+test('T4003',
+ extra_clean(['T4003A.hi-boot', 'T4003A.hi', 'T4003B.hi',
+ 'T4003A.o-boot', 'T4003A.o', 'T4003B.o']),
+ run_command,
+ ['$MAKE -s --no-print-directory T4003'])
+test('T1789', normal, compile, [''])
+test('T1789_2', normal, compile, [''])
+test('T3449',
+ extra_clean(['T3449.hi-boot', 'T3449.hi',
+ 'T3449.o-boot', 'T3449.o']),
+ run_command,
+ ['$MAKE -s --no-print-directory T3449'])
+test('T4239',
+ [expect_broken(4239),
+ extra_clean(['T4239A.hi', 'T4239A.o', 'T4239.hi', 'T4239.o',
+ 'T4239.imports'])],
+ run_command,
+ ['$MAKE -s --no-print-directory T4239'])
+test('T4240',
+ [extra_clean(['T4240A.hi', 'T4240A.o', 'T4240.hi', 'T4240.o',
+ 'T4240.imports'])],
+ run_command,
+ ['$MAKE -s --no-print-directory T4240'])
+
+test('T4489', normal, compile, [''])
+test('T4478', if_compiler_lt('ghc', '7.1', expect_fail), compile, [''])
+test('T4534', normal, compile, [''])
+
+test('mc09', normal, compile, [''])
+test('mc10', normal, compile, [''])
+test('mc11', normal, compile, [''])
+test('mc12', normal, compile, [''])
+test('T2436',
+ [ only_compiler_types(['ghc']),
+ extra_clean(['T2436a.hi', 'T2436a.o']) ],
+ multimod_compile,
+ ['T2436', '-v0'])
+test('T5331', normal, compile, ['']) # Unused tyvar warnings
+test('T5334', normal, compile, ['']) # Unused tyvar warnings
diff --git a/testsuite/tests/rename/should_compile/mc09.hs b/testsuite/tests/rename/should_compile/mc09.hs
new file mode 100644
index 0000000000..f4a62fa617
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/mc09.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE MonadComprehensions, TransformListComp #-}
+
+-- Test performed for TransformListComp and should work for monad comp aswell:
+-- GHC 7.0.1 failed because the renamer didn't attach
+-- all the used variables to the TransformListComp constructor
+
+module List where
+
+intersectFront :: Ord a => [a] -> [a] -> [a]
+intersectFront xs ys = [x | (x,y) <- zip xs ys, then takeWhile by x == y]
diff --git a/testsuite/tests/rename/should_compile/mc10.hs b/testsuite/tests/rename/should_compile/mc10.hs
new file mode 100644
index 0000000000..fa9774fdfb
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/mc10.hs
@@ -0,0 +1,15 @@
+{-# OPTIONS_GHC -fwarn-unused-matches #-}
+{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
+-- Test for parallel list comp should work for monad comp aswell:
+--
+-- GHC 6.4 erroneously reported that the
+-- bindings for q and z were unused
+--
+-- Note the parallel list comprehension,
+-- which was the cause of the trouble
+
+module ShouldCompile where
+
+t :: [Int]
+t = [ q | y <- [1..10]
+ | z <- [30..40], let q = z*z]
diff --git a/testsuite/tests/rename/should_compile/mc10.stderr-ghc b/testsuite/tests/rename/should_compile/mc10.stderr-ghc
new file mode 100644
index 0000000000..585bfa4528
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/mc10.stderr-ghc
@@ -0,0 +1,2 @@
+
+mc10.hs:14:11: Warning: Defined but not used: `y'
diff --git a/testsuite/tests/rename/should_compile/mc11.hs b/testsuite/tests/rename/should_compile/mc11.hs
new file mode 100644
index 0000000000..250e587a16
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/mc11.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE RecordWildCards, MonadComprehensions, TransformListComp, NamedFieldPuns #-}
+
+module T3901 where
+
+data Rec = Rec {a :: Int} deriving (Show)
+
+recs1 = [a | Rec {a=a} <- [Rec 1], then group by a]
+
+recs2 = [a | Rec {a} <- [Rec 1], then group by a]
+
+recs3 = [a | Rec {..} <- [Rec 1], then group by a]
+
+recs4 :: [[Int]]
+recs4 = [a | Rec {..} <- [Rec 1], then group by a]
diff --git a/testsuite/tests/rename/should_compile/mc12.hs b/testsuite/tests/rename/should_compile/mc12.hs
new file mode 100644
index 0000000000..cd55dfb451
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/mc12.hs
@@ -0,0 +1,11 @@
+{-# OPTIONS_GHC -Wall #-}
+{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
+-- Test for parallel list comp, which should work for monad comp as well:
+--
+-- On GHC 6.0 and earlier, this parallel list comprehension generated
+-- an incorrect unused-binding warning.
+
+module ShouldCompile where
+
+t :: [(Char,Char)]
+t = [ (a,b) | a <- "foo" | b <- "bar" ]
diff --git a/testsuite/tests/rename/should_compile/rn003.hs b/testsuite/tests/rename/should_compile/rn003.hs
new file mode 100644
index 0000000000..bb22583721
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn003.hs
@@ -0,0 +1,9 @@
+module Foo (f) where
+-- export food
+f x = x
+
+-- !!! weird patterns with no variables
+1 = f 1
+[] = f []
+1 = f (f 1)
+[] = f (f [])
diff --git a/testsuite/tests/rename/should_compile/rn003.stderr b/testsuite/tests/rename/should_compile/rn003.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn003.stderr
diff --git a/testsuite/tests/rename/should_compile/rn005.hs b/testsuite/tests/rename/should_compile/rn005.hs
new file mode 100644
index 0000000000..623bd78df3
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn005.hs
@@ -0,0 +1,8 @@
+-- !!! rn005: simplest case: a few non-recursive bindings
+
+module Test where
+
+f = []
+g x = x
+h x y = x
+i x y z = x
diff --git a/testsuite/tests/rename/should_compile/rn005.stderr b/testsuite/tests/rename/should_compile/rn005.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn005.stderr
diff --git a/testsuite/tests/rename/should_compile/rn006.hs b/testsuite/tests/rename/should_compile/rn006.hs
new file mode 100644
index 0000000000..4f4c0a4fed
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn006.hs
@@ -0,0 +1,14 @@
+-- !!! rn006: two sets of mutually-recursive blobs:
+-- !!! f, g, h are mut rec
+-- !!! i, j, k are mut rec
+
+module Test where
+
+f x = g x x
+i x = j x x
+
+g x y = h x x y
+j x y = k x x y
+
+h x y z = f z
+k x y z = i z
diff --git a/testsuite/tests/rename/should_compile/rn006.stderr b/testsuite/tests/rename/should_compile/rn006.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn006.stderr
diff --git a/testsuite/tests/rename/should_compile/rn009.hs b/testsuite/tests/rename/should_compile/rn009.hs
new file mode 100644
index 0000000000..7192e1d45a
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn009.hs
@@ -0,0 +1,2 @@
+module Imp10 where
+import {-# SOURCE #-} Imp10Aux
diff --git a/testsuite/tests/rename/should_compile/rn009.stderr b/testsuite/tests/rename/should_compile/rn009.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn009.stderr
diff --git a/testsuite/tests/rename/should_compile/rn010.hs b/testsuite/tests/rename/should_compile/rn010.hs
new file mode 100644
index 0000000000..d1eac0a700
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn010.hs
@@ -0,0 +1,12 @@
+module Imp100 where
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+import {-# SOURCE #-} Int10
+
diff --git a/testsuite/tests/rename/should_compile/rn010.stderr b/testsuite/tests/rename/should_compile/rn010.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn010.stderr
diff --git a/testsuite/tests/rename/should_compile/rn011.hs b/testsuite/tests/rename/should_compile/rn011.hs
new file mode 100644
index 0000000000..df0cb62b25
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn011.hs
@@ -0,0 +1,101 @@
+module Imp100 where
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+import {-# SOURCE #-} Imp100Aux
+
diff --git a/testsuite/tests/rename/should_compile/rn011.stderr b/testsuite/tests/rename/should_compile/rn011.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn011.stderr
diff --git a/testsuite/tests/rename/should_compile/rn012.hs b/testsuite/tests/rename/should_compile/rn012.hs
new file mode 100644
index 0000000000..46bcfce6a3
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn012.hs
@@ -0,0 +1,503 @@
+module Imp500 where
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+import {-# SOURCE #-} Imp500Aux
+
+
diff --git a/testsuite/tests/rename/should_compile/rn012.stderr b/testsuite/tests/rename/should_compile/rn012.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn012.stderr
diff --git a/testsuite/tests/rename/should_compile/rn013.hs b/testsuite/tests/rename/should_compile/rn013.hs
new file mode 100644
index 0000000000..e48c2c56ee
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn013.hs
@@ -0,0 +1,21 @@
+module Mod10 where
+
+data T1 a = C1 a
+
+data T2 a b = T2C1 a | T2C2 b
+
+data T3 a b c = T3C1 a | T3C2 b | T3C3 c
+
+data T4 a b c d = T4C1 a | T4C2 b | T4C3 c | T4C4 d
+
+data T5 a b c d e = T5C1 a | T5C2 b | T5C3 c | T5C4 d | T5C5 e
+
+data T6 a = T6C6 a
+
+data T7 a b = T7C6 a | T7C7 b
+
+data T8 a b c = T8C1 a | T8C2 b | T8C3 c
+
+data T9 a b c d = T9C1 a | T9C2 b | T9C3 c | T9C4 d
+
+data T10 a b c d e = T10C1 a | T10C2 b | T10C3 c | T10C4 d | T10C5 e
diff --git a/testsuite/tests/rename/should_compile/rn013.stderr b/testsuite/tests/rename/should_compile/rn013.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn013.stderr
diff --git a/testsuite/tests/rename/should_compile/rn016.stderr b/testsuite/tests/rename/should_compile/rn016.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn016.stderr
diff --git a/testsuite/tests/rename/should_compile/rn017.hs b/testsuite/tests/rename/should_compile/rn017.hs
new file mode 100644
index 0000000000..7d073e90ea
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn017.hs
@@ -0,0 +1,14 @@
+-- !! Rexporting
+module Test ( module Test , module RnAux017 ) where
+
+import {-# SOURCE #-} RnAux017
+
+f x = x
+
+data Foo = MkFoo
+
+class FOO a where
+ op :: a -> Int
+
+instance FOO Foo where
+ op x = 42
diff --git a/testsuite/tests/rename/should_compile/rn018.stderr b/testsuite/tests/rename/should_compile/rn018.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn018.stderr
diff --git a/testsuite/tests/rename/should_compile/rn019.hs b/testsuite/tests/rename/should_compile/rn019.hs
new file mode 100644
index 0000000000..9c393f9119
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn019.hs
@@ -0,0 +1,4 @@
+module Silly (
+ Data.Array.accum
+ ) where
+import qualified Data.Array
diff --git a/testsuite/tests/rename/should_compile/rn020.hs b/testsuite/tests/rename/should_compile/rn020.hs
new file mode 100644
index 0000000000..5485d7cb51
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn020.hs
@@ -0,0 +1,11 @@
+-- !!! Duplicate fields in record decls
+
+module OK where
+
+data X = A {a :: Int} | B {a :: Int}
+
+f x = x
+
+-- data Y = V {a :: Int}
+
+-- f y = y
diff --git a/testsuite/tests/rename/should_compile/rn022.hs b/testsuite/tests/rename/should_compile/rn022.hs
new file mode 100644
index 0000000000..c59b949a48
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn022.hs
@@ -0,0 +1,11 @@
+-- this is legal, I think (WDP)
+
+module Confused where
+
+import Prelude hiding (otherwise)
+
+otherwise = False
+
+f x | otherwise = 1
+
+g otherwise | otherwise = 2
diff --git a/testsuite/tests/rename/should_compile/rn022.stderr b/testsuite/tests/rename/should_compile/rn022.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn022.stderr
diff --git a/testsuite/tests/rename/should_compile/rn023.hs b/testsuite/tests/rename/should_compile/rn023.hs
new file mode 100644
index 0000000000..3522ff0ff4
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn023.hs
@@ -0,0 +1,3 @@
+-- !! This one is fine in Haskell 1.4
+--
+module Foo ( Bar(..) ) where { data Bar = Bar X; data X = Y }
diff --git a/testsuite/tests/rename/should_compile/rn024.hs b/testsuite/tests/rename/should_compile/rn024.hs
new file mode 100644
index 0000000000..ae9cc6b4f0
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn024.hs
@@ -0,0 +1,9 @@
+-- !! This is fine in Haskell 1.4
+--
+module Foo ( Baz(..) ) where
+
+class Baz a where
+ opx :: Int -> Bar -> a -> a
+
+data Bar = Bar X
+data X = Y
diff --git a/testsuite/tests/rename/should_compile/rn025.hs b/testsuite/tests/rename/should_compile/rn025.hs
new file mode 100644
index 0000000000..b8bf1ffe94
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn025.hs
@@ -0,0 +1,5 @@
+-- !!! Re-exporting a module whose contents is partially hidden.
+module ShouldCompile ( module Data.List ) where
+
+import Data.List hiding ( sort )
+
diff --git a/testsuite/tests/rename/should_compile/rn025.stderr b/testsuite/tests/rename/should_compile/rn025.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn025.stderr
diff --git a/testsuite/tests/rename/should_compile/rn026.hs b/testsuite/tests/rename/should_compile/rn026.hs
new file mode 100644
index 0000000000..45510361a9
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn026.hs
@@ -0,0 +1,12 @@
+-- !!! Checking that more than imported module can share a local
+-- !!! local alias.
+module ShouldCompile where
+
+import qualified Data.List as X
+import qualified Data.Maybe as X
+
+x :: Ord a => [a] -> [a]
+x = X.sort
+
+y :: Maybe a -> Bool
+y = X.isJust
diff --git a/testsuite/tests/rename/should_compile/rn027.hs b/testsuite/tests/rename/should_compile/rn027.hs
new file mode 100644
index 0000000000..76cefe9310
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn027.hs
@@ -0,0 +1,12 @@
+-- !!! Checking that an imported module may still have
+-- !!! a local alias without having used 'qualified'.
+module ShouldCompile where
+
+import Data.List as X
+import Data.Maybe as X
+
+x :: Ord a => [a] -> [a]
+x = X.sort
+
+y :: Maybe a -> Bool
+y = X.isJust
diff --git a/testsuite/tests/rename/should_compile/rn028.hs b/testsuite/tests/rename/should_compile/rn028.hs
new file mode 100644
index 0000000000..6bbafd7a36
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn028.hs
@@ -0,0 +1,18 @@
+-- !!! Checking that a toplevel declaration 'f' in module M is accessible
+-- !!! as both 'f' and 'M.f' within the scope of M. Similarly for imported
+-- !!! entities.
+module ShouldCompile where
+
+import Data.List ( sort )
+
+x :: Int
+x = 2
+
+y :: Int
+y = x
+
+z :: Int
+z = ShouldCompile.x
+
+sortOf :: Ord a=> [a] -> [a]
+sortOf = Data.List.sort
diff --git a/testsuite/tests/rename/should_compile/rn029.hs b/testsuite/tests/rename/should_compile/rn029.hs
new file mode 100644
index 0000000000..76dd993dc9
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn029.hs
@@ -0,0 +1,17 @@
+-- !!! Checking that lazy name clashing works.
+module ShouldCompile where
+
+import Data.List ( reverse, sort )
+
+sort :: Int -- Clashes with Data.List.sort,
+sort = 4 -- but never used, so OK
+
+
+reverse :: Int -- Clashes with Data.List.reverse,
+reverse = 3 -- but the only uses are qualified
+
+x = ShouldCompile.reverse
+
+y = Data.List.reverse
+
+
diff --git a/testsuite/tests/rename/should_compile/rn031.hs b/testsuite/tests/rename/should_compile/rn031.hs
new file mode 100644
index 0000000000..7b4a07d626
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn031.hs
@@ -0,0 +1,12 @@
+-- !!! Checking that an imported module may still have
+-- !!! a local alias without having used 'qualified'.
+module ShouldCompile where
+
+import Data.List as X
+import Data.Maybe as X
+
+x :: Ord a => [a] -> [a]
+x = X.sort
+
+y :: Maybe a -> Bool
+y = isJust
diff --git a/testsuite/tests/rename/should_compile/rn032.hs b/testsuite/tests/rename/should_compile/rn032.hs
new file mode 100644
index 0000000000..6bbafd7a36
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn032.hs
@@ -0,0 +1,18 @@
+-- !!! Checking that a toplevel declaration 'f' in module M is accessible
+-- !!! as both 'f' and 'M.f' within the scope of M. Similarly for imported
+-- !!! entities.
+module ShouldCompile where
+
+import Data.List ( sort )
+
+x :: Int
+x = 2
+
+y :: Int
+y = x
+
+z :: Int
+z = ShouldCompile.x
+
+sortOf :: Ord a=> [a] -> [a]
+sortOf = Data.List.sort
diff --git a/testsuite/tests/rename/should_compile/rn033.hs b/testsuite/tests/rename/should_compile/rn033.hs
new file mode 100644
index 0000000000..4c30160a8d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn033.hs
@@ -0,0 +1,14 @@
+-- !!! Checking that lazy name clashing works
+module ShouldCompile where
+
+import Data.List ( sort )
+
+sort :: Int
+sort = 3
+
+foo :: Int
+foo = ShouldCompile.sort
+
+baz :: (Ord a) => [a] -> [a]
+baz = Data.List.sort
+
diff --git a/testsuite/tests/rename/should_compile/rn034.hs b/testsuite/tests/rename/should_compile/rn034.hs
new file mode 100644
index 0000000000..b8fc047171
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn034.hs
@@ -0,0 +1,12 @@
+-- !!! Checking that empty declarations are permitted.
+module ShouldCompile where
+
+
+class Foo a where
+
+class Foz a
+
+x = 2 where
+y = 3
+
+instance Foo Int where
diff --git a/testsuite/tests/rename/should_compile/rn035.hs b/testsuite/tests/rename/should_compile/rn035.hs
new file mode 100644
index 0000000000..3de6a9b71d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn035.hs
@@ -0,0 +1,10 @@
+-- !!! Checking what's legal in the body of a class declaration.
+module ShouldCompile where
+
+class Foo a where {
+ (--<>--) :: a -> a -> Int ;
+ infixl 5 --<>-- ;
+ (--<>--) _ _ = 2 ; -- empty decl at the end.
+};
+
+
diff --git a/testsuite/tests/rename/should_compile/rn036.hs b/testsuite/tests/rename/should_compile/rn036.hs
new file mode 100644
index 0000000000..9eb96b1dd6
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn036.hs
@@ -0,0 +1,14 @@
+-- !!! Checking that qualified method names are legal in instance body.
+-- but not (now -- Aug 02) in the binding position
+module ShouldCompile where
+
+import Prelude hiding (Eq, (==))
+import Prelude as P (Eq,(==))
+
+data Foo = Foo Int Integer
+
+instance P.Eq Foo where
+ (Foo a1 b1) == (Foo a2 b2) = a1 P.== a2 && b1 P.== b2
+
+
+
diff --git a/testsuite/tests/rename/should_compile/rn037.hs b/testsuite/tests/rename/should_compile/rn037.hs
new file mode 100644
index 0000000000..46de96fae5
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn037.hs
@@ -0,0 +1,4 @@
+{-# OPTIONS -fwarn-unused-imports #-}
+-- !!! test unused import warning
+import Data.List
+main = return () :: IO ()
diff --git a/testsuite/tests/rename/should_compile/rn037.stderr-ghc b/testsuite/tests/rename/should_compile/rn037.stderr-ghc
new file mode 100644
index 0000000000..64b604f9bd
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn037.stderr-ghc
@@ -0,0 +1,5 @@
+
+rn037.hs:3:1:
+ Warning: The import of `Data.List' is redundant
+ except perhaps to import instances from `Data.List'
+ To import instances alone, use: import Data.List()
diff --git a/testsuite/tests/rename/should_compile/rn039.hs b/testsuite/tests/rename/should_compile/rn039.hs
new file mode 100644
index 0000000000..9033858158
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn039.hs
@@ -0,0 +1,6 @@
+{-# OPTIONS -fwarn-name-shadowing #-}
+module ShouldCompile where
+
+-- !!! test shadowing of a global name
+
+g = 42 where f -1 = -1 -- shadows (-), probably by accident!
diff --git a/testsuite/tests/rename/should_compile/rn039.stderr-ghc b/testsuite/tests/rename/should_compile/rn039.stderr-ghc
new file mode 100644
index 0000000000..f3c9c5bf3d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn039.stderr-ghc
@@ -0,0 +1,4 @@
+
+rn039.hs:6:16:
+ Warning: This binding for `-' shadows the existing binding
+ imported from Prelude
diff --git a/testsuite/tests/rename/should_compile/rn040.hs b/testsuite/tests/rename/should_compile/rn040.hs
new file mode 100644
index 0000000000..3b418f5c2f
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn040.hs
@@ -0,0 +1,8 @@
+{-# OPTIONS -fwarn-unused-binds #-}
+module ShouldCompile where
+
+-- !!! should produce warnings about unused identifers
+x :: [()]
+x = [ () | y <- [] ]
+
+z = do w <- getContents; return ()
diff --git a/testsuite/tests/rename/should_compile/rn040.stderr-ghc b/testsuite/tests/rename/should_compile/rn040.stderr-ghc
new file mode 100644
index 0000000000..5de9d0c1c6
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn040.stderr-ghc
@@ -0,0 +1,4 @@
+
+rn040.hs:6:12: Warning: Defined but not used: `y'
+
+rn040.hs:8:8: Warning: Defined but not used: `w'
diff --git a/testsuite/tests/rename/should_compile/rn041.hs b/testsuite/tests/rename/should_compile/rn041.hs
new file mode 100644
index 0000000000..454227c14d
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn041.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS -fwarn-unused-binds #-}
+
+-- Test reports of unused bindings
+
+module ShouldCompile( t ) where
+
+f x = f x -- Unused
+
+g x = h x -- Unused
+h x = g x
+
+t x = t x -- Used by export list
+
diff --git a/testsuite/tests/rename/should_compile/rn041.stderr-ghc b/testsuite/tests/rename/should_compile/rn041.stderr-ghc
new file mode 100644
index 0000000000..da94a09854
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn041.stderr-ghc
@@ -0,0 +1,6 @@
+
+rn041.hs:7:1: Warning: Defined but not used: `f'
+
+rn041.hs:9:1: Warning: Defined but not used: `g'
+
+rn041.hs:10:1: Warning: Defined but not used: `h'
diff --git a/testsuite/tests/rename/should_compile/rn042.hs b/testsuite/tests/rename/should_compile/rn042.hs
new file mode 100644
index 0000000000..db96e89b73
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn042.hs
@@ -0,0 +1,5 @@
+-- Record field selectors imported alone; should be ok
+
+module M where
+
+import Rn042_A( field )
diff --git a/testsuite/tests/rename/should_compile/rn043.hs b/testsuite/tests/rename/should_compile/rn043.hs
new file mode 100644
index 0000000000..e88e8426df
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn043.hs
@@ -0,0 +1,6 @@
+-- This one should succeed; M.x is unambiguous
+
+module ShouldCompile (module M) where
+
+ import Rn043_A as M -- x, M.x
+ import Rn043_B -- x, Rn043_A.x
diff --git a/testsuite/tests/rename/should_compile/rn044.hs b/testsuite/tests/rename/should_compile/rn044.hs
new file mode 100644
index 0000000000..44e33b40b4
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn044.hs
@@ -0,0 +1,8 @@
+-- This one should succeed; x is unambiguous, even
+-- though M.x is not
+
+module ShouldCompile (module M) where
+
+import qualified Rn044_A as M -- M.x
+import Rn044_B as M -- x, M.x
+
diff --git a/testsuite/tests/rename/should_compile/rn045.hs b/testsuite/tests/rename/should_compile/rn045.hs
new file mode 100644
index 0000000000..16a3c49972
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn045.hs
@@ -0,0 +1,9 @@
+{-# OPTIONS_GHC -Wall #-}
+{-# LANGUAGE ParallelListComp #-}
+-- On GHC 6.0 and earlier, this parallel list comprehension generated
+-- an incorrect unused-binding warning.
+
+module ShouldCompile where
+
+t :: [(Char,Char)]
+t = [ (a,b) | a <- "foo" | b <- "bar" ]
diff --git a/testsuite/tests/rename/should_compile/rn046.hs b/testsuite/tests/rename/should_compile/rn046.hs
new file mode 100644
index 0000000000..ba469f3aec
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn046.hs
@@ -0,0 +1,6 @@
+module ShouldCompile where
+import Data.List (nub) -- all unused
+import Data.Char (ord, chr) -- some unused
+
+x = chr 42
+
diff --git a/testsuite/tests/rename/should_compile/rn046.stderr-ghc b/testsuite/tests/rename/should_compile/rn046.stderr-ghc
new file mode 100644
index 0000000000..ebde8af373
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn046.stderr-ghc
@@ -0,0 +1,8 @@
+
+rn046.hs:2:1:
+ Warning: The import of `Data.List' is redundant
+ except perhaps to import instances from `Data.List'
+ To import instances alone, use: import Data.List()
+
+rn046.hs:3:1:
+ Warning: The import of `ord' from module `Data.Char' is redundant
diff --git a/testsuite/tests/rename/should_compile/rn047.hs b/testsuite/tests/rename/should_compile/rn047.hs
new file mode 100644
index 0000000000..f4526aa384
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn047.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS_GHC -fwarn-unused-matches #-}
+{-# LANGUAGE ParallelListComp #-}
+-- GHC 6.4 erroneously reported that the
+-- bindings for q and z were unused
+--
+-- Note the parallel list comprehension,
+-- which was the cause of the trouble
+
+module ShouldCompile where
+
+t :: [Int]
+t = [ q | y <- [1..10]
+ | z <- [30..40], let q = z*z]
diff --git a/testsuite/tests/rename/should_compile/rn047.stderr-ghc b/testsuite/tests/rename/should_compile/rn047.stderr-ghc
new file mode 100644
index 0000000000..8b9614cb17
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn047.stderr-ghc
@@ -0,0 +1,2 @@
+
+rn047.hs:12:11: Warning: Defined but not used: `y'
diff --git a/testsuite/tests/rename/should_compile/rn048.hs b/testsuite/tests/rename/should_compile/rn048.hs
new file mode 100644
index 0000000000..e34c979258
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn048.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE GADTs #-}
+{-# OPTIONS_GHC -W #-}
+-- Produced a bogus unused-import warning in versions of GHC 6.6
+
+module Bug ( Structure (..) ) where
+
+import Prelude hiding( Rational )
+ -- Rational is exported by Prelude
+import Data.Ratio ( Rational )
+
+data Structure a where
+ StructCons :: Int -> Structure Int
+ StructRatio :: Structure Rational
+
+
diff --git a/testsuite/tests/rename/should_compile/rn049.hs b/testsuite/tests/rename/should_compile/rn049.hs
new file mode 100644
index 0000000000..83f6c5c276
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn049.hs
@@ -0,0 +1,13 @@
+-- GHC 6.4.1 said
+-- test.hs:1:5:
+-- Warning: accepting non-standard pattern guards
+-- (-fglasgow-exts to suppress this message)
+-- [x <- ((1 * 2) + 3) * 4, undefined]
+-- Note the wrongly-parenthesised expression
+
+{-# LANGUAGE Haskell98 #-}
+
+module ShouldCompile where
+
+main | x <- 1*2+3*4 = x
+ \ No newline at end of file
diff --git a/testsuite/tests/rename/should_compile/rn049.stderr b/testsuite/tests/rename/should_compile/rn049.stderr
new file mode 100644
index 0000000000..766c681051
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn049.stderr
@@ -0,0 +1,4 @@
+
+rn049.hs:12:6:
+ Warning: accepting non-standard pattern guards (use -XPatternGuards to suppress this message)
+ x <- 1 * 2 + 3 * 4
diff --git a/testsuite/tests/rename/should_compile/rn050.hs b/testsuite/tests/rename/should_compile/rn050.hs
new file mode 100644
index 0000000000..4dd1e6c4c4
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn050.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS_GHC -fwarn-warnings-deprecations #-}
+
+-- Test deprecation of constructors and class ops
+
+module ShouldCompile where
+
+import Rn050_A
+
+instance Foo T where
+ op x = x
+ bop y = y
+
+foo = op C
diff --git a/testsuite/tests/rename/should_compile/rn050.stderr b/testsuite/tests/rename/should_compile/rn050.stderr
new file mode 100644
index 0000000000..d323205aed
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn050.stderr
@@ -0,0 +1,10 @@
+
+rn050.hs:7:1:
+ Warning: In the use of data constructor `C'
+ (imported from Rn050_A):
+ Deprecated: "Use D instead"
+
+rn050.hs:7:1:
+ Warning: In the use of `op'
+ (imported from Rn050_A):
+ Deprecated: "Use bop instead"
diff --git a/testsuite/tests/rename/should_compile/rn051.hs b/testsuite/tests/rename/should_compile/rn051.hs
new file mode 100644
index 0000000000..ee5b53ee8e
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn051.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS -XNoImplicitPrelude #-}
+
+-- This one crashed GHC 6.6 in lookupDeprec
+-- See Trac #1128
+-- and Note [Used names with interface not loaded]
+-- in RnNames
+
+module ShouldCompile where
+
+import Prelude
+
+foo :: Int -> Float
+foo x = 3.0
diff --git a/testsuite/tests/rename/should_compile/rn052.hs b/testsuite/tests/rename/should_compile/rn052.hs
new file mode 100644
index 0000000000..47e115a25c
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn052.hs
@@ -0,0 +1,10 @@
+
+module Rn052 where
+
+import qualified Rn052Aux
+
+data D = D
+
+instance Rn052Aux.C D where
+ f _ = True
+
diff --git a/testsuite/tests/rename/should_compile/rn053.hs b/testsuite/tests/rename/should_compile/rn053.hs
new file mode 100644
index 0000000000..6994bf29bd
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn053.hs
@@ -0,0 +1,7 @@
+
+module Rn053 (D(C1, C2)) where
+
+import qualified Rn053_A
+import Rn053_A hiding (D(..))
+import Rn053_B
+
diff --git a/testsuite/tests/rename/should_compile/rn054.hs b/testsuite/tests/rename/should_compile/rn054.hs
new file mode 100644
index 0000000000..9706072cb6
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn054.hs
@@ -0,0 +1,5 @@
+
+module Rn054 where
+
+import Data.Bits (shiftL)
+
diff --git a/testsuite/tests/rename/should_compile/rn055.hs b/testsuite/tests/rename/should_compile/rn055.hs
new file mode 100644
index 0000000000..d5ec280d4a
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn055.hs
@@ -0,0 +1,6 @@
+{-# OPTIONS_GHC -fwarn-implicit-prelude -fwarn-unused-imports #-}
+module ShouldCompile where
+
+-- !!! should produce warnings about implicitly imported Prelude
+-- (but not about the implicit import being unused)
+
diff --git a/testsuite/tests/rename/should_compile/rn055.stderr-ghc b/testsuite/tests/rename/should_compile/rn055.stderr-ghc
new file mode 100644
index 0000000000..1b928b46cf
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn055.stderr-ghc
@@ -0,0 +1,2 @@
+
+rn055.hs:1:1: Warning: Module `Prelude' implicitly imported
diff --git a/testsuite/tests/rename/should_compile/rn056.hs b/testsuite/tests/rename/should_compile/rn056.hs
new file mode 100644
index 0000000000..5e775dd112
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn056.hs
@@ -0,0 +1,9 @@
+{-# OPTIONS_GHC -fwarn-implicit-prelude -fwarn-unused-imports #-}
+module ShouldCompile where
+
+import Prelude ()
+
+-- !!! should produce no warnings
+-- (the other use of importing nothing is
+-- to nullify the implicit import of the Prelude)
+
diff --git a/testsuite/tests/rename/should_compile/rn056.stderr b/testsuite/tests/rename/should_compile/rn056.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn056.stderr
diff --git a/testsuite/tests/rename/should_compile/rn057.hs b/testsuite/tests/rename/should_compile/rn057.hs
new file mode 100644
index 0000000000..b6ca224ffb
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn057.hs
@@ -0,0 +1,6 @@
+{-# OPTIONS_GHC -fwarn-implicit-prelude #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+module ShouldCompile where
+
+-- !!! should produce no warning
+
diff --git a/testsuite/tests/rename/should_compile/rn057.stderr b/testsuite/tests/rename/should_compile/rn057.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn057.stderr
diff --git a/testsuite/tests/rename/should_compile/rn058.hs b/testsuite/tests/rename/should_compile/rn058.hs
new file mode 100644
index 0000000000..838f58b1c7
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn058.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE ForeignFunctionInterface #-}
+{-# OPTIONS_GHC -fwarn-unused-imports #-}
+
+-- Trac #1386
+-- We do not want a warning about unused imports
+
+module Foo () where
+
+import Control.Monad (liftM)
+
+foo :: IO ()
+foo = id `liftM` return ()
+
+foreign export ccall "hs_foo" foo :: IO ()
diff --git a/testsuite/tests/rename/should_compile/rn059.hs b/testsuite/tests/rename/should_compile/rn059.hs
new file mode 100644
index 0000000000..e46c666433
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn059.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS_GHC -XDisambiguateRecordFields #-}
+
+module Foo () where
+
+import Rn059_A
+import Rn059_B
+
+a = A { label = 'a' }
+
+b = B { label = 'b' }
+
+f (A { label = a }) (B { label = b }) = (a,b)
+
diff --git a/testsuite/tests/rename/should_compile/rn060.hs b/testsuite/tests/rename/should_compile/rn060.hs
new file mode 100644
index 0000000000..aa6ff02191
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn060.hs
@@ -0,0 +1,6 @@
+
+module Foo (module Data.List) where
+
+import Data.List
+import Data.List as Foo
+
diff --git a/testsuite/tests/rename/should_compile/rn061.hs b/testsuite/tests/rename/should_compile/rn061.hs
new file mode 100644
index 0000000000..caeb1c9e79
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn061.hs
@@ -0,0 +1,3 @@
+
+module Foo (module Prelude) where
+
diff --git a/testsuite/tests/rename/should_compile/rn062.hs b/testsuite/tests/rename/should_compile/rn062.hs
new file mode 100644
index 0000000000..dbb5493fb9
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn062.hs
@@ -0,0 +1,8 @@
+-- Trac #2055
+
+module Foo where
+
+import qualified Data.List
+
+foo genericReplicate = genericReplicate True
+
diff --git a/testsuite/tests/rename/should_compile/rn063.hs b/testsuite/tests/rename/should_compile/rn063.hs
new file mode 100644
index 0000000000..4f40cce7ee
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn063.hs
@@ -0,0 +1,14 @@
+
+{-# OPTIONS_GHC -Wall #-}
+
+module Foo where
+
+-- We should complain that both x and y are unused.
+-- We used to not warn for recursive bindings, like x (trac #2136).
+
+v :: a
+v = let x = x in undefined
+
+w :: a
+w = let y = 'a' in undefined
+
diff --git a/testsuite/tests/rename/should_compile/rn063.stderr b/testsuite/tests/rename/should_compile/rn063.stderr
new file mode 100644
index 0000000000..c437dd3c6a
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn063.stderr
@@ -0,0 +1,4 @@
+
+rn063.hs:10:9: Warning: Defined but not used: `x'
+
+rn063.hs:13:9: Warning: Defined but not used: `y'
diff --git a/testsuite/tests/rename/should_compile/rn064.hs b/testsuite/tests/rename/should_compile/rn064.hs
new file mode 100644
index 0000000000..658d87b348
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn064.hs
@@ -0,0 +1,17 @@
+
+{-# OPTIONS_GHC -Wall #-}
+
+module Foo where
+
+-- We should complain that the first r shadows the second one, and give
+-- the right locations for the two of them. (trac #2137)
+
+z :: a
+z = r
+ where
+ _a = 'a'
+ _f r = r
+ _b = 'b'
+ r = undefined
+ _c = 'c'
+
diff --git a/testsuite/tests/rename/should_compile/rn064.stderr b/testsuite/tests/rename/should_compile/rn064.stderr
new file mode 100644
index 0000000000..f23a96bb54
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn064.stderr
@@ -0,0 +1,4 @@
+
+rn064.hs:13:12:
+ Warning: This binding for `r' shadows the existing binding
+ bound at rn064.hs:15:9
diff --git a/testsuite/tests/rename/should_compile/rn065.hs b/testsuite/tests/rename/should_compile/rn065.hs
new file mode 100644
index 0000000000..2da09d0d74
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn065.hs
@@ -0,0 +1,10 @@
+
+{-# LANGUAGE RecordWildCards #-}
+
+-- trac #1491
+
+module Foo where
+
+import Rn065A
+
+f T{..} = a + 1
diff --git a/testsuite/tests/rename/should_compile/rn066.hs b/testsuite/tests/rename/should_compile/rn066.hs
new file mode 100644
index 0000000000..c41265ecf5
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn066.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS_GHC -fwarn-warnings-deprecations #-}
+
+-- Test warnings on constructors and class ops
+
+module ShouldCompile where
+
+import Rn066_A
+
+instance Foo T where
+ op x = x
+ bop y = y
+
+foo = op C
diff --git a/testsuite/tests/rename/should_compile/rn066.stderr b/testsuite/tests/rename/should_compile/rn066.stderr
new file mode 100644
index 0000000000..6a95f2f93c
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn066.stderr
@@ -0,0 +1,10 @@
+
+rn066.hs:7:1:
+ Warning: In the use of data constructor `C'
+ (imported from Rn066_A):
+ "Are you sure you want to do that?"
+
+rn066.hs:7:1:
+ Warning: In the use of `op'
+ (imported from Rn066_A):
+ "Is that really a good idea?"
diff --git a/testsuite/tests/rename/should_compile/rn067.hs b/testsuite/tests/rename/should_compile/rn067.hs
new file mode 100644
index 0000000000..d0e2d2ede2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/rn067.hs
@@ -0,0 +1,14 @@
+
+module ShouldCompile where
+
+import Rn067_A
+
+x = 'a'
+
+-- The use of x here should not be reported as ambiguous, as it refers
+-- to the local variable.
+--
+-- hugs Sept 2006 says:
+--
+-- ERROR "rn067.hs":14 - Ambiguous variable occurrence "x"
+test = let x = "" in x
diff --git a/testsuite/tests/rename/should_compile/timing001.hs b/testsuite/tests/rename/should_compile/timing001.hs
new file mode 100644
index 0000000000..b84b341f19
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/timing001.hs
@@ -0,0 +1,507 @@
+-- !!! 500 defns chained together at the top-level
+module Main(main) where
+main = undefined
+a000 = a001
+a001 = a002
+a002 = a003
+a003 = a004
+a004 = a005
+a005 = a006
+a006 = a007
+a007 = a008
+a008 = a009
+a009 = a010
+a010 = a011
+a011 = a012
+a012 = a013
+a013 = a014
+a014 = a015
+a015 = a016
+a016 = a017
+a017 = a018
+a018 = a019
+a019 = a020
+a020 = a021
+a021 = a022
+a022 = a023
+a023 = a024
+a024 = a025
+a025 = a026
+a026 = a027
+a027 = a028
+a028 = a029
+a029 = a030
+a030 = a031
+a031 = a032
+a032 = a033
+a033 = a034
+a034 = a035
+a035 = a036
+a036 = a037
+a037 = a038
+a038 = a039
+a039 = a040
+a040 = a041
+a041 = a042
+a042 = a043
+a043 = a044
+a044 = a045
+a045 = a046
+a046 = a047
+a047 = a048
+a048 = a049
+a049 = a050
+a050 = a051
+a051 = a052
+a052 = a053
+a053 = a054
+a054 = a055
+a055 = a056
+a056 = a057
+a057 = a058
+a058 = a059
+a059 = a060
+a060 = a061
+a061 = a062
+a062 = a063
+a063 = a064
+a064 = a065
+a065 = a066
+a066 = a067
+a067 = a068
+a068 = a069
+a069 = a070
+a070 = a071
+a071 = a072
+a072 = a073
+a073 = a074
+a074 = a075
+a075 = a076
+a076 = a077
+a077 = a078
+a078 = a079
+a079 = a080
+a080 = a081
+a081 = a082
+a082 = a083
+a083 = a084
+a084 = a085
+a085 = a086
+a086 = a087
+a087 = a088
+a088 = a089
+a089 = a090
+a090 = a091
+a091 = a092
+a092 = a093
+a093 = a094
+a094 = a095
+a095 = a096
+a096 = a097
+a097 = a098
+a098 = a099
+a099 = a100
+
+a100 = a101
+a101 = a102
+a102 = a103
+a103 = a104
+a104 = a105
+a105 = a106
+a106 = a107
+a107 = a108
+a108 = a109
+a109 = a110
+a110 = a111
+a111 = a112
+a112 = a113
+a113 = a114
+a114 = a115
+a115 = a116
+a116 = a117
+a117 = a118
+a118 = a119
+a119 = a120
+a120 = a121
+a121 = a122
+a122 = a123
+a123 = a124
+a124 = a125
+a125 = a126
+a126 = a127
+a127 = a128
+a128 = a129
+a129 = a130
+a130 = a131
+a131 = a132
+a132 = a133
+a133 = a134
+a134 = a135
+a135 = a136
+a136 = a137
+a137 = a138
+a138 = a139
+a139 = a140
+a140 = a141
+a141 = a142
+a142 = a143
+a143 = a144
+a144 = a145
+a145 = a146
+a146 = a147
+a147 = a148
+a148 = a149
+a149 = a150
+a150 = a151
+a151 = a152
+a152 = a153
+a153 = a154
+a154 = a155
+a155 = a156
+a156 = a157
+a157 = a158
+a158 = a159
+a159 = a160
+a160 = a161
+a161 = a162
+a162 = a163
+a163 = a164
+a164 = a165
+a165 = a166
+a166 = a167
+a167 = a168
+a168 = a169
+a169 = a170
+a170 = a171
+a171 = a172
+a172 = a173
+a173 = a174
+a174 = a175
+a175 = a176
+a176 = a177
+a177 = a178
+a178 = a179
+a179 = a180
+a180 = a181
+a181 = a182
+a182 = a183
+a183 = a184
+a184 = a185
+a185 = a186
+a186 = a187
+a187 = a188
+a188 = a189
+a189 = a190
+a190 = a191
+a191 = a192
+a192 = a193
+a193 = a194
+a194 = a195
+a195 = a196
+a196 = a197
+a197 = a198
+a198 = a199
+a199 = a200
+
+a200 = a201
+a201 = a202
+a202 = a203
+a203 = a204
+a204 = a205
+a205 = a206
+a206 = a207
+a207 = a208
+a208 = a209
+a209 = a210
+a210 = a211
+a211 = a212
+a212 = a213
+a213 = a214
+a214 = a215
+a215 = a216
+a216 = a217
+a217 = a218
+a218 = a219
+a219 = a220
+a220 = a221
+a221 = a222
+a222 = a223
+a223 = a224
+a224 = a225
+a225 = a226
+a226 = a227
+a227 = a228
+a228 = a229
+a229 = a230
+a230 = a231
+a231 = a232
+a232 = a233
+a233 = a234
+a234 = a235
+a235 = a236
+a236 = a237
+a237 = a238
+a238 = a239
+a239 = a240
+a240 = a241
+a241 = a242
+a242 = a243
+a243 = a244
+a244 = a245
+a245 = a246
+a246 = a247
+a247 = a248
+a248 = a249
+a249 = a250
+a250 = a251
+a251 = a252
+a252 = a253
+a253 = a254
+a254 = a255
+a255 = a256
+a256 = a257
+a257 = a258
+a258 = a259
+a259 = a260
+a260 = a261
+a261 = a262
+a262 = a263
+a263 = a264
+a264 = a265
+a265 = a266
+a266 = a267
+a267 = a268
+a268 = a269
+a269 = a270
+a270 = a271
+a271 = a272
+a272 = a273
+a273 = a274
+a274 = a275
+a275 = a276
+a276 = a277
+a277 = a278
+a278 = a279
+a279 = a280
+a280 = a281
+a281 = a282
+a282 = a283
+a283 = a284
+a284 = a285
+a285 = a286
+a286 = a287
+a287 = a288
+a288 = a289
+a289 = a290
+a290 = a291
+a291 = a292
+a292 = a293
+a293 = a294
+a294 = a295
+a295 = a296
+a296 = a297
+a297 = a298
+a298 = a299
+a299 = a300
+
+a300 = a301
+a301 = a302
+a302 = a303
+a303 = a304
+a304 = a305
+a305 = a306
+a306 = a307
+a307 = a308
+a308 = a309
+a309 = a310
+a310 = a311
+a311 = a312
+a312 = a313
+a313 = a314
+a314 = a315
+a315 = a316
+a316 = a317
+a317 = a318
+a318 = a319
+a319 = a320
+a320 = a321
+a321 = a322
+a322 = a323
+a323 = a324
+a324 = a325
+a325 = a326
+a326 = a327
+a327 = a328
+a328 = a329
+a329 = a330
+a330 = a331
+a331 = a332
+a332 = a333
+a333 = a334
+a334 = a335
+a335 = a336
+a336 = a337
+a337 = a338
+a338 = a339
+a339 = a340
+a340 = a341
+a341 = a342
+a342 = a343
+a343 = a344
+a344 = a345
+a345 = a346
+a346 = a347
+a347 = a348
+a348 = a349
+a349 = a350
+a350 = a351
+a351 = a352
+a352 = a353
+a353 = a354
+a354 = a355
+a355 = a356
+a356 = a357
+a357 = a358
+a358 = a359
+a359 = a360
+a360 = a361
+a361 = a362
+a362 = a363
+a363 = a364
+a364 = a365
+a365 = a366
+a366 = a367
+a367 = a368
+a368 = a369
+a369 = a370
+a370 = a371
+a371 = a372
+a372 = a373
+a373 = a374
+a374 = a375
+a375 = a376
+a376 = a377
+a377 = a378
+a378 = a379
+a379 = a380
+a380 = a381
+a381 = a382
+a382 = a383
+a383 = a384
+a384 = a385
+a385 = a386
+a386 = a387
+a387 = a388
+a388 = a389
+a389 = a390
+a390 = a391
+a391 = a392
+a392 = a393
+a393 = a394
+a394 = a395
+a395 = a396
+a396 = a397
+a397 = a398
+a398 = a399
+a399 = a400
+
+a400 = a401
+a401 = a402
+a402 = a403
+a403 = a404
+a404 = a405
+a405 = a406
+a406 = a407
+a407 = a408
+a408 = a409
+a409 = a410
+a410 = a411
+a411 = a412
+a412 = a413
+a413 = a414
+a414 = a415
+a415 = a416
+a416 = a417
+a417 = a418
+a418 = a419
+a419 = a420
+a420 = a421
+a421 = a422
+a422 = a423
+a423 = a424
+a424 = a425
+a425 = a426
+a426 = a427
+a427 = a428
+a428 = a429
+a429 = a430
+a430 = a431
+a431 = a432
+a432 = a433
+a433 = a434
+a434 = a435
+a435 = a436
+a436 = a437
+a437 = a438
+a438 = a439
+a439 = a440
+a440 = a441
+a441 = a442
+a442 = a443
+a443 = a444
+a444 = a445
+a445 = a446
+a446 = a447
+a447 = a448
+a448 = a449
+a449 = a450
+a450 = a451
+a451 = a452
+a452 = a453
+a453 = a454
+a454 = a455
+a455 = a456
+a456 = a457
+a457 = a458
+a458 = a459
+a459 = a460
+a460 = a461
+a461 = a462
+a462 = a463
+a463 = a464
+a464 = a465
+a465 = a466
+a466 = a467
+a467 = a468
+a468 = a469
+a469 = a470
+a470 = a471
+a471 = a472
+a472 = a473
+a473 = a474
+a474 = a475
+a475 = a476
+a476 = a477
+a477 = a478
+a478 = a479
+a479 = a480
+a480 = a481
+a481 = a482
+a482 = a483
+a483 = a484
+a484 = a485
+a485 = a486
+a486 = a487
+a487 = a488
+a488 = a489
+a489 = a490
+a490 = a491
+a491 = a492
+a492 = a493
+a493 = a494
+a494 = a495
+a495 = a496
+a496 = a497
+a497 = a498
+a498 = a499
+a499 = [] -- !!! ta-dah!!!
diff --git a/testsuite/tests/rename/should_compile/timing001.stderr b/testsuite/tests/rename/should_compile/timing001.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/timing001.stderr
diff --git a/testsuite/tests/rename/should_compile/timing002.hs b/testsuite/tests/rename/should_compile/timing002.hs
new file mode 100644
index 0000000000..f81b026a67
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/timing002.hs
@@ -0,0 +1,504 @@
+-- !!! 500 defns chained together with "where"s
+module Main(main) where
+
+main = undefined
+a500 = let a000 = []
+ a001 = a000
+ a002 = a001
+ a003 = a002
+ a004 = a003
+ a005 = a004
+ a006 = a005
+ a007 = a006
+ a008 = a007
+ a009 = a008
+ a010 = a009
+ a011 = a010
+ a012 = a011
+ a013 = a012
+ a014 = a013
+ a015 = a014
+ a016 = a015
+ a017 = a016
+ a018 = a017
+ a019 = a018
+ a020 = a019
+ a021 = a020
+ a022 = a021
+ a023 = a022
+ a024 = a023
+ a025 = a024
+ a026 = a025
+ a027 = a026
+ a028 = a027
+ a029 = a028
+ a030 = a029
+ a031 = a030
+ a032 = a031
+ a033 = a032
+ a034 = a033
+ a035 = a034
+ a036 = a035
+ a037 = a036
+ a038 = a037
+ a039 = a038
+ a040 = a039
+ a041 = a040
+ a042 = a041
+ a043 = a042
+ a044 = a043
+ a045 = a044
+ a046 = a045
+ a047 = a046
+ a048 = a047
+ a049 = a048
+ a050 = a049
+ a051 = a050
+ a052 = a051
+ a053 = a052
+ a054 = a053
+ a055 = a054
+ a056 = a055
+ a057 = a056
+ a058 = a057
+ a059 = a058
+ a060 = a059
+ a061 = a060
+ a062 = a061
+ a063 = a062
+ a064 = a063
+ a065 = a064
+ a066 = a065
+ a067 = a066
+ a068 = a067
+ a069 = a068
+ a070 = a069
+ a071 = a070
+ a072 = a071
+ a073 = a072
+ a074 = a073
+ a075 = a074
+ a076 = a075
+ a077 = a076
+ a078 = a077
+ a079 = a078
+ a080 = a079
+ a081 = a080
+ a082 = a081
+ a083 = a082
+ a084 = a083
+ a085 = a084
+ a086 = a085
+ a087 = a086
+ a088 = a087
+ a089 = a088
+ a090 = a089
+ a091 = a090
+ a092 = a091
+ a093 = a092
+ a094 = a093
+ a095 = a094
+ a096 = a095
+ a097 = a096
+ a098 = a097
+ a099 = a098
+ a100 = a099
+ a101 = a100
+ a102 = a101
+ a103 = a102
+ a104 = a103
+ a105 = a104
+ a106 = a105
+ a107 = a106
+ a108 = a107
+ a109 = a108
+ a110 = a109
+ a111 = a110
+ a112 = a111
+ a113 = a112
+ a114 = a113
+ a115 = a114
+ a116 = a115
+ a117 = a116
+ a118 = a117
+ a119 = a118
+ a120 = a119
+ a121 = a120
+ a122 = a121
+ a123 = a122
+ a124 = a123
+ a125 = a124
+ a126 = a125
+ a127 = a126
+ a128 = a127
+ a129 = a128
+ a130 = a129
+ a131 = a130
+ a132 = a131
+ a133 = a132
+ a134 = a133
+ a135 = a134
+ a136 = a135
+ a137 = a136
+ a138 = a137
+ a139 = a138
+ a140 = a139
+ a141 = a140
+ a142 = a141
+ a143 = a142
+ a144 = a143
+ a145 = a144
+ a146 = a145
+ a147 = a146
+ a148 = a147
+ a149 = a148
+ a150 = a149
+ a151 = a150
+ a152 = a151
+ a153 = a152
+ a154 = a153
+ a155 = a154
+ a156 = a155
+ a157 = a156
+ a158 = a157
+ a159 = a158
+ a160 = a159
+ a161 = a160
+ a162 = a161
+ a163 = a162
+ a164 = a163
+ a165 = a164
+ a166 = a165
+ a167 = a166
+ a168 = a167
+ a169 = a168
+ a170 = a169
+ a171 = a170
+ a172 = a171
+ a173 = a172
+ a174 = a173
+ a175 = a174
+ a176 = a175
+ a177 = a176
+ a178 = a177
+ a179 = a178
+ a180 = a179
+ a181 = a180
+ a182 = a181
+ a183 = a182
+ a184 = a183
+ a185 = a184
+ a186 = a185
+ a187 = a186
+ a188 = a187
+ a189 = a188
+ a190 = a189
+ a191 = a190
+ a192 = a191
+ a193 = a192
+ a194 = a193
+ a195 = a194
+ a196 = a195
+ a197 = a196
+ a198 = a197
+ a199 = a198
+ a200 = a199
+ a201 = a200
+ a202 = a201
+ a203 = a202
+ a204 = a203
+ a205 = a204
+ a206 = a205
+ a207 = a206
+ a208 = a207
+ a209 = a208
+ a210 = a209
+ a211 = a210
+ a212 = a211
+ a213 = a212
+ a214 = a213
+ a215 = a214
+ a216 = a215
+ a217 = a216
+ a218 = a217
+ a219 = a218
+ a220 = a219
+ a221 = a220
+ a222 = a221
+ a223 = a222
+ a224 = a223
+ a225 = a224
+ a226 = a225
+ a227 = a226
+ a228 = a227
+ a229 = a228
+ a230 = a229
+ a231 = a230
+ a232 = a231
+ a233 = a232
+ a234 = a233
+ a235 = a234
+ a236 = a235
+ a237 = a236
+ a238 = a237
+ a239 = a238
+ a240 = a239
+ a241 = a240
+ a242 = a241
+ a243 = a242
+ a244 = a243
+ a245 = a244
+ a246 = a245
+ a247 = a246
+ a248 = a247
+ a249 = a248
+ a250 = a249
+ a251 = a250
+ a252 = a251
+ a253 = a252
+ a254 = a253
+ a255 = a254
+ a256 = a255
+ a257 = a256
+ a258 = a257
+ a259 = a258
+ a260 = a259
+ a261 = a260
+ a262 = a261
+ a263 = a262
+ a264 = a263
+ a265 = a264
+ a266 = a265
+ a267 = a266
+ a268 = a267
+ a269 = a268
+ a270 = a269
+ a271 = a270
+ a272 = a271
+ a273 = a272
+ a274 = a273
+ a275 = a274
+ a276 = a275
+ a277 = a276
+ a278 = a277
+ a279 = a278
+ a280 = a279
+ a281 = a280
+ a282 = a281
+ a283 = a282
+ a284 = a283
+ a285 = a284
+ a286 = a285
+ a287 = a286
+ a288 = a287
+ a289 = a288
+ a290 = a289
+ a291 = a290
+ a292 = a291
+ a293 = a292
+ a294 = a293
+ a295 = a294
+ a296 = a295
+ a297 = a296
+ a298 = a297
+ a299 = a298
+ a300 = a299
+ a301 = a300
+ a302 = a301
+ a303 = a302
+ a304 = a303
+ a305 = a304
+ a306 = a305
+ a307 = a306
+ a308 = a307
+ a309 = a308
+ a310 = a309
+ a311 = a310
+ a312 = a311
+ a313 = a312
+ a314 = a313
+ a315 = a314
+ a316 = a315
+ a317 = a316
+ a318 = a317
+ a319 = a318
+ a320 = a319
+ a321 = a320
+ a322 = a321
+ a323 = a322
+ a324 = a323
+ a325 = a324
+ a326 = a325
+ a327 = a326
+ a328 = a327
+ a329 = a328
+ a330 = a329
+ a331 = a330
+ a332 = a331
+ a333 = a332
+ a334 = a333
+ a335 = a334
+ a336 = a335
+ a337 = a336
+ a338 = a337
+ a339 = a338
+ a340 = a339
+ a341 = a340
+ a342 = a341
+ a343 = a342
+ a344 = a343
+ a345 = a344
+ a346 = a345
+ a347 = a346
+ a348 = a347
+ a349 = a348
+ a350 = a349
+ a351 = a350
+ a352 = a351
+ a353 = a352
+ a354 = a353
+ a355 = a354
+ a356 = a355
+ a357 = a356
+ a358 = a357
+ a359 = a358
+ a360 = a359
+ a361 = a360
+ a362 = a361
+ a363 = a362
+ a364 = a363
+ a365 = a364
+ a366 = a365
+ a367 = a366
+ a368 = a367
+ a369 = a368
+ a370 = a369
+ a371 = a370
+ a372 = a371
+ a373 = a372
+ a374 = a373
+ a375 = a374
+ a376 = a375
+ a377 = a376
+ a378 = a377
+ a379 = a378
+ a380 = a379
+ a381 = a380
+ a382 = a381
+ a383 = a382
+ a384 = a383
+ a385 = a384
+ a386 = a385
+ a387 = a386
+ a388 = a387
+ a389 = a388
+ a390 = a389
+ a391 = a390
+ a392 = a391
+ a393 = a392
+ a394 = a393
+ a395 = a394
+ a396 = a395
+ a397 = a396
+ a398 = a397
+ a399 = a398
+ a400 = a399
+ a401 = a400
+ a402 = a401
+ a403 = a402
+ a404 = a403
+ a405 = a404
+ a406 = a405
+ a407 = a406
+ a408 = a407
+ a409 = a408
+ a410 = a409
+ a411 = a410
+ a412 = a411
+ a413 = a412
+ a414 = a413
+ a415 = a414
+ a416 = a415
+ a417 = a416
+ a418 = a417
+ a419 = a418
+ a420 = a419
+ a421 = a420
+ a422 = a421
+ a423 = a422
+ a424 = a423
+ a425 = a424
+ a426 = a425
+ a427 = a426
+ a428 = a427
+ a429 = a428
+ a430 = a429
+ a431 = a430
+ a432 = a431
+ a433 = a432
+ a434 = a433
+ a435 = a434
+ a436 = a435
+ a437 = a436
+ a438 = a437
+ a439 = a438
+ a440 = a439
+ a441 = a440
+ a442 = a441
+ a443 = a442
+ a444 = a443
+ a445 = a444
+ a446 = a445
+ a447 = a446
+ a448 = a447
+ a449 = a448
+ a450 = a449
+ a451 = a450
+ a452 = a451
+ a453 = a452
+ a454 = a453
+ a455 = a454
+ a456 = a455
+ a457 = a456
+ a458 = a457
+ a459 = a458
+ a460 = a459
+ a461 = a460
+ a462 = a461
+ a463 = a462
+ a464 = a463
+ a465 = a464
+ a466 = a465
+ a467 = a466
+ a468 = a467
+ a469 = a468
+ a470 = a469
+ a471 = a470
+ a472 = a471
+ a473 = a472
+ a474 = a473
+ a475 = a474
+ a476 = a475
+ a477 = a476
+ a478 = a477
+ a479 = a478
+ a480 = a479
+ a481 = a480
+ a482 = a481
+ a483 = a482
+ a484 = a483
+ a485 = a484
+ a486 = a485
+ a487 = a486
+ a488 = a487
+ a489 = a488
+ a490 = a489
+ a491 = a490
+ a492 = a491
+ a493 = a492
+ a494 = a493
+ a495 = a494
+ a496 = a495
+ a497 = a496
+ a498 = a497 in
+ a498
diff --git a/testsuite/tests/rename/should_compile/timing002.stderr b/testsuite/tests/rename/should_compile/timing002.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/timing002.stderr
diff --git a/testsuite/tests/rename/should_compile/timing003.hs b/testsuite/tests/rename/should_compile/timing003.hs
new file mode 100644
index 0000000000..c268646daf
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/timing003.hs
@@ -0,0 +1,508 @@
+-- !!! 500 defns, not chained together
+module Main(main) where
+
+main = undefined
+a000 = []
+a001 = []
+a002 = []
+a003 = []
+a004 = []
+a005 = []
+a006 = []
+a007 = []
+a008 = []
+a009 = []
+a010 = []
+a011 = []
+a012 = []
+a013 = []
+a014 = []
+a015 = []
+a016 = []
+a017 = []
+a018 = []
+a019 = []
+a020 = []
+a021 = []
+a022 = []
+a023 = []
+a024 = []
+a025 = []
+a026 = []
+a027 = []
+a028 = []
+a029 = []
+a030 = []
+a031 = []
+a032 = []
+a033 = []
+a034 = []
+a035 = []
+a036 = []
+a037 = []
+a038 = []
+a039 = []
+a040 = []
+a041 = []
+a042 = []
+a043 = []
+a044 = []
+a045 = []
+a046 = []
+a047 = []
+a048 = []
+a049 = []
+a050 = []
+a051 = []
+a052 = []
+a053 = []
+a054 = []
+a055 = []
+a056 = []
+a057 = []
+a058 = []
+a059 = []
+a060 = []
+a061 = []
+a062 = []
+a063 = []
+a064 = []
+a065 = []
+a066 = []
+a067 = []
+a068 = []
+a069 = []
+a070 = []
+a071 = []
+a072 = []
+a073 = []
+a074 = []
+a075 = []
+a076 = []
+a077 = []
+a078 = []
+a079 = []
+a080 = []
+a081 = []
+a082 = []
+a083 = []
+a084 = []
+a085 = []
+a086 = []
+a087 = []
+a088 = []
+a089 = []
+a090 = []
+a091 = []
+a092 = []
+a093 = []
+a094 = []
+a095 = []
+a096 = []
+a097 = []
+a098 = []
+a099 = []
+
+a100 = []
+a101 = []
+a102 = []
+a103 = []
+a104 = []
+a105 = []
+a106 = []
+a107 = []
+a108 = []
+a109 = []
+a110 = []
+a111 = []
+a112 = []
+a113 = []
+a114 = []
+a115 = []
+a116 = []
+a117 = []
+a118 = []
+a119 = []
+a120 = []
+a121 = []
+a122 = []
+a123 = []
+a124 = []
+a125 = []
+a126 = []
+a127 = []
+a128 = []
+a129 = []
+a130 = []
+a131 = []
+a132 = []
+a133 = []
+a134 = []
+a135 = []
+a136 = []
+a137 = []
+a138 = []
+a139 = []
+a140 = []
+a141 = []
+a142 = []
+a143 = []
+a144 = []
+a145 = []
+a146 = []
+a147 = []
+a148 = []
+a149 = []
+a150 = []
+a151 = []
+a152 = []
+a153 = []
+a154 = []
+a155 = []
+a156 = []
+a157 = []
+a158 = []
+a159 = []
+a160 = []
+a161 = []
+a162 = []
+a163 = []
+a164 = []
+a165 = []
+a166 = []
+a167 = []
+a168 = []
+a169 = []
+a170 = []
+a171 = []
+a172 = []
+a173 = []
+a174 = []
+a175 = []
+a176 = []
+a177 = []
+a178 = []
+a179 = []
+a180 = []
+a181 = []
+a182 = []
+a183 = []
+a184 = []
+a185 = []
+a186 = []
+a187 = []
+a188 = []
+a189 = []
+a190 = []
+a191 = []
+a192 = []
+a193 = []
+a194 = []
+a195 = []
+a196 = []
+a197 = []
+a198 = []
+a199 = []
+
+a200 = []
+a201 = []
+a202 = []
+a203 = []
+a204 = []
+a205 = []
+a206 = []
+a207 = []
+a208 = []
+a209 = []
+a210 = []
+a211 = []
+a212 = []
+a213 = []
+a214 = []
+a215 = []
+a216 = []
+a217 = []
+a218 = []
+a219 = []
+a220 = []
+a221 = []
+a222 = []
+a223 = []
+a224 = []
+a225 = []
+a226 = []
+a227 = []
+a228 = []
+a229 = []
+a230 = []
+a231 = []
+a232 = []
+a233 = []
+a234 = []
+a235 = []
+a236 = []
+a237 = []
+a238 = []
+a239 = []
+a240 = []
+a241 = []
+a242 = []
+a243 = []
+a244 = []
+a245 = []
+a246 = []
+a247 = []
+a248 = []
+a249 = []
+a250 = []
+a251 = []
+a252 = []
+a253 = []
+a254 = []
+a255 = []
+a256 = []
+a257 = []
+a258 = []
+a259 = []
+a260 = []
+a261 = []
+a262 = []
+a263 = []
+a264 = []
+a265 = []
+a266 = []
+a267 = []
+a268 = []
+a269 = []
+a270 = []
+a271 = []
+a272 = []
+a273 = []
+a274 = []
+a275 = []
+a276 = []
+a277 = []
+a278 = []
+a279 = []
+a280 = []
+a281 = []
+a282 = []
+a283 = []
+a284 = []
+a285 = []
+a286 = []
+a287 = []
+a288 = []
+a289 = []
+a290 = []
+a291 = []
+a292 = []
+a293 = []
+a294 = []
+a295 = []
+a296 = []
+a297 = []
+a298 = []
+a299 = []
+
+a300 = []
+a301 = []
+a302 = []
+a303 = []
+a304 = []
+a305 = []
+a306 = []
+a307 = []
+a308 = []
+a309 = []
+a310 = []
+a311 = []
+a312 = []
+a313 = []
+a314 = []
+a315 = []
+a316 = []
+a317 = []
+a318 = []
+a319 = []
+a320 = []
+a321 = []
+a322 = []
+a323 = []
+a324 = []
+a325 = []
+a326 = []
+a327 = []
+a328 = []
+a329 = []
+a330 = []
+a331 = []
+a332 = []
+a333 = []
+a334 = []
+a335 = []
+a336 = []
+a337 = []
+a338 = []
+a339 = []
+a340 = []
+a341 = []
+a342 = []
+a343 = []
+a344 = []
+a345 = []
+a346 = []
+a347 = []
+a348 = []
+a349 = []
+a350 = []
+a351 = []
+a352 = []
+a353 = []
+a354 = []
+a355 = []
+a356 = []
+a357 = []
+a358 = []
+a359 = []
+a360 = []
+a361 = []
+a362 = []
+a363 = []
+a364 = []
+a365 = []
+a366 = []
+a367 = []
+a368 = []
+a369 = []
+a370 = []
+a371 = []
+a372 = []
+a373 = []
+a374 = []
+a375 = []
+a376 = []
+a377 = []
+a378 = []
+a379 = []
+a380 = []
+a381 = []
+a382 = []
+a383 = []
+a384 = []
+a385 = []
+a386 = []
+a387 = []
+a388 = []
+a389 = []
+a390 = []
+a391 = []
+a392 = []
+a393 = []
+a394 = []
+a395 = []
+a396 = []
+a397 = []
+a398 = []
+a399 = []
+
+a400 = []
+a401 = []
+a402 = []
+a403 = []
+a404 = []
+a405 = []
+a406 = []
+a407 = []
+a408 = []
+a409 = []
+a410 = []
+a411 = []
+a412 = []
+a413 = []
+a414 = []
+a415 = []
+a416 = []
+a417 = []
+a418 = []
+a419 = []
+a420 = []
+a421 = []
+a422 = []
+a423 = []
+a424 = []
+a425 = []
+a426 = []
+a427 = []
+a428 = []
+a429 = []
+a430 = []
+a431 = []
+a432 = []
+a433 = []
+a434 = []
+a435 = []
+a436 = []
+a437 = []
+a438 = []
+a439 = []
+a440 = []
+a441 = []
+a442 = []
+a443 = []
+a444 = []
+a445 = []
+a446 = []
+a447 = []
+a448 = []
+a449 = []
+a450 = []
+a451 = []
+a452 = []
+a453 = []
+a454 = []
+a455 = []
+a456 = []
+a457 = []
+a458 = []
+a459 = []
+a460 = []
+a461 = []
+a462 = []
+a463 = []
+a464 = []
+a465 = []
+a466 = []
+a467 = []
+a468 = []
+a469 = []
+a470 = []
+a471 = []
+a472 = []
+a473 = []
+a474 = []
+a475 = []
+a476 = []
+a477 = []
+a478 = []
+a479 = []
+a480 = []
+a481 = []
+a482 = []
+a483 = []
+a484 = []
+a485 = []
+a486 = []
+a487 = []
+a488 = []
+a489 = []
+a490 = []
+a491 = []
+a492 = []
+a493 = []
+a494 = []
+a495 = []
+a496 = []
+a497 = []
+a498 = []
+a499 = []
diff --git a/testsuite/tests/rename/should_compile/timing003.stderr b/testsuite/tests/rename/should_compile/timing003.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/timing003.stderr
diff --git a/testsuite/tests/rename/should_fail/Makefile b/testsuite/tests/rename/should_fail/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/rename/should_fail/RnFail047_A.hs b/testsuite/tests/rename/should_fail/RnFail047_A.hs
new file mode 100644
index 0000000000..dfe63adbaa
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/RnFail047_A.hs
@@ -0,0 +1,8 @@
+
+module RnFail047_A (x) where
+
+import RnFail047
+
+x :: Int
+x = 3
+
diff --git a/testsuite/tests/rename/should_fail/RnFail047_A.hs-boot b/testsuite/tests/rename/should_fail/RnFail047_A.hs-boot
new file mode 100644
index 0000000000..5bfff40b96
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/RnFail047_A.hs-boot
@@ -0,0 +1,6 @@
+
+module RnFail047_A (x, y) where
+
+x::Int
+y::Int
+
diff --git a/testsuite/tests/rename/should_fail/RnFail055.hs b/testsuite/tests/rename/should_fail/RnFail055.hs
new file mode 100644
index 0000000000..bd95add36b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/RnFail055.hs
@@ -0,0 +1,48 @@
+{-# LANGUAGE MultiParamTypeClasses,RankNTypes,ExistentialQuantification,DatatypeContexts #-}
+module RnFail055 where
+
+import RnFail055_aux
+
+-- Id with different type
+f1 :: Int -> Float
+f1 = undefined
+
+-- type synonym with different arity
+type S1 a b = (a,b)
+
+-- type synonym with different rhs
+type S2 a b = forall a. (a,b)
+
+-- type synonym with alpha-renaming (should be ok)
+type S3 a = [a]
+
+-- datatype with different fields
+data T1 a b = T1 [b] [a]
+
+-- datatype with different stupid theta
+data (Eq b) => T2 a b = T2 a
+
+-- different constructor name
+data T3' = T3
+data T3 = T3'
+
+-- check alpha equivalence
+data T4 a = T4 (forall b. a -> b)
+
+-- different field labels
+data T5 a = T5 { field5 :: a }
+
+-- different strict marks
+data T6 = T6 Int
+
+-- different existential quantification
+data T7 a = forall a . T7 a
+
+-- extra method in the hs-boot
+class C1 a b where {}
+
+-- missing method in the hs-boot
+class C2 a b where { m2 :: a -> b; m2' :: a -> b }
+
+-- different superclasses
+class (Eq a, Ord a) => C3 a where { }
diff --git a/testsuite/tests/rename/should_fail/RnFail055.hs-boot b/testsuite/tests/rename/should_fail/RnFail055.hs-boot
new file mode 100644
index 0000000000..57a97d3695
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/RnFail055.hs-boot
@@ -0,0 +1,29 @@
+{-# LANGUAGE MultiParamTypeClasses,RankNTypes,ExistentialQuantification,DatatypeContexts #-}
+module RnFail055 where
+
+f1 :: Float -> Int
+
+type S1 a b c = (a,b)
+
+type S2 a b = forall b. (a,b)
+
+type S3 t = [t]
+
+data T1 a b = T1 [a] [b]
+
+data (Eq a) => T2 a b = T2 a
+
+data T3 = T3
+data T3' = T3'
+
+data T4 b = T4 (forall a. b -> a)
+
+data T5 a = T5 a
+
+data T6 = T6 !Int
+
+data T7 a = forall b . T7 a
+
+class C1 a b where { m1 :: a -> b }
+class C2 a b where { m2 :: a -> b }
+class (Ord a, Eq a) => C3 a where { }
diff --git a/testsuite/tests/rename/should_fail/RnFail055_aux.hs b/testsuite/tests/rename/should_fail/RnFail055_aux.hs
new file mode 100644
index 0000000000..4e1f12bf81
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/RnFail055_aux.hs
@@ -0,0 +1,3 @@
+module RnFail055_aux where
+
+import {-# SOURCE #-} RnFail055
diff --git a/testsuite/tests/rename/should_fail/Rnfail040_A.hs b/testsuite/tests/rename/should_fail/Rnfail040_A.hs
new file mode 100644
index 0000000000..6de0f88ac9
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/Rnfail040_A.hs
@@ -0,0 +1,2 @@
+module Rnfail040_A( nub ) where
+ nub = True
diff --git a/testsuite/tests/rename/should_fail/T1595a.hs b/testsuite/tests/rename/should_fail/T1595a.hs
new file mode 100644
index 0000000000..5497a7a269
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T1595a.hs
@@ -0,0 +1,5 @@
+module T1595a where
+
+a, b :: Integer -> Tpyo
+a = undefined
+b = undefined
diff --git a/testsuite/tests/rename/should_fail/T1595a.stderr b/testsuite/tests/rename/should_fail/T1595a.stderr
new file mode 100644
index 0000000000..3c9adca7f7
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T1595a.stderr
@@ -0,0 +1,2 @@
+
+T1595a.hs:3:20: Not in scope: type constructor or class `Tpyo'
diff --git a/testsuite/tests/rename/should_fail/T2310.hs b/testsuite/tests/rename/should_fail/T2310.hs
new file mode 100644
index 0000000000..6094b8e211
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2310.hs
@@ -0,0 +1,5 @@
+{-# OPTIONS_GHC -XScopedTypeVariables #-}
+
+module Foo where
+
+foo = let c = \ x :: a -> (x :: a) in co
diff --git a/testsuite/tests/rename/should_fail/T2310.stderr b/testsuite/tests/rename/should_fail/T2310.stderr
new file mode 100644
index 0000000000..6500eef1fc
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2310.stderr
@@ -0,0 +1,10 @@
+
+T2310.hs:5:22:
+ Illegal result type signature `a'
+ Result signatures are no longer supported in pattern matches
+ In a lambda abstraction: \ x :: a -> (x :: a)
+
+T2310.hs:5:39:
+ Not in scope: `co'
+ Perhaps you meant one of these:
+ `c' (line 5), `cos' (imported from Prelude)
diff --git a/testsuite/tests/rename/should_fail/T2490.hs b/testsuite/tests/rename/should_fail/T2490.hs
new file mode 100644
index 0000000000..31afc0987a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2490.hs
@@ -0,0 +1,10 @@
+-- Trac #2490
+module ShouldFail where
+
+-- All these sections are illegal
+
+f x = [ (`head` x, ())
+ , (+ x, ())
+ , ((), + x)
+ , ((), + x, ())
+ , ((), x +) ]
diff --git a/testsuite/tests/rename/should_fail/T2490.stderr b/testsuite/tests/rename/should_fail/T2490.stderr
new file mode 100644
index 0000000000..15beadab1e
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2490.stderr
@@ -0,0 +1,15 @@
+
+T2490.hs:6:10:
+ A section must be enclosed in parentheses thus: (`head` x)
+
+T2490.hs:7:10:
+ A section must be enclosed in parentheses thus: (+ x)
+
+T2490.hs:8:14:
+ A section must be enclosed in parentheses thus: (+ x)
+
+T2490.hs:9:14:
+ A section must be enclosed in parentheses thus: (+ x)
+
+T2490.hs:10:14:
+ A section must be enclosed in parentheses thus: (x +)
diff --git a/testsuite/tests/rename/should_fail/T2723.hs b/testsuite/tests/rename/should_fail/T2723.hs
new file mode 100644
index 0000000000..74f11af778
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2723.hs
@@ -0,0 +1,16 @@
+{-# OPTIONS_GHC -fwarn-name-shadowing -XNamedFieldPuns -XRecordWildCards #-}
+module WildCard where
+
+data Record = Record {field1 :: Int, field2 :: Double}
+
+field3 :: Int
+field3 = 3
+
+test1 (Record {field1, field2}) = let test = 1 in field1
+
+test2 :: (Record, Int)
+test2 = let
+ field1 = 10
+ field2 = 10.0
+ field3 = 8
+ in (Record {..}, field3)
diff --git a/testsuite/tests/rename/should_fail/T2723.stderr b/testsuite/tests/rename/should_fail/T2723.stderr
new file mode 100644
index 0000000000..7ede041658
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2723.stderr
@@ -0,0 +1,4 @@
+
+T2723.hs:15:5:
+ Warning: This binding for `field3' shadows the existing binding
+ defined at T2723.hs:7:1
diff --git a/testsuite/tests/rename/should_fail/T2901.hs b/testsuite/tests/rename/should_fail/T2901.hs
new file mode 100644
index 0000000000..a703a5e53d
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2901.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE DisambiguateRecordFields #-}
+-- Trac #2901
+
+module T2901 where
+
+f = F.Foo { F.field = "" }
diff --git a/testsuite/tests/rename/should_fail/T2901.stderr b/testsuite/tests/rename/should_fail/T2901.stderr
new file mode 100644
index 0000000000..7b3e9d5145
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2901.stderr
@@ -0,0 +1,5 @@
+
+T2901.hs:6:5: Not in scope: data constructor `F.Foo'
+
+T2901.hs:6:13:
+ `F.field' is not a (visible) field of constructor `Foo'
diff --git a/testsuite/tests/rename/should_fail/T2993.hs b/testsuite/tests/rename/should_fail/T2993.hs
new file mode 100644
index 0000000000..99f2a89ca1
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2993.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TypeOperators #-}
+
+-- Trac #2993
+
+module T2993 where
+
+foo b a = a <$> b . b
+
diff --git a/testsuite/tests/rename/should_fail/T2993.stderr b/testsuite/tests/rename/should_fail/T2993.stderr
new file mode 100644
index 0000000000..0ba55ddd36
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T2993.stderr
@@ -0,0 +1,2 @@
+
+T2993.hs:7:13: Not in scope: `<$>'
diff --git a/testsuite/tests/rename/should_fail/T3265.hs b/testsuite/tests/rename/should_fail/T3265.hs
new file mode 100644
index 0000000000..e938bbc34d
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T3265.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+-- Test Trac #3265
+
+module T3265 where
+
+data a :+: b = Left a | Right b
+
+class a :*: b where {}
diff --git a/testsuite/tests/rename/should_fail/T3265.stderr b/testsuite/tests/rename/should_fail/T3265.stderr
new file mode 100644
index 0000000000..37642ff16b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T3265.stderr
@@ -0,0 +1,8 @@
+
+T3265.hs:7:8:
+ Illegal declaration of a type or class operator `:+:'
+ Use -XTypeOperators to declare operators in type and declarations
+
+T3265.hs:9:9:
+ Illegal declaration of a type or class operator `:*:'
+ Use -XTypeOperators to declare operators in type and declarations
diff --git a/testsuite/tests/rename/should_fail/T3792.hs b/testsuite/tests/rename/should_fail/T3792.hs
new file mode 100644
index 0000000000..e01efb9418
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T3792.hs
@@ -0,0 +1,4 @@
+module T3792 where
+
+import Prelude( Prelude.map ) -- Illegal
+
diff --git a/testsuite/tests/rename/should_fail/T3792.stderr b/testsuite/tests/rename/should_fail/T3792.stderr
new file mode 100644
index 0000000000..892fb11083
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T3792.stderr
@@ -0,0 +1,2 @@
+
+T3792.hs:3:17: Illegal qualified name in import item: Prelude.map
diff --git a/testsuite/tests/rename/should_fail/T4042.hs b/testsuite/tests/rename/should_fail/T4042.hs
new file mode 100644
index 0000000000..221b5519ef
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T4042.hs
@@ -0,0 +1,12 @@
+-- Test Trac #4042
+
+module T4042 where
+
+f :: A -> A
+f
+-- The above line is a naked Template Haskell splice
+-- When compiling without -XTemplateHaskell we don't
+-- want a confusing error messsage saying "A is not in scope"
+
+data A = A
+
diff --git a/testsuite/tests/rename/should_fail/T4042.stderr b/testsuite/tests/rename/should_fail/T4042.stderr
new file mode 100644
index 0000000000..f8c7e433a6
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T4042.stderr
@@ -0,0 +1,2 @@
+
+T4042.hs:6:1: Parse error: naked expression at top level
diff --git a/testsuite/tests/rename/should_fail/T5211.hs b/testsuite/tests/rename/should_fail/T5211.hs
new file mode 100644
index 0000000000..2d0e69af7b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T5211.hs
@@ -0,0 +1,16 @@
+{-# OPTIONS_GHC -fwarn-unused-imports #-}
+module RedundantImport where
+
+-- this import is redundant, but GHC does not spot it
+import qualified Foreign.Storable
+
+import Foreign.Storable (Storable, sizeOf, alignment, peek, poke, )
+import Foreign.Ptr (castPtr, )
+
+newtype T a = Cons a
+
+instance Storable a => Storable (T a) where
+ sizeOf (Cons a) = sizeOf a
+ alignment (Cons a) = alignment a
+ peek = fmap Cons . peek . castPtr
+ poke p (Cons a) = poke (castPtr p) a
diff --git a/testsuite/tests/rename/should_fail/T5211.stderr b/testsuite/tests/rename/should_fail/T5211.stderr
new file mode 100644
index 0000000000..a33a02750c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T5211.stderr
@@ -0,0 +1,5 @@
+
+T5211.hs:5:1:
+ Warning: The import of `Foreign.Storable' is redundant
+ except perhaps to import instances from `Foreign.Storable'
+ To import instances alone, use: import Foreign.Storable()
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
new file mode 100644
index 0000000000..78d35ce37c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -0,0 +1,83 @@
+
+test('rnfail001', normal, compile_fail, [''])
+test('rnfail002', normal, compile_fail, [''])
+test('rnfail003', normal, compile_fail, [''])
+test('rnfail004', normal, compile_fail, [''])
+test('rnfail007', normal, compile_fail, [''])
+test('rnfail008', normal, compile_fail, [''])
+test('rnfail009', normal, compile_fail, [''])
+test('rnfail010', normal, compile_fail, [''])
+test('rnfail011', normal, compile_fail, [''])
+test('rnfail012', normal, compile_fail, [''])
+test('rnfail013', normal, compile_fail, [''])
+
+test('rnfail015', normal, compile_fail, [''])
+test('rnfail016', normal, compile_fail, [''])
+test('rnfail017', normal, compile_fail, [''])
+test('rnfail018', normal, compile_fail, [''])
+test('rnfail019', normal, compile_fail, [''])
+test('rnfail020', normal, compile, ['']) # Succeeds now (Jan07)
+test('rnfail021', normal, compile_fail, [''])
+test('rnfail022', normal, compile_fail, [''])
+test('rnfail023', normal, compile_fail, [''])
+test('rnfail024', normal, compile_fail, [''])
+test('rnfail025', normal, compile_fail, [''])
+test('rnfail026', normal, compile_fail, [''])
+test('rnfail027', normal, compile_fail, [''])
+test('rnfail028', normal, compile_fail, [''])
+test('rnfail029', normal, compile_fail, [''])
+test('rnfail030', normal, compile_fail, [''])
+test('rnfail031', normal, compile_fail, [''])
+test('rnfail032', normal, compile_fail, [''])
+test('rnfail033', normal, compile_fail, [''])
+test('rnfail034', normal, compile_fail, [''])
+test('rnfail035', normal, compile_fail, [''])
+
+# Missing:
+# test('rnfail037', normal, compile_fail, [''])
+
+test('rnfail038', normal, compile_fail, [''])
+test('rnfail039', normal, compile_fail, [''])
+
+test('rnfail040',
+ extra_clean(['Rnfail040_A.hi', 'Rnfail040_A.o']),
+ multimod_compile_fail, ['rnfail040', '-v0'])
+test('rnfail041', normal, compile_fail, [''])
+test('rnfail042', normal, compile_fail, [''])
+
+test('rnfail043', skip_if_no_ghci, compile_fail, ['-v0'])
+test('rnfail044', normal, compile_fail, [''])
+test('rnfail045', normal, compile_fail, [''])
+test('rnfail046', normal, compile_fail, [''])
+test('rnfail047',
+ extra_clean(['RnFail047_A.hi-boot', 'RnFail047_A.o-boot']),
+ multimod_compile_fail,
+ ['rnfail047', '-v0'])
+test('rnfail048', normal, compile_fail, [''])
+test('rnfail049', normal, compile_fail, [''])
+test('rnfail050', normal, compile_fail, [''])
+test('rnfail051', normal, compile_fail, [''])
+test('rnfail052', normal, compile_fail, [''])
+test('rnfail053', normal, compile_fail, [''])
+test('rnfail054', normal, compile_fail, [''])
+test('rnfail055',
+ extra_clean(['RnFail055.hi-boot', 'RnFail055.o-boot',
+ 'RnFail055_aux.hi', 'RnFail055_aux.o']),
+ multimod_compile_fail,
+ ['RnFail055','-v0'])
+test('rnfail056', normal, compile_fail, [''])
+
+test('rn_dup', normal, compile_fail, [''])
+test('T2310', normal, compile_fail, [''])
+test('T2490', normal, compile_fail, [''])
+test('T2901', normal, compile_fail, [''])
+test('T2723', normal, compile, ['']) # Warnings only
+test('T2993', normal, compile_fail, [''])
+test('T3265', normal, compile_fail, [''])
+test('T3792', normal, compile_fail, [''])
+test('T4042', normal, compile_fail, [''])
+
+test('mc13', normal, compile_fail, [''])
+test('mc14', normal, compile_fail, [''])
+test('T5211', normal, compile, ['']) # Warnings only
+test('T1595a', normal, compile_fail, [''])
diff --git a/testsuite/tests/rename/should_fail/mc13.hs b/testsuite/tests/rename/should_fail/mc13.hs
new file mode 100644
index 0000000000..2686005f7f
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/mc13.hs
@@ -0,0 +1,14 @@
+-- Test for transform list comp which should work for monad comp aswell:
+--
+-- Test trying to use a function bound in the list comprehension as the transform function
+
+{-# OPTIONS_GHC -XRank2Types -XMonadComprehensions -XTransformListComp #-}
+
+module RnFail048 where
+
+functions :: [forall a. [a] -> [a]]
+functions = [take 4, take 5]
+
+output = [() | f <- functions, then f]
+
+
diff --git a/testsuite/tests/rename/should_fail/mc13.stderr b/testsuite/tests/rename/should_fail/mc13.stderr
new file mode 100644
index 0000000000..82f8dd5f18
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/mc13.stderr
@@ -0,0 +1,2 @@
+
+mc13.hs:12:37: Not in scope: `f'
diff --git a/testsuite/tests/rename/should_fail/mc14.hs b/testsuite/tests/rename/should_fail/mc14.hs
new file mode 100644
index 0000000000..e2cf74cbf5
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/mc14.hs
@@ -0,0 +1,16 @@
+-- Test for transform list comp which should work for monad comp aswell:
+--
+-- Test trying to use a function bound in the list comprehension as the group function
+
+{-# OPTIONS_GHC -XRank2Types -XMonadComprehensions -XTransformListComp #-}
+
+module RnFail049 where
+
+import Data.List(inits, tails)
+
+functions :: [forall a. [a] -> [[a]]]
+functions = [inits, tails]
+
+output = [() | f <- functions, then group using f]
+
+
diff --git a/testsuite/tests/rename/should_fail/mc14.stderr b/testsuite/tests/rename/should_fail/mc14.stderr
new file mode 100644
index 0000000000..1eadb9d4b7
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/mc14.stderr
@@ -0,0 +1,2 @@
+
+mc14.hs:14:49: Not in scope: `f'
diff --git a/testsuite/tests/rename/should_fail/rn_dup.hs b/testsuite/tests/rename/should_fail/rn_dup.hs
new file mode 100644
index 0000000000..927e15ff32
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rn_dup.hs
@@ -0,0 +1,19 @@
+
+
+-- Test for top-level duplicates
+
+module Dup where
+
+data T = MkT | MkT
+
+data S = MkT
+
+data P = MkP { rf :: Int, rf :: Int }
+data Q = MkQ { rf :: Int }
+
+class C a where
+ data CT a
+ f :: CT a -> a
+ data CT a
+ f :: CT a -> a
+
diff --git a/testsuite/tests/rename/should_fail/rn_dup.stderr b/testsuite/tests/rename/should_fail/rn_dup.stderr
new file mode 100644
index 0000000000..88e2f86413
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rn_dup.stderr
@@ -0,0 +1,22 @@
+
+rn_dup.hs:9:10:
+ Multiple declarations of `Dup.MkT'
+ Declared at: rn_dup.hs:7:10
+ rn_dup.hs:7:16
+ rn_dup.hs:9:10
+
+rn_dup.hs:12:16:
+ Multiple declarations of `Dup.rf'
+ Declared at: rn_dup.hs:11:16
+ rn_dup.hs:11:27
+ rn_dup.hs:12:16
+
+rn_dup.hs:17:8:
+ Multiple declarations of `Dup.CT'
+ Declared at: rn_dup.hs:15:8
+ rn_dup.hs:17:8
+
+rn_dup.hs:18:3:
+ Multiple declarations of `Dup.f'
+ Declared at: rn_dup.hs:16:3
+ rn_dup.hs:18:3
diff --git a/testsuite/tests/rename/should_fail/rnfail001.hs b/testsuite/tests/rename/should_fail/rnfail001.hs
new file mode 100644
index 0000000000..f6758a1b2b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail001.hs
@@ -0,0 +1,3 @@
+module ShouldFail where
+
+f x x = 2
diff --git a/testsuite/tests/rename/should_fail/rnfail001.stderr b/testsuite/tests/rename/should_fail/rnfail001.stderr
new file mode 100644
index 0000000000..5414f93f27
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail001.stderr
@@ -0,0 +1,6 @@
+
+rnfail001.hs:3:3:
+ Conflicting definitions for `x'
+ Bound at: rnfail001.hs:3:3
+ rnfail001.hs:3:5
+ In an equation for `f'
diff --git a/testsuite/tests/rename/should_fail/rnfail001.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail001.stderr-hugs
new file mode 100644
index 0000000000..9103ec5b64
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail001.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail001.hs":3 - Repeated variable "x" in pattern
diff --git a/testsuite/tests/rename/should_fail/rnfail002.hs b/testsuite/tests/rename/should_fail/rnfail002.hs
new file mode 100644
index 0000000000..ab387223fc
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail002.hs
@@ -0,0 +1,10 @@
+-- !!! rn001: super-simple set of bindings,
+-- !!! incl wildcard pattern-bindings and *duplicates*
+
+x = []
+y = []
+y = []
+_ = []
+_ = 1
+z = []
+_ = []
diff --git a/testsuite/tests/rename/should_fail/rnfail002.stderr b/testsuite/tests/rename/should_fail/rnfail002.stderr
new file mode 100644
index 0000000000..db236f3073
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail002.stderr
@@ -0,0 +1,5 @@
+
+rnfail002.hs:6:1:
+ Multiple declarations of `Main.y'
+ Declared at: rnfail002.hs:5:1
+ rnfail002.hs:6:1
diff --git a/testsuite/tests/rename/should_fail/rnfail002.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail002.stderr-hugs
new file mode 100644
index 0000000000..46f18320e9
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail002.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail002.hs":5 - "y" multiply defined
diff --git a/testsuite/tests/rename/should_fail/rnfail003.hs b/testsuite/tests/rename/should_fail/rnfail003.hs
new file mode 100644
index 0000000000..fb62bac074
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail003.hs
@@ -0,0 +1,4 @@
+-- !!! split definition of f (error)
+f [] = []
+g x = x
+f (x:xs) = []
diff --git a/testsuite/tests/rename/should_fail/rnfail003.stderr b/testsuite/tests/rename/should_fail/rnfail003.stderr
new file mode 100644
index 0000000000..0398a4d9c7
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail003.stderr
@@ -0,0 +1,5 @@
+
+rnfail003.hs:4:1:
+ Multiple declarations of `Main.f'
+ Declared at: rnfail003.hs:2:1
+ rnfail003.hs:4:1
diff --git a/testsuite/tests/rename/should_fail/rnfail003.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail003.stderr-hugs
new file mode 100644
index 0000000000..9ebafc363e
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail003.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail003.hs":2 - "f" multiply defined
diff --git a/testsuite/tests/rename/should_fail/rnfail004.hs b/testsuite/tests/rename/should_fail/rnfail004.hs
new file mode 100644
index 0000000000..90a97f894c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail004.hs
@@ -0,0 +1,8 @@
+-- !!! multiple definitions, but hidden in patterns
+module Foo where
+
+f x = x
+ where
+ a = []
+ (b,c,a) = ([],[],d)
+ [d,b,_] = ([],a,[])
diff --git a/testsuite/tests/rename/should_fail/rnfail004.stderr b/testsuite/tests/rename/should_fail/rnfail004.stderr
new file mode 100644
index 0000000000..edff58cf6f
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail004.stderr
@@ -0,0 +1,10 @@
+
+rnfail004.hs:6:5:
+ Conflicting definitions for `a'
+ Bound at: rnfail004.hs:6:5
+ rnfail004.hs:7:10
+
+rnfail004.hs:7:6:
+ Conflicting definitions for `b'
+ Bound at: rnfail004.hs:7:6
+ rnfail004.hs:8:8
diff --git a/testsuite/tests/rename/should_fail/rnfail004.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail004.stderr-hugs
new file mode 100644
index 0000000000..3ad3a13469
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail004.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail004.hs":7 - "b" multiply defined
diff --git a/testsuite/tests/rename/should_fail/rnfail005.stderr b/testsuite/tests/rename/should_fail/rnfail005.stderr
new file mode 100644
index 0000000000..9ad30e8755
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail005.stderr
@@ -0,0 +1,8 @@
+
+rnfail005.hs:4:
+ Conflicting definitions for: `v'
+ Defined at rnfail005.hs:20
+ Defined at rnfail005.hs:19
+
+
+Compilation had errors
diff --git a/testsuite/tests/rename/should_fail/rnfail007.hs b/testsuite/tests/rename/should_fail/rnfail007.hs
new file mode 100644
index 0000000000..272abcf9fb
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail007.hs
@@ -0,0 +1,5 @@
+-- !!! Main module with no definition of main
+
+module Main where
+
+f x = x
diff --git a/testsuite/tests/rename/should_fail/rnfail007.stderr b/testsuite/tests/rename/should_fail/rnfail007.stderr
new file mode 100644
index 0000000000..a00dc892d5
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail007.stderr
@@ -0,0 +1,3 @@
+
+rnfail007.hs:1:1:
+ The function `main' is not defined in module `Main'
diff --git a/testsuite/tests/rename/should_fail/rnfail008.hs b/testsuite/tests/rename/should_fail/rnfail008.hs
new file mode 100644
index 0000000000..196214a840
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail008.hs
@@ -0,0 +1,19 @@
+-- !!! Class and instance decl
+
+module Test where
+
+class K a where
+ op1 :: a -> a -> a
+ op2 :: Int -> a
+
+instance K Int where
+ op1 a b = a+b
+ op2 x = x
+
+instance K Bool where
+ op1 a b = a
+ -- Pick up the default decl for op2
+
+instance K [a] where
+ op3 a = a -- Oops! Isn't a class op of K
+
diff --git a/testsuite/tests/rename/should_fail/rnfail008.stderr b/testsuite/tests/rename/should_fail/rnfail008.stderr
new file mode 100644
index 0000000000..91818fc656
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail008.stderr
@@ -0,0 +1,2 @@
+
+rnfail008.hs:18:9: `op3' is not a (visible) method of class `K'
diff --git a/testsuite/tests/rename/should_fail/rnfail008.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail008.stderr-hugs
new file mode 100644
index 0000000000..cd6711a842
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail008.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail008.hs":18 - No member "op3" in class "K"
diff --git a/testsuite/tests/rename/should_fail/rnfail009.hs b/testsuite/tests/rename/should_fail/rnfail009.hs
new file mode 100644
index 0000000000..1557f48c7b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail009.hs
@@ -0,0 +1,5 @@
+module Foo where
+
+data F = A | B
+
+data G = A | C
diff --git a/testsuite/tests/rename/should_fail/rnfail009.stderr b/testsuite/tests/rename/should_fail/rnfail009.stderr
new file mode 100644
index 0000000000..9cddc115d6
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail009.stderr
@@ -0,0 +1,5 @@
+
+rnfail009.hs:5:10:
+ Multiple declarations of `Foo.A'
+ Declared at: rnfail009.hs:3:10
+ rnfail009.hs:5:10
diff --git a/testsuite/tests/rename/should_fail/rnfail009.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail009.stderr-hugs
new file mode 100644
index 0000000000..2775982760
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail009.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail009.hs":3 - Multiple declarations for data constructor "A"
diff --git a/testsuite/tests/rename/should_fail/rnfail010.hs b/testsuite/tests/rename/should_fail/rnfail010.hs
new file mode 100644
index 0000000000..d5e51ed4fd
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail010.hs
@@ -0,0 +1,6 @@
+
+f x = 2
+
+g x = 6
+
+f x = 3
diff --git a/testsuite/tests/rename/should_fail/rnfail010.stderr b/testsuite/tests/rename/should_fail/rnfail010.stderr
new file mode 100644
index 0000000000..0855b4b731
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail010.stderr
@@ -0,0 +1,5 @@
+
+rnfail010.hs:6:1:
+ Multiple declarations of `Main.f'
+ Declared at: rnfail010.hs:2:1
+ rnfail010.hs:6:1
diff --git a/testsuite/tests/rename/should_fail/rnfail010.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail010.stderr-hugs
new file mode 100644
index 0000000000..1a35934d4c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail010.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail010.hs":2 - "f" multiply defined
diff --git a/testsuite/tests/rename/should_fail/rnfail011.hs b/testsuite/tests/rename/should_fail/rnfail011.hs
new file mode 100644
index 0000000000..b342618e15
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail011.hs
@@ -0,0 +1,6 @@
+
+type A = Int
+
+type B = Bool
+
+type A = [Bool]
diff --git a/testsuite/tests/rename/should_fail/rnfail011.stderr b/testsuite/tests/rename/should_fail/rnfail011.stderr
new file mode 100644
index 0000000000..d76a63a410
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail011.stderr
@@ -0,0 +1,5 @@
+
+rnfail011.hs:6:6:
+ Multiple declarations of `Main.A'
+ Declared at: rnfail011.hs:2:6
+ rnfail011.hs:6:6
diff --git a/testsuite/tests/rename/should_fail/rnfail011.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail011.stderr-hugs
new file mode 100644
index 0000000000..3ed800c263
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail011.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail011.hs":6 - Multiple declarations of type constructor "A"
diff --git a/testsuite/tests/rename/should_fail/rnfail012.hs b/testsuite/tests/rename/should_fail/rnfail012.hs
new file mode 100644
index 0000000000..725b0d1632
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail012.hs
@@ -0,0 +1,9 @@
+
+class A a where
+ op1 :: a
+
+class B a where
+ op2 :: b -> b
+
+class A a where
+ op3 :: a
diff --git a/testsuite/tests/rename/should_fail/rnfail012.stderr b/testsuite/tests/rename/should_fail/rnfail012.stderr
new file mode 100644
index 0000000000..93bfec9346
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail012.stderr
@@ -0,0 +1,5 @@
+
+rnfail012.hs:8:7:
+ Multiple declarations of `Main.A'
+ Declared at: rnfail012.hs:2:7
+ rnfail012.hs:8:7
diff --git a/testsuite/tests/rename/should_fail/rnfail012.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail012.stderr-hugs
new file mode 100644
index 0000000000..5908cb6f67
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail012.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail012.hs":8 - Multiple declarations of class "A"
diff --git a/testsuite/tests/rename/should_fail/rnfail013.hs b/testsuite/tests/rename/should_fail/rnfail013.hs
new file mode 100644
index 0000000000..4d30ded185
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail013.hs
@@ -0,0 +1,9 @@
+-- !!! Conflicting constructors from two data type decls
+
+module Foo where
+
+data T1 = MkT Int
+
+data T2 = MkT Bool
+
+f (MkT x) = x
diff --git a/testsuite/tests/rename/should_fail/rnfail013.stderr b/testsuite/tests/rename/should_fail/rnfail013.stderr
new file mode 100644
index 0000000000..761f2f0a0e
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail013.stderr
@@ -0,0 +1,5 @@
+
+rnfail013.hs:7:11:
+ Multiple declarations of `Foo.MkT'
+ Declared at: rnfail013.hs:5:11
+ rnfail013.hs:7:11
diff --git a/testsuite/tests/rename/should_fail/rnfail013.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail013.stderr-hugs
new file mode 100644
index 0000000000..3342f19b3c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail013.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail013.hs":5 - Multiple declarations for data constructor "MkT"
diff --git a/testsuite/tests/rename/should_fail/rnfail015.hs b/testsuite/tests/rename/should_fail/rnfail015.hs
new file mode 100644
index 0000000000..20f9934f4b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail015.hs
@@ -0,0 +1,20 @@
+module ShouldFail where
+
+-- !!! duplicate constructors in datatype
+-- (bug report from Alex Ferguson, c. 2.06)
+
+data Token
+ = TokNewline
+ | TokLiteral
+ | TokCount
+ | TokCheck
+ | TokIs
+ | TokDeref
+ | TokFind
+ | TokLiteral -- Duplicated!
+ | TokThe
+
+ deriving Show
+
+main = print TokCount
+
diff --git a/testsuite/tests/rename/should_fail/rnfail015.stderr b/testsuite/tests/rename/should_fail/rnfail015.stderr
new file mode 100644
index 0000000000..bf1e382f6c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail015.stderr
@@ -0,0 +1,5 @@
+
+rnfail015.hs:14:9:
+ Multiple declarations of `ShouldFail.TokLiteral'
+ Declared at: rnfail015.hs:8:9
+ rnfail015.hs:14:9
diff --git a/testsuite/tests/rename/should_fail/rnfail015.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail015.stderr-hugs
new file mode 100644
index 0000000000..a91ae7cb04
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail015.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail015.hs":7 - Multiple declarations for data constructor "TokLiteral"
diff --git a/testsuite/tests/rename/should_fail/rnfail016.hs b/testsuite/tests/rename/should_fail/rnfail016.hs
new file mode 100644
index 0000000000..1fa71c583a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail016.hs
@@ -0,0 +1,8 @@
+module ShouldFail where
+
+-- !!! Pattern syntax in expressions
+
+f x = x @ x
+g x = ~ x
+h x = _
+
diff --git a/testsuite/tests/rename/should_fail/rnfail016.stderr b/testsuite/tests/rename/should_fail/rnfail016.stderr
new file mode 100644
index 0000000000..ed9debda77
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail016.stderr
@@ -0,0 +1,6 @@
+
+rnfail016.hs:5:7: Pattern syntax in expression context: x@x
+
+rnfail016.hs:6:7: Pattern syntax in expression context: ~x
+
+rnfail016.hs:7:7: Pattern syntax in expression context: _
diff --git a/testsuite/tests/rename/should_fail/rnfail016.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail016.stderr-hugs
new file mode 100644
index 0000000000..76c2827039
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail016.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail016.hs":5 - Illegal `@' in expression
diff --git a/testsuite/tests/rename/should_fail/rnfail017.hs b/testsuite/tests/rename/should_fail/rnfail017.hs
new file mode 100644
index 0000000000..327a9d6abd
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail017.hs
@@ -0,0 +1,17 @@
+module ShouldFail where
+
+-- !!! Precedence of unary negation
+
+f1 x y = x + -y -- Fails
+f2 x y = x * -y -- Fails
+
+
+f3 x y = -x + y -- OK: means (-x) + y
+ -- since - is left associative
+
+f4 x y = - x*y -- OK: means -(x*y)
+ -- since - binds less tightly than *
+
+f5 x y = x >= -y -- OK means x >= (-y)
+
+
diff --git a/testsuite/tests/rename/should_fail/rnfail017.stderr b/testsuite/tests/rename/should_fail/rnfail017.stderr
new file mode 100644
index 0000000000..f04b1d0990
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail017.stderr
@@ -0,0 +1,8 @@
+
+rnfail017.hs:5:10:
+ Precedence parsing error
+ cannot mix `+' [infixl 6] and prefix `-' [infixl 6] in the same infix expression
+
+rnfail017.hs:6:10:
+ Precedence parsing error
+ cannot mix `*' [infixl 7] and prefix `-' [infixl 6] in the same infix expression
diff --git a/testsuite/tests/rename/should_fail/rnfail018.hs b/testsuite/tests/rename/should_fail/rnfail018.hs
new file mode 100644
index 0000000000..1b3ad82762
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail018.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE MultiParamTypeClasses, ExplicitForAll #-}
+
+module ShouldFail where
+
+-- !!! For-all with parens
+
+-- This one crashed ghc-4.04proto; the parens after the for-all fooled it
+
+class Monad m => StateMonad s m where
+ getState :: m s
+
+setState0 :: forall b. (StateMonad (a,b) m => m a)
+setState0 = getState >>= \ (l,_r) -> return l
+
+
diff --git a/testsuite/tests/rename/should_fail/rnfail018.stderr b/testsuite/tests/rename/should_fail/rnfail018.stderr
new file mode 100644
index 0000000000..3bae3eb527
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail018.stderr
@@ -0,0 +1,8 @@
+
+rnfail018.hs:12:37: Not in scope: type variable `a'
+
+rnfail018.hs:12:42: Not in scope: type variable `m'
+
+rnfail018.hs:12:47: Not in scope: type variable `m'
+
+rnfail018.hs:12:49: Not in scope: type variable `a'
diff --git a/testsuite/tests/rename/should_fail/rnfail019.hs b/testsuite/tests/rename/should_fail/rnfail019.hs
new file mode 100644
index 0000000000..ec97efe1cf
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail019.hs
@@ -0,0 +1,7 @@
+module ShouldFail where
+
+-- !!! Section with with a bad precedence
+
+f x y = (x:y:)
+
+-- GHC 4.04 (as released) let this by, but it's a precedence error.
diff --git a/testsuite/tests/rename/should_fail/rnfail019.stderr b/testsuite/tests/rename/should_fail/rnfail019.stderr
new file mode 100644
index 0000000000..f990e2d2cd
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail019.stderr
@@ -0,0 +1,6 @@
+
+rnfail019.hs:5:9:
+ The operator `:' [infixr 5] of a section
+ must have lower precedence than that of the operand,
+ namely `:' [infixr 5]
+ in the section: `x : y :'
diff --git a/testsuite/tests/rename/should_fail/rnfail019.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail019.stderr-hugs
new file mode 100644
index 0000000000..1e09963ae1
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail019.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail019.hs":5 - Syntax error in expression (unexpected `)')
diff --git a/testsuite/tests/rename/should_fail/rnfail020.hs b/testsuite/tests/rename/should_fail/rnfail020.hs
new file mode 100644
index 0000000000..decd2e80ad
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail020.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
+-- !!! Error messages with scoped type variables
+
+module Foo where
+
+data Set a = Set a
+
+unionSetB :: Eq a => Set a -> Set a -> Set a
+unionSetB (s1 :: Set a) s2 = unionSets s1 s2
+ where
+ unionSets :: Eq a => Set a -> Set a -> Set a
+ unionSets a b = a
+
+
+{- In GHC 4.04 this gave the terrible message:
+
+ None of the type variable(s) in the constraint `Eq a'
+ appears in the type `Set a -> Set a -> Set a'
+ In the type signature for `unionSets'
+-}
diff --git a/testsuite/tests/rename/should_fail/rnfail020.stderr b/testsuite/tests/rename/should_fail/rnfail020.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail020.stderr
diff --git a/testsuite/tests/rename/should_fail/rnfail021.hs b/testsuite/tests/rename/should_fail/rnfail021.hs
new file mode 100644
index 0000000000..a8062967e1
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail021.hs
@@ -0,0 +1,6 @@
+-- !!! Qualified names in binding positions are rejected
+
+module Foo where
+
+(Baz.f, x) = True
+
diff --git a/testsuite/tests/rename/should_fail/rnfail021.stderr b/testsuite/tests/rename/should_fail/rnfail021.stderr
new file mode 100644
index 0000000000..1cf26eca36
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail021.stderr
@@ -0,0 +1,2 @@
+
+rnfail021.hs:5:2: Qualified name in binding position: Baz.f
diff --git a/testsuite/tests/rename/should_fail/rnfail021.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail021.stderr-hugs
new file mode 100644
index 0000000000..cb4c6c422a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail021.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail021.hs":5 - Syntax error in declaration (unexpected symbol "Baz.f")
diff --git a/testsuite/tests/rename/should_fail/rnfail022.hs b/testsuite/tests/rename/should_fail/rnfail022.hs
new file mode 100644
index 0000000000..05c842e770
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail022.hs
@@ -0,0 +1,9 @@
+-- !!! Check that 'qualified' doesn't bring the unqual'ed name into scope.
+module ShouldFail where
+
+import qualified Data.List as L ( intersperse )
+
+x = L.intersperse
+
+y = intersperse
+
diff --git a/testsuite/tests/rename/should_fail/rnfail022.stderr b/testsuite/tests/rename/should_fail/rnfail022.stderr
new file mode 100644
index 0000000000..011d6790d7
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail022.stderr
@@ -0,0 +1,4 @@
+
+rnfail022.hs:8:5:
+ Not in scope: `intersperse'
+ Perhaps you meant `L.intersperse' (imported from Data.List)
diff --git a/testsuite/tests/rename/should_fail/rnfail022.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail022.stderr-hugs
new file mode 100644
index 0000000000..b58124c912
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail022.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail022.hs":8 - Undefined variable "intersperse"
diff --git a/testsuite/tests/rename/should_fail/rnfail023.hs b/testsuite/tests/rename/should_fail/rnfail023.hs
new file mode 100644
index 0000000000..bf7c4a2f20
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail023.hs
@@ -0,0 +1,15 @@
+-- !!! Check that type signatures and pragmas that
+-- !!! don't have a "parent" are correctly reported
+
+module ShouldFail where
+
+-- Top level test
+f :: Int -> Int
+{-# INLINE f #-}
+
+-- Nested test
+h :: Int -> Int -- This one is ok
+h x = x
+ where
+ g :: Int -> Int -- Bogus
+
diff --git a/testsuite/tests/rename/should_fail/rnfail023.stderr b/testsuite/tests/rename/should_fail/rnfail023.stderr
new file mode 100644
index 0000000000..ec9d81ab76
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail023.stderr
@@ -0,0 +1,9 @@
+
+rnfail023.hs:7:1:
+ The type signature for `f' lacks an accompanying binding
+
+rnfail023.hs:8:12:
+ The INLINE pragma for `f' lacks an accompanying binding
+
+rnfail023.hs:14:7:
+ The type signature for `g' lacks an accompanying binding
diff --git a/testsuite/tests/rename/should_fail/rnfail023.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail023.stderr-hugs
new file mode 100644
index 0000000000..1f8191015d
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail023.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail023.hs":7 - Missing binding for variable "f" in type signature
diff --git a/testsuite/tests/rename/should_fail/rnfail024.hs b/testsuite/tests/rename/should_fail/rnfail024.hs
new file mode 100644
index 0000000000..4663319ce9
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail024.hs
@@ -0,0 +1,6 @@
+module ShouldFail where
+
+sig_without_a_defn :: a -> b
+
+f :: a -> b
+f = sig_without_a_defn
diff --git a/testsuite/tests/rename/should_fail/rnfail024.stderr b/testsuite/tests/rename/should_fail/rnfail024.stderr
new file mode 100644
index 0000000000..19b9f33921
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail024.stderr
@@ -0,0 +1,6 @@
+
+rnfail024.hs:3:1:
+ The type signature for `sig_without_a_defn'
+ lacks an accompanying binding
+
+rnfail024.hs:6:5: Not in scope: `sig_without_a_defn'
diff --git a/testsuite/tests/rename/should_fail/rnfail024.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail024.stderr-hugs
new file mode 100644
index 0000000000..1b89d6825a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail024.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail024.hs":3 - Missing binding for variable "sig_without_a_defn" in type signature
diff --git a/testsuite/tests/rename/should_fail/rnfail025.hs b/testsuite/tests/rename/should_fail/rnfail025.hs
new file mode 100644
index 0000000000..42cf3d76f5
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail025.hs
@@ -0,0 +1,6 @@
+module ShouldFail where
+
+sig_without_a_defn :: a -> b
+
+-- We don't even refer to the variable. This compiled without error
+-- in ghc-4.08.
diff --git a/testsuite/tests/rename/should_fail/rnfail025.stderr b/testsuite/tests/rename/should_fail/rnfail025.stderr
new file mode 100644
index 0000000000..4c2e25a07c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail025.stderr
@@ -0,0 +1,4 @@
+
+rnfail025.hs:3:1:
+ The type signature for `sig_without_a_defn'
+ lacks an accompanying binding
diff --git a/testsuite/tests/rename/should_fail/rnfail025.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail025.stderr-hugs
new file mode 100644
index 0000000000..7a2bcb5945
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail025.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail025.hs":3 - Missing binding for variable "sig_without_a_defn" in type signature
diff --git a/testsuite/tests/rename/should_fail/rnfail026.hs b/testsuite/tests/rename/should_fail/rnfail026.hs
new file mode 100644
index 0000000000..3256876e68
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail026.hs
@@ -0,0 +1,19 @@
+{-# LANGUAGE Rank2Types, FlexibleInstances #-}
+
+-- This one made ghc-4.08 crash
+-- rename/RnEnv.lhs:239: Non-exhaustive patterns in function get_tycon_key
+-- The type in the Monad instance is utterly bogus, of course
+
+module ShouldCompile ( Set ) where
+
+
+data Set a = Set [a]
+ deriving (Eq, Ord, Read, Show)
+
+instance Functor Set where
+ f `fmap` (Set xs) = Set $ f `fmap` xs
+
+instance Monad (forall a. Eq a => Set a) where
+ return x = Set [x]
+
+instance Eq (forall a. [a]) where
diff --git a/testsuite/tests/rename/should_fail/rnfail026.stderr b/testsuite/tests/rename/should_fail/rnfail026.stderr
new file mode 100644
index 0000000000..6aa899b36d
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail026.stderr
@@ -0,0 +1,10 @@
+
+rnfail026.hs:16:17:
+ Kind mis-match
+ The first argument of `Monad' should have kind `* -> *',
+ but `Set a' has kind `*'
+ In the instance declaration for `Monad (forall a. Eq a => Set a)'
+
+rnfail026.hs:19:10:
+ Illegal polymorphic or qualified type: forall a. [a]
+ In the instance declaration for `Eq (forall a. [a])'
diff --git a/testsuite/tests/rename/should_fail/rnfail026.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail026.stderr-hugs
new file mode 100644
index 0000000000..245ba83337
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail026.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail026.hs":16 - Syntax error in type expression (unexpected keyword "forall")
diff --git a/testsuite/tests/rename/should_fail/rnfail027.hs b/testsuite/tests/rename/should_fail/rnfail027.hs
new file mode 100644
index 0000000000..fc6d8c87d4
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail027.hs
@@ -0,0 +1,5 @@
+-- !!! infix declarations for unknown identifiers aren't allowed
+
+module ShouldFail where
+
+infixl 9 `wibble`
diff --git a/testsuite/tests/rename/should_fail/rnfail027.stderr b/testsuite/tests/rename/should_fail/rnfail027.stderr
new file mode 100644
index 0000000000..31214a1a42
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail027.stderr
@@ -0,0 +1,3 @@
+
+rnfail027.hs:5:10:
+ The fixity signature for `wibble' lacks an accompanying binding
diff --git a/testsuite/tests/rename/should_fail/rnfail027.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail027.stderr-hugs
new file mode 100644
index 0000000000..df1f912339
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail027.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail027.hs":5 - Cannot find binding for operator "wibble" in fixity declaration
diff --git a/testsuite/tests/rename/should_fail/rnfail028.hs b/testsuite/tests/rename/should_fail/rnfail028.hs
new file mode 100644
index 0000000000..13e2237aba
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail028.hs
@@ -0,0 +1,2 @@
+-- !!! illegal to export a module we haven't imported.
+module ShouldFail ( module List ) where
diff --git a/testsuite/tests/rename/should_fail/rnfail028.stderr b/testsuite/tests/rename/should_fail/rnfail028.stderr
new file mode 100644
index 0000000000..f09cda3f33
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail028.stderr
@@ -0,0 +1,2 @@
+
+rnfail028.hs:2:21: The export item `module List' is not imported
diff --git a/testsuite/tests/rename/should_fail/rnfail028.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail028.stderr-hugs
new file mode 100644
index 0000000000..d1aa3d5903
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail028.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail028.hs" - Unknown module "List" exported from module "ShouldFail"
diff --git a/testsuite/tests/rename/should_fail/rnfail029.hs b/testsuite/tests/rename/should_fail/rnfail029.hs
new file mode 100644
index 0000000000..8d8608e41f
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail029.hs
@@ -0,0 +1,4 @@
+-- !!! conflicting exports for a function name
+module ShouldFail ( Data.List.map, module ShouldFail ) where
+import qualified Data.List
+map = undefined
diff --git a/testsuite/tests/rename/should_fail/rnfail029.stderr b/testsuite/tests/rename/should_fail/rnfail029.stderr
new file mode 100644
index 0000000000..e22f4c33ae
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail029.stderr
@@ -0,0 +1,5 @@
+
+rnfail029.hs:2:36:
+ Conflicting exports for `map':
+ `Data.List.map' exports `Data.List.map' imported from Data.List at rnfail029.hs:3:1-26
+ `module ShouldFail' exports `ShouldFail.map' defined at rnfail029.hs:4:1
diff --git a/testsuite/tests/rename/should_fail/rnfail029.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail029.stderr-hugs
new file mode 100644
index 0000000000..a2f0265916
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail029.stderr-hugs
@@ -0,0 +1,2 @@
+ERROR "rnfail029.hs" - Conflicting exports of entity "map"
+*** Could refer to Hugs.Prelude.map or ShouldFail.map
diff --git a/testsuite/tests/rename/should_fail/rnfail030.hs b/testsuite/tests/rename/should_fail/rnfail030.hs
new file mode 100644
index 0000000000..23c54c8feb
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail030.hs
@@ -0,0 +1,3 @@
+-- !!! check that unqualified imports don't bring qualified names into scope
+module ShouldFail ( Data.List.map ) where
+import Data.List ()
diff --git a/testsuite/tests/rename/should_fail/rnfail030.stderr b/testsuite/tests/rename/should_fail/rnfail030.stderr
new file mode 100644
index 0000000000..749206a814
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail030.stderr
@@ -0,0 +1,2 @@
+
+rnfail030.hs:2:21: Not in scope: `Data.List.map'
diff --git a/testsuite/tests/rename/should_fail/rnfail030.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail030.stderr-hugs
new file mode 100644
index 0000000000..eb846ddfac
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail030.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail030.hs" - Unknown entity "List.map" exported from module "ShouldFail"
diff --git a/testsuite/tests/rename/should_fail/rnfail031.hs b/testsuite/tests/rename/should_fail/rnfail031.hs
new file mode 100644
index 0000000000..ce86cf935a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail031.hs
@@ -0,0 +1,3 @@
+-- !!! check that qualified imports can be restricted to certain names
+module ShouldFail ( Data.List.map ) where
+import qualified Data.List ( foldr )
diff --git a/testsuite/tests/rename/should_fail/rnfail031.stderr b/testsuite/tests/rename/should_fail/rnfail031.stderr
new file mode 100644
index 0000000000..ad04461dc3
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail031.stderr
@@ -0,0 +1,2 @@
+
+rnfail031.hs:2:21: Not in scope: `Data.List.map'
diff --git a/testsuite/tests/rename/should_fail/rnfail031.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail031.stderr-hugs
new file mode 100644
index 0000000000..2036937995
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail031.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail031.hs" - Unknown entity "List.map" exported from module "ShouldFail"
diff --git a/testsuite/tests/rename/should_fail/rnfail032.hs b/testsuite/tests/rename/should_fail/rnfail032.hs
new file mode 100644
index 0000000000..2970030ab0
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail032.hs
@@ -0,0 +1,3 @@
+-- !!! check that hiding works with qualified imports
+module ShouldFail ( Data.List.map ) where
+import qualified Data.List hiding ( map )
diff --git a/testsuite/tests/rename/should_fail/rnfail032.stderr b/testsuite/tests/rename/should_fail/rnfail032.stderr
new file mode 100644
index 0000000000..ea80202dd0
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail032.stderr
@@ -0,0 +1,7 @@
+
+rnfail032.hs:2:21:
+ Not in scope: `Data.List.map'
+ Perhaps you meant one of these:
+ `Data.List.zip' (imported from Data.List),
+ `Data.List.sum' (imported from Data.List),
+ `Data.List.all' (imported from Data.List)
diff --git a/testsuite/tests/rename/should_fail/rnfail032.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail032.stderr-hugs
new file mode 100644
index 0000000000..fef6e8e210
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail032.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail032.hs" - Unknown entity "List.map" exported from module "ShouldFail"
diff --git a/testsuite/tests/rename/should_fail/rnfail033.hs b/testsuite/tests/rename/should_fail/rnfail033.hs
new file mode 100644
index 0000000000..7d8b4c4fdc
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail033.hs
@@ -0,0 +1,3 @@
+-- !!! check that hiding on an unqualified import also hides the qualified name
+module ShouldFail ( Data.List.map ) where
+import Data.List hiding ( map )
diff --git a/testsuite/tests/rename/should_fail/rnfail033.stderr b/testsuite/tests/rename/should_fail/rnfail033.stderr
new file mode 100644
index 0000000000..c9abd0f87a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail033.stderr
@@ -0,0 +1,7 @@
+
+rnfail033.hs:2:21:
+ Not in scope: `Data.List.map'
+ Perhaps you meant one of these:
+ `Data.List.zip' (imported from Data.List),
+ `Data.List.sum' (imported from Data.List),
+ `Data.List.all' (imported from Data.List)
diff --git a/testsuite/tests/rename/should_fail/rnfail033.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail033.stderr-hugs
new file mode 100644
index 0000000000..d651e56ebe
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail033.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail033.hs" - Unknown entity "List.map" exported from module "ShouldFail"
diff --git a/testsuite/tests/rename/should_fail/rnfail034.hs b/testsuite/tests/rename/should_fail/rnfail034.hs
new file mode 100644
index 0000000000..25d9189472
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail034.hs
@@ -0,0 +1,4 @@
+-- !!! qualified names aren't allowed in local binds either
+-- (Haskell 98 (revised) section 5.5.1)
+module M where
+g x = let M.y = x + 1 in M.y
diff --git a/testsuite/tests/rename/should_fail/rnfail034.stderr b/testsuite/tests/rename/should_fail/rnfail034.stderr
new file mode 100644
index 0000000000..2ec0a3b8e5
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail034.stderr
@@ -0,0 +1,6 @@
+
+rnfail034.hs:4:11: Qualified name in binding position: M.y
+
+rnfail034.hs:4:26:
+ Not in scope: `M.y'
+ Perhaps you meant `M.g' (line 4)
diff --git a/testsuite/tests/rename/should_fail/rnfail034.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail034.stderr-hugs
new file mode 100644
index 0000000000..e1e0a9a566
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail034.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail034.hs":4 - Syntax error in expression (unexpected symbol "M.y")
diff --git a/testsuite/tests/rename/should_fail/rnfail035.hs b/testsuite/tests/rename/should_fail/rnfail035.hs
new file mode 100644
index 0000000000..4f57c06374
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail035.hs
@@ -0,0 +1,3 @@
+-- !!! can't name a constructor in an export list
+module ShouldFail ( C ) where
+data T = C
diff --git a/testsuite/tests/rename/should_fail/rnfail035.stderr b/testsuite/tests/rename/should_fail/rnfail035.stderr
new file mode 100644
index 0000000000..83eb2d85e3
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail035.stderr
@@ -0,0 +1,2 @@
+
+rnfail035.hs:2:21: Not in scope: type constructor or class `C'
diff --git a/testsuite/tests/rename/should_fail/rnfail035.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail035.stderr-hugs
new file mode 100644
index 0000000000..105e56f36c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail035.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail035.hs" - Illegal export of a lone data constructor "C"
diff --git a/testsuite/tests/rename/should_fail/rnfail038.hs b/testsuite/tests/rename/should_fail/rnfail038.hs
new file mode 100644
index 0000000000..b96000a873
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail038.hs
@@ -0,0 +1,4 @@
+-- !!! It is now illegal to import a module hiding
+-- !!! an entity that it doesn't export
+module ShouldCompile where
+import Data.List hiding ( wibble )
diff --git a/testsuite/tests/rename/should_fail/rnfail038.stderr b/testsuite/tests/rename/should_fail/rnfail038.stderr
new file mode 100644
index 0000000000..71c31d6d1b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail038.stderr
@@ -0,0 +1,2 @@
+
+rnfail038.hs:4:27: Module `Data.List' does not export `wibble'
diff --git a/testsuite/tests/rename/should_fail/rnfail038.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail038.stderr-hugs
new file mode 100644
index 0000000000..ee3487e0d4
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail038.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail038.hs" - Unknown entity "wibble" hidden from module "List"
diff --git a/testsuite/tests/rename/should_fail/rnfail039.hs b/testsuite/tests/rename/should_fail/rnfail039.hs
new file mode 100644
index 0000000000..428d8d9716
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail039.hs
@@ -0,0 +1,12 @@
+-- !!! Checking that qualified method names are ILLEGAL
+-- in the binding position instance body.
+module ShouldFail where
+
+import Prelude hiding (Eq, (==))
+import Prelude as P (Eq,(==))
+
+data Foo = Foo Int Integer
+
+instance P.Eq Foo where
+ (Foo a1 b1) P.== (Foo a2 b2) = a1 P.== a2 && b1 P.== b2
+
diff --git a/testsuite/tests/rename/should_fail/rnfail039.stderr b/testsuite/tests/rename/should_fail/rnfail039.stderr
new file mode 100644
index 0000000000..6283dccd33
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail039.stderr
@@ -0,0 +1,2 @@
+
+rnfail039.hs:11:15: Qualified name in binding position: P.==
diff --git a/testsuite/tests/rename/should_fail/rnfail039.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail039.stderr-hugs
new file mode 100644
index 0000000000..43c760998e
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail039.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail039.hs":11 - Syntax error in declaration (unexpected symbol "P.==")
diff --git a/testsuite/tests/rename/should_fail/rnfail040.hs b/testsuite/tests/rename/should_fail/rnfail040.hs
new file mode 100644
index 0000000000..5ba4d41bec
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail040.hs
@@ -0,0 +1,11 @@
+-- This one should fail, because it exports
+-- both Data.List:nub and Rnfail040_A:nub
+--
+-- Data.List:nub is in scope as M.nub and nub
+-- Rnfail040_A:nub is in scope as T.nub, M.nub, and nub
+
+module M1 (module M) where
+
+ import qualified Rnfail040_A as M -- M.nub
+ import Data.List as M -- M.nub nub
+ import Rnfail040_A as T -- T.nub nub
diff --git a/testsuite/tests/rename/should_fail/rnfail040.stderr b/testsuite/tests/rename/should_fail/rnfail040.stderr
new file mode 100644
index 0000000000..25e3c1153f
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail040.stderr
@@ -0,0 +1,6 @@
+
+rnfail040.hs:7:12:
+ Conflicting exports for `nub':
+ `module M' exports `M.nub' imported from Data.List at rnfail040.hs:10:2-22
+ `module M' exports `T.nub' imported from Rnfail040_A at rnfail040.hs:11:2-24
+ (defined at Rnfail040_A.hs:2:3)
diff --git a/testsuite/tests/rename/should_fail/rnfail040.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail040.stderr-hugs
new file mode 100644
index 0000000000..913c1b455c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail040.stderr-hugs
@@ -0,0 +1,2 @@
+ERROR "rnfail040.hs" - Conflicting exports of entity "nub"
+*** Could refer to Data.List.nub or Rnfail040_A.nub
diff --git a/testsuite/tests/rename/should_fail/rnfail041.hs b/testsuite/tests/rename/should_fail/rnfail041.hs
new file mode 100644
index 0000000000..57f79705b5
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail041.hs
@@ -0,0 +1,7 @@
+f = 3
+g = 3
+
+h :: Int
+j :: Int
+
+
diff --git a/testsuite/tests/rename/should_fail/rnfail041.stderr b/testsuite/tests/rename/should_fail/rnfail041.stderr
new file mode 100644
index 0000000000..0c5c60d4d2
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail041.stderr
@@ -0,0 +1,6 @@
+
+rnfail041.hs:4:1:
+ The type signature for `h' lacks an accompanying binding
+
+rnfail041.hs:5:1:
+ The type signature for `j' lacks an accompanying binding
diff --git a/testsuite/tests/rename/should_fail/rnfail041.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail041.stderr-hugs
new file mode 100644
index 0000000000..2b8745ec9b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail041.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail041.hs":4 - Missing binding for variable "h" in type signature
diff --git a/testsuite/tests/rename/should_fail/rnfail042.hs b/testsuite/tests/rename/should_fail/rnfail042.hs
new file mode 100644
index 0000000000..16c01f3450
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail042.hs
@@ -0,0 +1,9 @@
+-- Uses of built-in syntax should provoke a decent error message
+
+module ShouldFail where
+
+data T0 = ()
+data T3= (,,,)
+data Nil = []
+data List = Int : Bool
+
diff --git a/testsuite/tests/rename/should_fail/rnfail042.stderr b/testsuite/tests/rename/should_fail/rnfail042.stderr
new file mode 100644
index 0000000000..9e030d7bf8
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail042.stderr
@@ -0,0 +1,8 @@
+
+rnfail042.hs:5:11: Illegal binding of built-in syntax: ()
+
+rnfail042.hs:6:10: Illegal binding of built-in syntax: (,,,)
+
+rnfail042.hs:7:12: Illegal binding of built-in syntax: []
+
+rnfail042.hs:8:17: Illegal binding of built-in syntax: :
diff --git a/testsuite/tests/rename/should_fail/rnfail042.stderr-hugs b/testsuite/tests/rename/should_fail/rnfail042.stderr-hugs
new file mode 100644
index 0000000000..66c517d13c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail042.stderr-hugs
@@ -0,0 +1 @@
+ERROR "rnfail042.hs":6 - Syntax error in data type declaration (unexpected `;', possibly due to bad layout)
diff --git a/testsuite/tests/rename/should_fail/rnfail043.hs b/testsuite/tests/rename/should_fail/rnfail043.hs
new file mode 100644
index 0000000000..492cebb516
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail043.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+-- Duplicate bindings introduced one at a time with TH
+module ShouldFail where
+
+f x = x
+
+$([d| h x = x |])
+
+f x = x
diff --git a/testsuite/tests/rename/should_fail/rnfail043.stderr b/testsuite/tests/rename/should_fail/rnfail043.stderr
new file mode 100644
index 0000000000..428c1944dc
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail043.stderr
@@ -0,0 +1,5 @@
+
+rnfail043.hs:10:1:
+ Multiple declarations of `f'
+ Declared at: rnfail043.hs:6:1
+ rnfail043.hs:10:1
diff --git a/testsuite/tests/rename/should_fail/rnfail044.hs b/testsuite/tests/rename/should_fail/rnfail044.hs
new file mode 100644
index 0000000000..ed72b9abae
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail044.hs
@@ -0,0 +1,8 @@
+-- Renamer test
+-- The ambiguity is between the Prelude import and the defn
+-- of splitAt. The import of Data.List has nothing to do with it.
+
+module A ( splitAt ) where
+
+ import qualified Data.List
+ splitAt = undefined
diff --git a/testsuite/tests/rename/should_fail/rnfail044.stderr b/testsuite/tests/rename/should_fail/rnfail044.stderr
new file mode 100644
index 0000000000..2b27ad4fea
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail044.stderr
@@ -0,0 +1,5 @@
+
+rnfail044.hs:5:12:
+ Ambiguous occurrence `splitAt'
+ It could refer to either `A.splitAt', defined at rnfail044.hs:8:3
+ or `Data.List.splitAt', imported from Prelude
diff --git a/testsuite/tests/rename/should_fail/rnfail045.hs b/testsuite/tests/rename/should_fail/rnfail045.hs
new file mode 100644
index 0000000000..641bec0a6a
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail045.hs
@@ -0,0 +1,9 @@
+-- These crashed GHC 6.4.2
+
+module ShouldFail where
+
+x `op1` y = True
+op1 x = False
+
+op2 x = False
+x `op2` y = True
diff --git a/testsuite/tests/rename/should_fail/rnfail045.stderr b/testsuite/tests/rename/should_fail/rnfail045.stderr
new file mode 100644
index 0000000000..d8c80008c0
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail045.stderr
@@ -0,0 +1,10 @@
+
+rnfail045.hs:5:1:
+ Equations for `op1' have different numbers of arguments
+ rnfail045.hs:5:1-16
+ rnfail045.hs:6:1-13
+
+rnfail045.hs:8:1:
+ Equations for `op2' have different numbers of arguments
+ rnfail045.hs:8:1-13
+ rnfail045.hs:9:1-16
diff --git a/testsuite/tests/rename/should_fail/rnfail046.hs b/testsuite/tests/rename/should_fail/rnfail046.hs
new file mode 100644
index 0000000000..f8aa7a734c
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail046.hs
@@ -0,0 +1,4 @@
+-- Qualified name in binding position
+module ShouldFail where
+
+data Test = Map.Map Int Int
diff --git a/testsuite/tests/rename/should_fail/rnfail046.stderr b/testsuite/tests/rename/should_fail/rnfail046.stderr
new file mode 100644
index 0000000000..49cfe356f4
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail046.stderr
@@ -0,0 +1,2 @@
+
+rnfail046.hs:4:13: Qualified name in binding position: Map.Map
diff --git a/testsuite/tests/rename/should_fail/rnfail047.hs b/testsuite/tests/rename/should_fail/rnfail047.hs
new file mode 100644
index 0000000000..55bd0b8d68
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail047.hs
@@ -0,0 +1,9 @@
+
+-- trac #924: RnFail047_A.hs-boot exports more than RnFail047_A.hs
+
+module RnFail047 where
+
+import {-# SOURCE #-} RnFail047_A
+
+v = x
+
diff --git a/testsuite/tests/rename/should_fail/rnfail047.stderr b/testsuite/tests/rename/should_fail/rnfail047.stderr
new file mode 100644
index 0000000000..380bbd906b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail047.stderr
@@ -0,0 +1,3 @@
+
+RnFail047_A.hs-boot:5:1:
+ RnFail047_A.y is exported by the hs-boot file, but not exported by the module
diff --git a/testsuite/tests/rename/should_fail/rnfail048.hs b/testsuite/tests/rename/should_fail/rnfail048.hs
new file mode 100644
index 0000000000..d1c8d73eb0
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail048.hs
@@ -0,0 +1,13 @@
+-- Trac #1888
+-- Pretty printing for pragmas
+
+module ShouldFail where
+
+{-# NOINLINE[1] foo #-}
+{-# NOINLINE[~2] foo #-}
+{-# NOINLINE foo #-}
+{-# INLINE[1] foo #-}
+{-# INLINE[~2] foo #-}
+{-# INLINE foo #-}
+
+foo n = foo (n+1)
diff --git a/testsuite/tests/rename/should_fail/rnfail048.stderr b/testsuite/tests/rename/should_fail/rnfail048.stderr
new file mode 100644
index 0000000000..885229d745
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail048.stderr
@@ -0,0 +1,9 @@
+
+rnfail048.hs:11:1:
+ Duplicate INLINE pragma:
+ rnfail048.hs:11:1-18: {-# INLINE foo #-}
+ rnfail048.hs:10:1-22: {-# INLINE[~2] foo #-}
+ rnfail048.hs:9:1-21: {-# INLINE[1] foo #-}
+ rnfail048.hs:8:1-20: {-# NOINLINE foo #-}
+ rnfail048.hs:7:1-24: {-# NOINLINE[~2] foo #-}
+ rnfail048.hs:6:1-23: {-# NOINLINE[1] foo #-}
diff --git a/testsuite/tests/rename/should_fail/rnfail049.hs b/testsuite/tests/rename/should_fail/rnfail049.hs
new file mode 100644
index 0000000000..7f4b6c7842
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail049.hs
@@ -0,0 +1,14 @@
+-- Test trying to use a function bound in the list comprehension as the group function
+
+{-# OPTIONS_GHC -XRank2Types -XTransformListComp #-}
+
+module RnFail049 where
+
+import Data.List(inits, tails)
+
+functions :: [forall a. [a] -> [[a]]]
+functions = [inits, tails]
+
+output = [() | f <- functions, then group using f]
+
+
diff --git a/testsuite/tests/rename/should_fail/rnfail049.stderr b/testsuite/tests/rename/should_fail/rnfail049.stderr
new file mode 100644
index 0000000000..6b753fbf2d
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail049.stderr
@@ -0,0 +1,2 @@
+
+rnfail049.hs:12:49: Not in scope: `f'
diff --git a/testsuite/tests/rename/should_fail/rnfail050.hs b/testsuite/tests/rename/should_fail/rnfail050.hs
new file mode 100644
index 0000000000..0c3b262a0f
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail050.hs
@@ -0,0 +1,12 @@
+-- Test trying to use a function bound in the list comprehension as the transform function
+
+{-# OPTIONS_GHC -XRank2Types -XTransformListComp #-}
+
+module RnFail048 where
+
+functions :: [forall a. [a] -> [a]]
+functions = [take 4, take 5]
+
+output = [() | f <- functions, then f]
+
+
diff --git a/testsuite/tests/rename/should_fail/rnfail050.stderr b/testsuite/tests/rename/should_fail/rnfail050.stderr
new file mode 100644
index 0000000000..d097fc5b44
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail050.stderr
@@ -0,0 +1,2 @@
+
+rnfail050.hs:10:37: Not in scope: `f'
diff --git a/testsuite/tests/rename/should_fail/rnfail051.hs b/testsuite/tests/rename/should_fail/rnfail051.hs
new file mode 100644
index 0000000000..227e040033
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail051.hs
@@ -0,0 +1,11 @@
+-- trac #2033: This used to fail when the renamer didn't check for a view
+-- /pattern/ being used in an /expression/ context
+
+module RnFail051 where
+
+main :: IO ()
+main = wrapper (_ -> putStrLn "_")
+
+wrapper :: (String -> IO ()) -> IO ()
+wrapper f = f ""
+
diff --git a/testsuite/tests/rename/should_fail/rnfail051.stderr b/testsuite/tests/rename/should_fail/rnfail051.stderr
new file mode 100644
index 0000000000..36eccc5724
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail051.stderr
@@ -0,0 +1,3 @@
+
+rnfail051.hs:7:17:
+ Pattern syntax in expression context: _ -> putStrLn "_"
diff --git a/testsuite/tests/rename/should_fail/rnfail052.hs b/testsuite/tests/rename/should_fail/rnfail052.hs
new file mode 100644
index 0000000000..63a0dfd6d1
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail052.hs
@@ -0,0 +1,15 @@
+-- Error messages when you use 'forall' *without* the RankN flags
+-- Test cases similar to Trac #2114
+
+module ShouldFail where
+
+f :: forall a. a->a
+f = error "ur"
+
+g :: Int -> (forall a. a-> a) -> Int
+g = error "ur"
+
+data S = MkS (forall a. a->a)
+ -- This one complains about 'a' and 'forall' not in scope
+ -- because they aren't implicitly quantified,
+ -- whereas implicit quantification deals with the first two
diff --git a/testsuite/tests/rename/should_fail/rnfail052.stderr b/testsuite/tests/rename/should_fail/rnfail052.stderr
new file mode 100644
index 0000000000..f6d0929bca
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail052.stderr
@@ -0,0 +1,5 @@
+
+rnfail052.hs:6:14:
+ Illegal symbol '.' in type
+ Perhaps you intended -XRankNTypes or similar flag
+ to enable explicit-forall syntax: forall <tvs>. <type>
diff --git a/testsuite/tests/rename/should_fail/rnfail053.hs b/testsuite/tests/rename/should_fail/rnfail053.hs
new file mode 100644
index 0000000000..dbc219271b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail053.hs
@@ -0,0 +1,6 @@
+-- Test Trac #2114 (error message)
+
+module ShouldFail where
+
+data T = forall a. MkT a
+
diff --git a/testsuite/tests/rename/should_fail/rnfail053.stderr b/testsuite/tests/rename/should_fail/rnfail053.stderr
new file mode 100644
index 0000000000..47f44c4464
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail053.stderr
@@ -0,0 +1,4 @@
+
+rnfail053.hs:5:10:
+ Not a data constructor: `forall'
+ Perhaps you intended to use -XExistentialQuantification
diff --git a/testsuite/tests/rename/should_fail/rnfail054.hs b/testsuite/tests/rename/should_fail/rnfail054.hs
new file mode 100644
index 0000000000..f83a0f9970
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail054.hs
@@ -0,0 +1,6 @@
+-- Test for trac #2141
+
+module Foo where
+
+foo :: () -> ()
+foo x = x { foo = 1 }
diff --git a/testsuite/tests/rename/should_fail/rnfail054.stderr b/testsuite/tests/rename/should_fail/rnfail054.stderr
new file mode 100644
index 0000000000..ab952aadeb
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail054.stderr
@@ -0,0 +1,5 @@
+
+rnfail054.hs:6:13:
+ `foo' is not a record selector
+ In the expression: x {foo = 1}
+ In an equation for `foo': foo x = x {foo = 1}
diff --git a/testsuite/tests/rename/should_fail/rnfail055.stderr b/testsuite/tests/rename/should_fail/rnfail055.stderr
new file mode 100644
index 0000000000..7c30e7828e
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail055.stderr
@@ -0,0 +1,107 @@
+
+RnFail055.hs:1:73:
+ Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+RnFail055.hs-boot:1:73:
+ Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+RnFail055.hs-boot:4:1:
+ Identifier `f1' has conflicting definitions in the module and its hs-boot file
+ Main module: f1 :: Int -> Float
+ Boot file: f1 :: Float -> Int
+
+RnFail055.hs-boot:6:6:
+ Type constructor `S1' has conflicting definitions in the module and its hs-boot file
+ Main module: type S1 a b
+ = (a, b)
+ FamilyInstance: none
+ Boot file: type S1 a b c
+ = (a, b)
+ FamilyInstance: none
+
+RnFail055.hs-boot:8:6:
+ Type constructor `S2' has conflicting definitions in the module and its hs-boot file
+ Main module: type S2 a b
+ = forall a. (a, b)
+ FamilyInstance: none
+ Boot file: type S2 a b
+ = forall b. (a, b)
+ FamilyInstance: none
+
+RnFail055.hs-boot:12:6:
+ Type constructor `T1' has conflicting definitions in the module and its hs-boot file
+ Main module: data T1 a b
+ RecFlag Recursive
+ = T1 :: forall a b. [b] -> [a] -> T1 a b Stricts: _ _
+ FamilyInstance: none
+ Boot file: data T1 a b
+ RecFlag NonRecursive
+ = T1 :: forall a b. [a] -> [b] -> T1 a b Stricts: _ _
+ FamilyInstance: none
+
+RnFail055.hs-boot:14:16:
+ Type constructor `T2' has conflicting definitions in the module and its hs-boot file
+ Main module: data Eq b => T2 a b
+ RecFlag Recursive
+ = T2 :: forall a b. a -> T2 a b Stricts: _
+ FamilyInstance: none
+ Boot file: data Eq a => T2 a b
+ RecFlag NonRecursive
+ = T2 :: forall a b. a -> T2 a b Stricts: _
+ FamilyInstance: none
+
+RnFail055.hs-boot:16:11:
+ T3 is exported by the hs-boot file, but not exported by the module
+
+RnFail055.hs-boot:17:12:
+ T3' is exported by the hs-boot file, but not exported by the module
+
+RnFail055.hs-boot:21:6:
+ Type constructor `T5' has conflicting definitions in the module and its hs-boot file
+ Main module: data T5 a
+ RecFlag Recursive
+ = T5 :: forall a. a -> T5 a Stricts: _ Fields: field5
+ FamilyInstance: none
+ Boot file: data T5 a
+ RecFlag NonRecursive
+ = T5 :: forall a. a -> T5 a Stricts: _
+ FamilyInstance: none
+
+RnFail055.hs-boot:23:6:
+ Type constructor `T6' has conflicting definitions in the module and its hs-boot file
+ Main module: data T6
+ RecFlag Recursive
+ = T6 :: Int -> T6 Stricts: _
+ FamilyInstance: none
+ Boot file: data T6
+ RecFlag NonRecursive
+ = T6 :: Int -> T6 HasWrapper Stricts: !
+ FamilyInstance: none
+
+RnFail055.hs-boot:25:6:
+ Type constructor `T7' has conflicting definitions in the module and its hs-boot file
+ Main module: data T7 a
+ RecFlag Recursive
+ = T7 :: forall a a. a -> T7 a Stricts: _
+ FamilyInstance: none
+ Boot file: data T7 a
+ RecFlag NonRecursive
+ = T7 :: forall a b. a -> T7 a Stricts: _
+ FamilyInstance: none
+
+RnFail055.hs-boot:27:22:
+ RnFail055.m1 is exported by the hs-boot file, but not exported by the module
+
+RnFail055.hs-boot:28:7:
+ Class `C2' has conflicting definitions in the module and its hs-boot file
+ Main module: class C2 a b
+ RecFlag NonRecursive
+ m2 :: a -> b m2' :: a -> b
+ Boot file: class C2 a b
+ RecFlag NonRecursive
+ m2 :: a -> b
+
+RnFail055.hs-boot:29:24:
+ Class `C3' has conflicting definitions in the module and its hs-boot file
+ Main module: class (Eq a, Ord a) => C3 a RecFlag NonRecursive
+ Boot file: class (Ord a, Eq a) => C3 a RecFlag NonRecursive
diff --git a/testsuite/tests/rename/should_fail/rnfail056.hs b/testsuite/tests/rename/should_fail/rnfail056.hs
new file mode 100644
index 0000000000..23ec008dc6
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail056.hs
@@ -0,0 +1,8 @@
+-- TupleSections not enabled
+{-# LANGUAGE UnboxedTuples #-}
+
+module Foo where
+
+foo = (1,)
+
+bar = (# 1, #)
diff --git a/testsuite/tests/rename/should_fail/rnfail056.stderr b/testsuite/tests/rename/should_fail/rnfail056.stderr
new file mode 100644
index 0000000000..3ddf502dee
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail056.stderr
@@ -0,0 +1,4 @@
+
+rnfail056.hs:6:7: Illegal tuple section: use -XTupleSections
+
+rnfail056.hs:8:7: Illegal tuple section: use -XTupleSections