diff options
Diffstat (limited to 'testsuite')
64 files changed, 367 insertions, 102 deletions
diff --git a/testsuite/tests/codeGen/should_compile/T7237.hs b/testsuite/tests/codeGen/should_compile/T7237.hs new file mode 100644 index 0000000000..8407d8dc5a --- /dev/null +++ b/testsuite/tests/codeGen/should_compile/T7237.hs @@ -0,0 +1,10 @@ +module T7237 where + +import Data.List (foldl') + +data SPair = SPair { pX, pY :: Double } deriving (Eq,Show) + +data AList = AList { pairs :: [SPair] } deriving Show + +rnf' :: AList -> () +rnf' aList = foldl' (flip seq) () (pairs aList) `seq` () diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index ba29c2a145..fb655861bd 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -16,4 +16,8 @@ test('3579', normal, compile, ['']) test('2578', normal, run_command, ['$MAKE -s --no-print-directory 2578']) # skip llvm on i386 as we don't support fPIC test('jmp_tbl', if_arch('i386', omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC -O']) -test('massive_array', if_arch('i386', omit_ways(['llvm', 'optllvm'])), compile, ['-fPIC']) +test('massive_array', + [ if_arch('i386', expect_broken(7213)), + if_arch('i386', omit_ways(['llvm', 'optllvm'])) ], + compile, ['-fPIC']) +test('T7237', normal, compile, ['']) diff --git a/testsuite/tests/deSugar/should_compile/Makefile b/testsuite/tests/deSugar/should_compile/Makefile index a6cbe41da5..f732783210 100644 --- a/testsuite/tests/deSugar/should_compile/Makefile +++ b/testsuite/tests/deSugar/should_compile/Makefile @@ -1,8 +1,14 @@ -TOP=../../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/test.mk
-
-T5252:
- $(RM) -f T5252*.hi T5252*.o
- '$(TEST_HC)' $(TEST_HC_OPTS) -c T5252a.hs
- '$(TEST_HC)' $(TEST_HC_OPTS) -c T5252.hs
+TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T5252: + $(RM) -f T5252*.hi T5252*.o + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5252a.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5252.hs + +# Failed when compiled *without* optimisation +T5252Take2: + $(RM) -f T5252*.hi T5252*.o + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5252Take2a.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5252Take2.hs diff --git a/testsuite/tests/deSugar/should_compile/T5252Take2.hs b/testsuite/tests/deSugar/should_compile/T5252Take2.hs new file mode 100644 index 0000000000..64e64aff20 --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/T5252Take2.hs @@ -0,0 +1,5 @@ +module T5252Take2 where +import qualified T5252Take2a as M + +write_message :: M.WriteMessage -> IO Bool +write_message (M.WriteMessage _) = return True diff --git a/testsuite/tests/deSugar/should_compile/T5252Take2a.hs b/testsuite/tests/deSugar/should_compile/T5252Take2a.hs new file mode 100644 index 0000000000..0bccacef91 --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/T5252Take2a.hs @@ -0,0 +1,8 @@ +{-# OPTIONS_GHC -funbox-strict-fields #-} + +module T5252Take2a ( WriteMessage(..) , WriteDevice ) where + +import qualified Data.ByteString as ByteString + +data WriteMessage = WriteMessage !WriteDevice +newtype WriteDevice = WriteDevice ByteString.ByteString diff --git a/testsuite/tests/deSugar/should_compile/all.T b/testsuite/tests/deSugar/should_compile/all.T index 35d5325fb9..51e747f3a2 100644 --- a/testsuite/tests/deSugar/should_compile/all.T +++ b/testsuite/tests/deSugar/should_compile/all.T @@ -95,3 +95,9 @@ test('T5001', extra_clean(['T5001a.hi', 'T5001a.o'])], multimod_compile, ['T5001', '-v0']) + +# T5252Take2 failed when compiled *wihtout* optimisation +test('T5252Take2', + extra_clean(['T5252Take2a.hi', 'T5252Take2a.o']), + run_command, + ['$MAKE -s --no-print-directory T5252Take2']) diff --git a/testsuite/tests/driver/recomp012/Makefile b/testsuite/tests/driver/recomp012/Makefile new file mode 100644 index 0000000000..180f08ddd8 --- /dev/null +++ b/testsuite/tests/driver/recomp012/Makefile @@ -0,0 +1,30 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +# -fforce-recomp makes lots of driver tests trivially pass, so we +# filter it out from $(TEST_HC_OPTS). +TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS)) + +# Recompilation tests + +clean: + rm -f *.o *.hi + rm -f MyBool.hs Foo.hs Main.hs + rm -f Main$(exeext) + +# bug #7215 + +recomp012: clean + echo 'module MyBool where data MyBool = MyFalse | MyTrue deriving Show' >MyBool.hs + echo 'module Foo where import MyBool; foo = MyFalse' > Foo.hs + echo 'import Foo; main = print foo' > Main.hs + '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 -c -O2 MyBool.hs + '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 -c -O2 Foo.hs + '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 -O2 Main.hs + ./Main + sleep 1 + echo 'module Foo where import MyBool; foo = MyTrue' > Foo.hs + '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 -c -O2 Foo.hs + '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 -O2 Main.hs + ./Main diff --git a/testsuite/tests/driver/recomp012/all.T b/testsuite/tests/driver/recomp012/all.T new file mode 100644 index 0000000000..869fae7501 --- /dev/null +++ b/testsuite/tests/driver/recomp012/all.T @@ -0,0 +1,7 @@ +# Test for #7215, a recompilation bug + +test('recomp012', + [ clean_cmd('$MAKE -s clean') ], + run_command, + ['$MAKE -s --no-print-directory recomp012']) + diff --git a/testsuite/tests/driver/recomp012/recomp012.stdout b/testsuite/tests/driver/recomp012/recomp012.stdout new file mode 100644 index 0000000000..568a17ccee --- /dev/null +++ b/testsuite/tests/driver/recomp012/recomp012.stdout @@ -0,0 +1,2 @@ +MyFalse +MyTrue diff --git a/testsuite/tests/dynlibs/Makefile b/testsuite/tests/dynlibs/Makefile index db328034d1..2f5620c73b 100644 --- a/testsuite/tests/dynlibs/Makefile +++ b/testsuite/tests/dynlibs/Makefile @@ -13,12 +13,15 @@ T3807: '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load -ldl ./T3807-load +.PHONY: T4464dyn +T4464dyn: + .PHONY: T4464 T4464: $(RM) T4464B.o T4464C.o T4464H.hi T4464H.o $(RM) T4464H_stub.c T4464H_stub.h T4464H_stub.o $(RM) HS4464.dll HS4464.dll.a t4464.exe - '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -shared T4464H.hs T4464B.c -optc-DRTSOPTS=RtsOptsSafeOnly -o HS4464.dll + '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -shared T4464H.hs T4464B.c -optc-DRTSOPTS=RtsOptsSafeOnly -o HS4464.dll '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 T4464C.c HS4464.dll.a -o t4464.exe -no-hs-main -./t4464.exe echo "=====" @@ -26,9 +29,17 @@ T4464: $(RM) T4464B.o T4464C.o T4464H.hi T4464H.o $(RM) T4464H_stub.c T4464H_stub.h T4464H_stub.o $(RM) HS4464.dll HS4464.dll.a t4464.exe - '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -shared T4464H.hs T4464B.c -optc-DRTSOPTS=RtsOptsAll -o HS4464.dll + '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -shared T4464H.hs T4464B.c -optc-DRTSOPTS=RtsOptsAll -o HS4464.dll '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 T4464C.c HS4464.dll.a -o t4464.exe -no-hs-main ./t4464.exe + echo "=====" + echo "=====" >&2 + $(RM) T4464B.o T4464C.o T4464H.hi T4464H.o + $(RM) T4464H_stub.c T4464H_stub.h T4464H_stub.o + $(RM) HS4464.dll HS4464.dll.a t4464.exe + '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -dynamic -shared T4464H.hs T4464B.c -optc-DRTSOPTS=RtsOptsAll -o HS4464.dll + '$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -dynamic T4464C.c -o t4464.exe -no-hs-main -L. -lHS4464 + ./t4464.exe .PHONY: T5373 T5373: diff --git a/testsuite/tests/dynlibs/T4464.stderr b/testsuite/tests/dynlibs/T4464.stderr index 0ec9bb989d..89d3fa528c 100644 --- a/testsuite/tests/dynlibs/T4464.stderr +++ b/testsuite/tests/dynlibs/T4464.stderr @@ -2,3 +2,5 @@ Creating library file: HS4464.dll.a ghcDll: Most RTS options are disabled. Link with -rtsopts to enable them. ===== Creating library file: HS4464.dll.a +===== +Creating library file: HS4464.dll.a diff --git a/testsuite/tests/dynlibs/T4464.stdout b/testsuite/tests/dynlibs/T4464.stdout index 68a1093c21..cbabaff9aa 100644 --- a/testsuite/tests/dynlibs/T4464.stdout +++ b/testsuite/tests/dynlibs/T4464.stdout @@ -1,2 +1,4 @@ ===== f 12 = 13 +===== +f 12 = 13 diff --git a/testsuite/tests/dynlibs/T4464B.c b/testsuite/tests/dynlibs/T4464B.c index fea44986c2..310b75a58d 100644 --- a/testsuite/tests/dynlibs/T4464B.c +++ b/testsuite/tests/dynlibs/T4464B.c @@ -1,8 +1,6 @@ #include <Rts.h> -extern void __stginit_T4464H(void); - void HsStart(void) { int argc = 3; char* argv[] = {"ghcDll", "+RTS", "-H50M", NULL}; // argv must end with NULL @@ -19,9 +17,6 @@ void HsStart(void) { #else hs_init(&argc, &args); #endif - - // Tell Haskell about all root modules - hs_add_root(__stginit_T4464H); } void HsEnd(void) { diff --git a/testsuite/tests/ext-core/Makefile b/testsuite/tests/ext-core/Makefile new file mode 100644 index 0000000000..d52dd9c428 --- /dev/null +++ b/testsuite/tests/ext-core/Makefile @@ -0,0 +1,29 @@ +TOP=../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +# T5881 needs a script because it goes wrong only when +# the modules are compiled separately, not with --make +T5881: + $(RM) -f T5881.hi T5881.o T5881a.hi T5881a.o + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5881a.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5881.hs + +# T6025 is like T5881; needs separate compile +T6025: + $(RM) -f T6025.hi T6025.o T6025a.hi T6025a.o + '$(TEST_HC)' $(TEST_HC_OPTS) -c T6025a.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T6025.hs + +# T6054 is like T5881; needs separate compile +# The second compile fails, and should do so, hence leading "-" +T6054: + $(RM) -f T6054.hi T6054.o T6054a.hi T6054a.o + '$(TEST_HC)' $(TEST_HC_OPTS) -c T6054a.hs + -'$(TEST_HC)' $(TEST_HC_OPTS) -c T6054.hs + +T7022: + $(RM) -f T7022.hi T7022.o T7022a.hi T7022a.o T7022b.hi T7022b.o + '$(TEST_HC)' $(TEST_HC_OPTS) -c T7022a.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T7022b.hs -v0 + -'$(TEST_HC)' $(TEST_HC_OPTS) -c -v0 T7022.hs diff --git a/testsuite/tests/ext-core/T7239.hs b/testsuite/tests/ext-core/T7239.hs new file mode 100644 index 0000000000..4331b9e493 --- /dev/null +++ b/testsuite/tests/ext-core/T7239.hs @@ -0,0 +1,8 @@ +module Main where + +data T a = T a + +type C = T Int +type CL = [C] + +main = print 1 diff --git a/testsuite/tests/ext-core/all.T b/testsuite/tests/ext-core/all.T new file mode 100644 index 0000000000..a1fbb8b7e7 --- /dev/null +++ b/testsuite/tests/ext-core/all.T @@ -0,0 +1,3 @@ +setTestOpts(only_compiler_types(['ghc'])) + +test('T7239', normal, compile, ['-fext-core']) diff --git a/testsuite/tests/generics/GenCannotDoRep0.stderr b/testsuite/tests/generics/GenCannotDoRep0.stderr index e222819e96..291ab14b5f 100644 --- a/testsuite/tests/generics/GenCannotDoRep0.stderr +++ b/testsuite/tests/generics/GenCannotDoRep0.stderr @@ -9,7 +9,7 @@ GenCannotDoRep0.hs:13:45: GenCannotDoRep0.hs:17:1: Can't make a derived instance of `Generic (P Int)': - P must not be instantiated; try deriving `P Int' instead + P must not be instantiated; try deriving `P a' instead In the stand-alone deriving instance for `Generic (P Int)' GenCannotDoRep0.hs:26:1: diff --git a/testsuite/tests/ghci.debugger/Test2.hs b/testsuite/tests/ghci.debugger/Test2.hs index ee52f7b00a..0a0c5d3cdf 100644 --- a/testsuite/tests/ghci.debugger/Test2.hs +++ b/testsuite/tests/ghci.debugger/Test2.hs @@ -3,4 +3,3 @@ module Test2 where f x = g x g y = y - diff --git a/testsuite/tests/ghci.debugger/scripts/2740.script b/testsuite/tests/ghci.debugger/scripts/2740.script index 8cf8c3909b..ac45616180 100644 --- a/testsuite/tests/ghci.debugger/scripts/2740.script +++ b/testsuite/tests/ghci.debugger/scripts/2740.script @@ -1,3 +1,4 @@ +:seti -XMonomorphismRestriction :l 2740.hs :step f 1 2 3 :step diff --git a/testsuite/tests/ghci.debugger/scripts/break001.script b/testsuite/tests/ghci.debugger/scripts/break001.script index 63b5e71a5f..ec02c70dcc 100644 --- a/testsuite/tests/ghci.debugger/scripts/break001.script +++ b/testsuite/tests/ghci.debugger/scripts/break001.script @@ -1,7 +1,7 @@ :l ../Test2 :b 3 :b 5 -f 1 +f (1 :: Integer) :st :st :st diff --git a/testsuite/tests/ghci.debugger/scripts/break005.script b/testsuite/tests/ghci.debugger/scripts/break005.script index b36ebbca2a..c6fec5e019 100644 --- a/testsuite/tests/ghci.debugger/scripts/break005.script +++ b/testsuite/tests/ghci.debugger/scripts/break005.script @@ -1,5 +1,5 @@ :l ../QSort -:st qsort [1,2] +:st qsort [1::Integer,2] :step seq left () :print left diff --git a/testsuite/tests/ghci.debugger/scripts/break006.script b/testsuite/tests/ghci.debugger/scripts/break006.script index 7381490f69..38cd1e14ba 100644 --- a/testsuite/tests/ghci.debugger/scripts/break006.script +++ b/testsuite/tests/ghci.debugger/scripts/break006.script @@ -1,5 +1,5 @@ :l ../Test3.hs -:st mymap (+1) [1,2,3] +:st mymap (+1) [1::Integer,2,3] :st :show bindings f x -- should fail, unknown return type diff --git a/testsuite/tests/ghci.debugger/scripts/break026.script b/testsuite/tests/ghci.debugger/scripts/break026.script index 98c6624751..b2dd79ef97 100644 --- a/testsuite/tests/ghci.debugger/scripts/break026.script +++ b/testsuite/tests/ghci.debugger/scripts/break026.script @@ -1,5 +1,5 @@ :load break026 -:step foldl (+) 0 [1..5] +:step foldl (+) 0 [1::Integer .. 5] :step :step :step @@ -9,7 +9,7 @@ -- answer should be 1 :load break026 -:step foldl (+) 0 [1..5] +:step foldl (+) 0 [1::Integer .. 5] :step :step :step diff --git a/testsuite/tests/ghci.debugger/scripts/break027.script b/testsuite/tests/ghci.debugger/scripts/break027.script index 198b259c78..5c5a5f9c65 100644 --- a/testsuite/tests/ghci.debugger/scripts/break027.script +++ b/testsuite/tests/ghci.debugger/scripts/break027.script @@ -1,5 +1,5 @@ :l ../QSort :break qsort -qsort [3,2,1] +qsort [3::Integer,2,1] :step :i a diff --git a/testsuite/tests/ghci.debugger/scripts/print001.script b/testsuite/tests/ghci.debugger/scripts/print001.script index f2111c0cc5..bdb2098c0f 100644 --- a/testsuite/tests/ghci.debugger/scripts/print001.script +++ b/testsuite/tests/ghci.debugger/scripts/print001.script @@ -1,6 +1,6 @@ -- Printing of lists -let li = map Just [0..5] +let li = map Just [0::Integer .. 5] :p li head li :p li @@ -9,4 +9,4 @@ length li :sp li li :p li -:sp li
\ No newline at end of file +:sp li diff --git a/testsuite/tests/ghci.debugger/scripts/print004.script b/testsuite/tests/ghci.debugger/scripts/print004.script index b82929a600..78039d8e0f 100644 --- a/testsuite/tests/ghci.debugger/scripts/print004.script +++ b/testsuite/tests/ghci.debugger/scripts/print004.script @@ -4,7 +4,7 @@ let a = False :sp a :p a -let b = map Just [1..4] +let b = map Just [1::Integer .. 4] :p b head b :p b diff --git a/testsuite/tests/ghci.debugger/scripts/print005.script b/testsuite/tests/ghci.debugger/scripts/print005.script index 0d26508703..f08b7752a3 100644 --- a/testsuite/tests/ghci.debugger/scripts/print005.script +++ b/testsuite/tests/ghci.debugger/scripts/print005.script @@ -2,7 +2,7 @@ :l ../QSort :break 5 -qsort [8, 4] +qsort [8::Integer, 4] :p right seq right () @@ -12,4 +12,4 @@ seq left () :p left length left :p left -:continue
\ No newline at end of file +:continue diff --git a/testsuite/tests/ghci.debugger/scripts/print009.script b/testsuite/tests/ghci.debugger/scripts/print009.script index 9c36e8c403..38258ace58 100644 --- a/testsuite/tests/ghci.debugger/scripts/print009.script +++ b/testsuite/tests/ghci.debugger/scripts/print009.script @@ -2,7 +2,7 @@ -- Testing collisions let _t1 = "user value" -let li = map Just [1..4] +let li = map Just [1::Integer .. 4] :p li _t1 -_t2
\ No newline at end of file +_t2 diff --git a/testsuite/tests/ghci.debugger/scripts/print013.script b/testsuite/tests/ghci.debugger/scripts/print013.script index 154c1b328f..334e6050ca 100644 --- a/testsuite/tests/ghci.debugger/scripts/print013.script +++ b/testsuite/tests/ghci.debugger/scripts/print013.script @@ -3,7 +3,7 @@ :set -XGADTs -XRank2Types :l ../GADT -let d = DictN 1 +let d = DictN (1 :: Integer) :p d seq _t1 () :p d diff --git a/testsuite/tests/ghci.debugger/scripts/print016.script b/testsuite/tests/ghci.debugger/scripts/print016.script index 1f5f153892..aa5cb048bd 100644 --- a/testsuite/tests/ghci.debugger/scripts/print016.script +++ b/testsuite/tests/ghci.debugger/scripts/print016.script @@ -2,9 +2,9 @@ :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving :l ../Test -let a = map MkT [1..2] +let a = map MkT [1::Integer .. 2] :p a seq _t1 () :p a seq _t2 () -:p a
\ No newline at end of file +:p a diff --git a/testsuite/tests/ghci.debugger/scripts/print017.script b/testsuite/tests/ghci.debugger/scripts/print017.script index 7a8371a2c1..d049ffd1dd 100644 --- a/testsuite/tests/ghci.debugger/scripts/print017.script +++ b/testsuite/tests/ghci.debugger/scripts/print017.script @@ -2,7 +2,7 @@ :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving :l ../Test -let a = map (MkT2 . MkT) [1..2] +let a = map (MkT2 . MkT) [1::Integer .. 2] :p a seq _t1 () :p a diff --git a/testsuite/tests/ghci.debugger/scripts/print023.script b/testsuite/tests/ghci.debugger/scripts/print023.script index 434b8df4af..95f37ff18d 100644 --- a/testsuite/tests/ghci.debugger/scripts/print023.script +++ b/testsuite/tests/ghci.debugger/scripts/print023.script @@ -3,6 +3,6 @@ :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving :l ../Test -let a = MkT [1..2] +let a = MkT [1::Integer .. 2] seq a () :p a diff --git a/testsuite/tests/ghci.debugger/scripts/print024.script b/testsuite/tests/ghci.debugger/scripts/print024.script index d617ecaaa0..381676e0d7 100644 --- a/testsuite/tests/ghci.debugger/scripts/print024.script +++ b/testsuite/tests/ghci.debugger/scripts/print024.script @@ -3,7 +3,7 @@ :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving :l ../Test -let a = MkT 1 +let a = MkT (1 :: Integer) seq a () :p a a diff --git a/testsuite/tests/ghci.debugger/scripts/print028.script b/testsuite/tests/ghci.debugger/scripts/print028.script index 0beb8bf725..dac9816370 100644 --- a/testsuite/tests/ghci.debugger/scripts/print028.script +++ b/testsuite/tests/ghci.debugger/scripts/print028.script @@ -1,8 +1,8 @@ :m + Data.IORef -let l = map Just [1..10] +let l = map Just [1::Integer .. 10] :p l head l r <- newIORef l :p r -:sp r
\ No newline at end of file +:sp r diff --git a/testsuite/tests/ghci/scripts/2816.script b/testsuite/tests/ghci/scripts/2816.script index 5fd8477b64..3f4ce8aefb 100644 --- a/testsuite/tests/ghci/scripts/2816.script +++ b/testsuite/tests/ghci/scripts/2816.script @@ -1,5 +1,5 @@ α -let α = 4 +let α = 4 :: Integer α 4 :type α diff --git a/testsuite/tests/ghci/scripts/2976.script b/testsuite/tests/ghci/scripts/2976.script index f4fe8d7122..32a5472b05 100644 --- a/testsuite/tests/ghci/scripts/2976.script +++ b/testsuite/tests/ghci/scripts/2976.script @@ -1,4 +1,4 @@ -let test = 0 +let test = 0 :: Integer :show bindings :force test :show bindings diff --git a/testsuite/tests/ghci/scripts/T5130.script b/testsuite/tests/ghci/scripts/T5130.script index cb4e9d0d6b..ad8625736b 100644 --- a/testsuite/tests/ghci/scripts/T5130.script +++ b/testsuite/tests/ghci/scripts/T5130.script @@ -1,3 +1,3 @@ :set -XScopedTypeVariables -(\(x :: a, y :: a) -> [x, "hi"]) +let f = (\(x :: a, y :: a) -> [x, "hi"]) diff --git a/testsuite/tests/ghci/scripts/T5130.stderr b/testsuite/tests/ghci/scripts/T5130.stderr deleted file mode 100644 index 3c31593991..0000000000 --- a/testsuite/tests/ghci/scripts/T5130.stderr +++ /dev/null @@ -1,6 +0,0 @@ - -<interactive>:3:27: - Couldn't match expected type `a' with actual type `[Char]' - In the expression: "hi" - In the expression: [x, "hi"] - In the expression: (\ (x :: a, y :: a) -> [x, "hi"]) diff --git a/testsuite/tests/ghci/scripts/ghci042.script b/testsuite/tests/ghci/scripts/ghci042.script index f33d7423a1..548f18c4b5 100644 --- a/testsuite/tests/ghci/scripts/ghci042.script +++ b/testsuite/tests/ghci/scripts/ghci042.script @@ -2,7 +2,7 @@ data T = A {a :: Int} :i A :i a -let a = 3 +let a = 3 :: Integer :i a a data R = B {a :: Int} diff --git a/testsuite/tests/ghci/scripts/ghci055.script b/testsuite/tests/ghci/scripts/ghci055.script index 46a08a2bc3..5f19cfdd5c 100644 --- a/testsuite/tests/ghci/scripts/ghci055.script +++ b/testsuite/tests/ghci/scripts/ghci055.script @@ -1,5 +1,5 @@ let x=undefined -let y=3 +let y=3 :: Integer :force x :show bindings -- in 7.3 and earlier this used to print just "*** Exception: diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout b/testsuite/tests/ghci/scripts/ghci057.stdout index f97ea30c3d..ef6644d023 100644 --- a/testsuite/tests/ghci/scripts/ghci057.stdout +++ b/testsuite/tests/ghci/scripts/ghci057.stdout @@ -40,6 +40,7 @@ base language is: Haskell2010 with the following modifiers: -XGADTs -XGADTSyntax + -XNoMonomorphismRestriction -XNoDatatypeContexts -XNondecreasingIndentation -XMonoLocalBinds diff --git a/testsuite/tests/module/mod73.stderr b/testsuite/tests/module/mod73.stderr index f86a363776..f1234514b4 100644 --- a/testsuite/tests/module/mod73.stderr +++ b/testsuite/tests/module/mod73.stderr @@ -3,5 +3,5 @@ mod73.hs:3:7: Not in scope: `Prelude.g' Perhaps you meant one of these: `Prelude.id' (imported from Prelude), - `Prelude.gcd' (imported from Prelude), - `Prelude.or' (imported from Prelude) + `Prelude.log' (imported from Prelude), + `Prelude.pi' (imported from Prelude) diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index 5fd5a3c3a1..3a2a406e6a 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -13,10 +13,11 @@ test('T1969', # 15 (x86/OS X) # 19 (x86/OS X) if_wordsize(64, - compiler_stats_num_field('peak_megabytes_allocated', 24, - 37)), + compiler_stats_num_field('peak_megabytes_allocated', 22, + 24)), # expected value: 28 (amd64/Linux) # expected value: 34 (amd64/Linux) + # 2012-09-20 23 (amd64/Linux) if_wordsize(32, compiler_stats_num_field('max_bytes_used', 4000000, 7000000)), @@ -36,7 +37,7 @@ test('T1969', # 221667908 (x86/OS X) # 274932264 (x86/Linux) if_wordsize(64, - compiler_stats_range_field('bytes allocated', 606230880, 1)), + compiler_stats_range_field('bytes allocated', 641959976, 1)), # 17/11/2009: 434,845,560 (amd64/Linux) # 08/12/2009: 459,776,680 (amd64/Linux) # 17/05/2010: 519,377,728 (amd64/Linux) @@ -44,6 +45,9 @@ test('T1969', # 16/07/2012: 589,168,872 (amd64/Linux) # 20/07/2012: 595,936,240 (amd64/Linux) # 23/08/2012: 606,230,880 (amd64/Linux) + # 29/08/2012: 633,334,184 (amd64/Linux) + # (^ new codegen) + # 18/09/2012: 641,959,976 (amd64/Linux) only_ways(['normal']), extra_hc_opts('-dcore-lint') # Leave -dcore-lint on for this one test, so that we have something @@ -71,18 +75,20 @@ test('T3294', # expected value: 17725476 (x86/OS X) # 14593500 (Windows) if_wordsize(64, - compiler_stats_range_field('max_bytes_used', 25753192, 15)), - # Improved with the new codegen merge, - # because we now do stg->cmm->NCG for one - # top-level binding at a time. + compiler_stats_range_field('max_bytes_used', 37724352, 15)), + # prev: 25753192 (amd64/Linux) + # 29/08/2012: 37724352 (amd64/Linux) + # (increase due to new codegen, see #7198) if_wordsize(32, compiler_stats_num_field('bytes allocated', 650000000, 750000000)), # expected value: 815479800 (x86/Linux) if_wordsize(64, - compiler_stats_num_field('bytes allocated', 1200000000, - 1500000000)), - # expected value: 1357587088 (amd64/Linux) + compiler_stats_range_field('bytes allocated', 2717327208, 5)), + # old: 1,357,587,088 (amd64/Linux) + # 29/08/2012: 2,961,778,696 (amd64/Linux) + # (^ increase due to new codegen, see #7198) + # 18/09/2012: 2,717,327,208 (amd64/Linux) conf_3294 ], compile, @@ -113,8 +119,9 @@ test('T4801', 12000000)), # expected value: 10290952 (windows) if_wordsize(64, - compiler_stats_range_field('max_bytes_used', 17629176, 15)), - # expected value: 20486256 (amd64/OS X): + compiler_stats_range_field('max_bytes_used', 18500000, 15)), + # prev: 20486256 (amd64/OS X) + # 30/08/2012: 17305600--20391920 (varies a lot) if_platform('x86_64-apple-darwin', compiler_stats_num_field('max_bytes_used', 20000000, 23000000)), @@ -198,10 +205,11 @@ test('T783', if_wordsize(32, compiler_stats_num_field('bytes allocated', 125000000, 225000000)), - # sample: 349263216 (amd64/Linux) - # sample: 384479856 (amd64/Linux, 7/8/2012) if_wordsize(64, - compiler_stats_range_field('bytes allocated', 384479856, 10)) + compiler_stats_range_field('bytes allocated', 436927840, 10)) + # prev: 349,263,216 (amd64/Linux) + # 07/08/2012: 384,479,856 (amd64/Linux) + # 29/08/2012: 436,927,840 (amd64/Linux) ], compile,['']) @@ -211,7 +219,10 @@ test('T5321Fun', if_wordsize(32, compiler_stats_range_field('bytes allocated', 300000000, 10)), if_wordsize(64, - compiler_stats_range_field('bytes allocated', 600000000, 10)) + compiler_stats_range_field('bytes allocated', 713385808, 10)) + # prev: 585,521,080 + # 29/08/2012: 713,385,808 + # (increase due to new codegen) ], compile,['']) @@ -221,7 +232,10 @@ test('T5321FD', if_wordsize(32, compiler_stats_range_field('bytes allocated', 213380256, 10)), if_wordsize(64, - compiler_stats_range_field('bytes allocated', 418306336, 10)) + compiler_stats_range_field('bytes allocated', 492905640, 10)) + # prev: 418,306,336 + # 29/08/2012: 492,905,640 + # (increase due to new codegen) ], compile,['']) @@ -241,7 +255,8 @@ test('T5837', # sample: 3926235424 (amd64/Linux, 15/2/2012) if_wordsize(64, - compiler_stats_range_field('bytes allocated', 79110184, 10)) + compiler_stats_range_field('bytes allocated', 87254264, 10)) + # 2012-09-20 87254264 amd64/Linux ], compile_fail,['-fcontext-stack=50']) @@ -251,6 +266,7 @@ test('T6048', compiler_stats_range_field('bytes allocated', 38000000, 10)), if_wordsize(64, - compiler_stats_range_field('bytes allocated', 67328320, 10)) + compiler_stats_range_field('bytes allocated', 97247032, 10)) + # 18/09/2012 97247032 amd64/Linux ], compile,['']) diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T index 0fb75c4e8e..8e4ad67830 100644 --- a/testsuite/tests/perf/haddock/all.T +++ b/testsuite/tests/perf/haddock/all.T @@ -2,23 +2,26 @@ test('haddock.base', [unless_in_tree_compiler(skip) ,if_wordsize(64, - stats_num_field('peak_megabytes_allocated', 239, - 241)) + stats_num_field('peak_megabytes_allocated', 236, + 248)) # 2012-08-14: 240 (amd64/Linux) + # 2012-09-18: 237 (amd64/Linux) ,if_wordsize(32, stats_num_field('peak_megabytes_allocated', 142, 143)) # 2012-08-14: 144 (x86/OSX) ,if_wordsize(64, - stats_range_field('max_bytes_used', 87374568, 2)) + stats_range_field('max_bytes_used', 84794136, 2)) # 2012-08-14: 87374568 (amd64/Linux) # 2012-08-21: 86428216 (amd64/Linux) + # 2012-09-20: 84794136 (amd64/Linux) ,if_wordsize(32, stats_range_field('max_bytes_used', 45574928, 1)) # 2012-08-14: 45574928 (x86/OSX) ,if_wordsize(64, - stats_range_field('bytes allocated', 5920822352, 1)) + stats_range_field('bytes allocated', 5829972376, 1)) # 2012-08-14: 5920822352 (amd64/Linux) + # 2012-09-20: 5829972376 (amd64/Linux) ,if_wordsize(32, stats_range_field('bytes allocated', 3046487920, 1)) # 2012-08-14: 3046487920 (x86/OSX) @@ -29,25 +32,29 @@ test('haddock.base', test('haddock.Cabal', [unless_in_tree_compiler(skip) ,if_wordsize(64, - stats_num_field('peak_megabytes_allocated', 201, - 203)) - # 2012-08-14: 202 (amd64/Linux) + stats_num_field('peak_megabytes_allocated', 225, + 229)) + # 2012-08-14: 202 (amd64/Linux) + # 2012-08-29: 211 (amd64/Linux, new codegen) + # 2012-09-20: 227 (amd64/Linux, new codegen) ,if_wordsize(32, stats_num_field('peak_megabytes_allocated', 115, 117)) # 2012-08-14: 116 (x86/OSX) ,if_wordsize(64, - stats_range_field('max_bytes_used', 74119424, 1)) - # 2012-08-14: 74119424 (amd64/Linux) + stats_range_field('max_bytes_used', 77992512, 1)) + # 2012-08-14: 74119424 (amd64/Linux) + # 2012-08-29: 77992512 (amd64/Linux, new codegen) ,if_wordsize(32, stats_range_field('max_bytes_used', 47461532, 1)) - # 2012-08-14: 47461532 (x86/OSX) + # 2012-08-14: 47461532 (x86/OSX) ,if_wordsize(64, - stats_range_field('bytes allocated', 3255435248, 1)) - # 2012-08-14: 3255435248 (amd64/Linux) + stats_range_field('bytes allocated', 3324606664, 1)) + # 2012-08-14: 3255435248 (amd64/Linux) + # 2012-08-29: 3324606664 (amd64/Linux, new codegen) ,if_wordsize(32, stats_range_field('bytes allocated', 1648610180, 1)) - # 2012-08-14: 1648610180 (x86/OSX) + # 2012-08-14: 1648610180 (x86/OSX) ], stats, ['../../../../libraries/Cabal/Cabal/dist-install/doc/html/Cabal/Cabal.haddock.t']) @@ -55,23 +62,27 @@ test('haddock.Cabal', test('haddock.compiler', [unless_in_tree_compiler(skip) ,if_wordsize(64, - stats_num_field('peak_megabytes_allocated', 1198, - 1204)) + stats_num_field('peak_megabytes_allocated', 1226, + 1230)) # 2012-08-14: 1203 (amd64/Linux) # 2012-08-21: 1199 (amd64/Linux) + # 2012-09-20: 1228 (amd64/Linux) ,if_wordsize(32, stats_num_field('peak_megabytes_allocated', 630, 632)) # 2012-08-14: 631 (x86/OSX) ,if_wordsize(64, - stats_range_field('max_bytes_used', 428775544, 1)) + stats_range_field('max_bytes_used', 437618008, 1)) # 2012-08-14: 428775544 (amd64/Linux) + # 2012-09-20: 437618008 (amd64/Linux) ,if_wordsize(32, stats_range_field('max_bytes_used', 231064920, 1)) # 2012-08-14: 231064920 (x86/OSX) ,if_wordsize(64, - stats_range_field('bytes allocated', 26070600504, 1)) - # 2012-08-14: 26070600504 (amd64/Linux) + stats_range_field('bytes allocated', 26882813032, 1)) + # 2012-08-14: 26,070,600,504 (amd64/Linux) + # 2012-08-29: 26,353,100,288 (amd64/Linux, new CG) + # 2012-09-18: 26,882,813,032 (amd64/Linux) ,if_wordsize(32, stats_range_field('bytes allocated', 13471797488, 1)) # 2012-08-14: 13471797488 (x86/OSX) diff --git a/testsuite/tests/polykinds/T7224.hs b/testsuite/tests/polykinds/T7224.hs new file mode 100644 index 0000000000..a065bc8494 --- /dev/null +++ b/testsuite/tests/polykinds/T7224.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE PolyKinds #-} + +module T7224 where + +class PMonad' (m :: i -> i -> * -> *) where + ret' :: a -> m i i a + bind' :: m i j a -> (a -> m j k b) -> m i k b diff --git a/testsuite/tests/polykinds/T7224.stderr b/testsuite/tests/polykinds/T7224.stderr new file mode 100644 index 0000000000..c1508e9b7d --- /dev/null +++ b/testsuite/tests/polykinds/T7224.stderr @@ -0,0 +1,5 @@ + +T7224.hs:6:19: + Kind variable `i' used as a type + In the type `a -> m i i a' + In the class declaration for PMonad' diff --git a/testsuite/tests/polykinds/T7230.hs b/testsuite/tests/polykinds/T7230.hs new file mode 100644 index 0000000000..d3c6a51ae5 --- /dev/null +++ b/testsuite/tests/polykinds/T7230.hs @@ -0,0 +1,49 @@ +{-# OPTIONS_GHC -fwarn-incomplete-patterns #-} +{-# LANGUAGE DataKinds, PolyKinds, GADTs, TypeFamilies #-} +{-# LANGUAGE TypeOperators, UndecidableInstances #-} +module T7230 where + +data Nat = Zero | Succ Nat deriving (Show, Eq, Ord) + +data family Sing (x :: k) + +data instance Sing (n :: Nat) where + SZero :: Sing Zero + SSucc :: Sing n -> Sing (Succ n) + +type SNat (n :: Nat) = Sing n + +data instance Sing (b :: Bool) where + STrue :: Sing True + SFalse :: Sing False + +type SBool (b :: Bool) = Sing b + +data instance Sing (xs :: [k]) where + SNil :: Sing ('[] :: [k]) + SCons :: Sing x -> Sing xs -> Sing (x ': xs) + +type SList (xs :: [k]) = Sing (xs :: [k]) + +type family (:<<=) (n :: Nat) (m :: Nat) :: Bool +type instance Zero :<<= n = True +type instance Succ n :<<= Zero = False +type instance Succ n :<<= Succ m = n :<<= m + +(%:<<=) :: SNat n -> SNat m -> SBool (n :<<= m) +SZero %:<<= _ = STrue +SSucc _ %:<<= SZero = SFalse +SSucc n %:<<= SSucc m = n %:<<= m + +type family (b :: Bool) :&& (b' :: Bool) :: Bool +type instance True :&& b = b +type instance False :&& b = False + +type family Increasing (xs :: [Nat]) :: Bool +type instance Increasing '[] = True +type instance Increasing '[n] = True +type instance Increasing (n ': m ': ns) = n :<<= m :&& Increasing (m ': ns) + +crash :: (Increasing xs) ~ True => SList xs -> SBool (Increasing xs) +crash (SCons x (SCons y xs)) = x %:<<= y +crash _ = STrue diff --git a/testsuite/tests/polykinds/T7230.stderr b/testsuite/tests/polykinds/T7230.stderr new file mode 100644 index 0000000000..ee82a2bb19 --- /dev/null +++ b/testsuite/tests/polykinds/T7230.stderr @@ -0,0 +1,25 @@ + +T7230.hs:48:32: + Could not deduce ((x :<<= x1) ~ 'True) + from the context (Increasing xs ~ 'True) + bound by the type signature for + crash :: Increasing xs ~ 'True => + SList Nat xs -> SBool (Increasing xs) + at T7230.hs:47:10-68 + or from (xs ~ (':) Nat x xs1) + bound by a pattern with constructor + SCons :: forall (k :: BOX) (x :: k) (xs :: [k]). + Sing k x -> Sing [k] xs -> Sing [k] ((':) k x xs), + in an equation for `crash' + at T7230.hs:48:8-27 + or from (xs1 ~ (':) Nat x1 xs2) + bound by a pattern with constructor + SCons :: forall (k :: BOX) (x :: k) (xs :: [k]). + Sing k x -> Sing [k] xs -> Sing [k] ((':) k x xs), + in an equation for `crash' + at T7230.hs:48:17-26 + Expected type: SBool (Increasing xs) + Actual type: SBool (x :<<= x1) + In the expression: x %:<<= y + In an equation for `crash': + crash (SCons x (SCons y xs)) = x %:<<= y diff --git a/testsuite/tests/polykinds/T7238.hs b/testsuite/tests/polykinds/T7238.hs new file mode 100644 index 0000000000..3639a8e089 --- /dev/null +++ b/testsuite/tests/polykinds/T7238.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE ConstraintKinds, TypeFamilies #-} +module T7238 where + +import GHC.Exts + +class Pair p where + type Ctxt p a :: Constraint + l :: Ctxt p a => p a -> a + +data Unit a = Unit + +instance Pair Unit where + type Ctxt Unit a = a ~ () + l _ = ()
\ No newline at end of file diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 86e0530351..b6d193fca7 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -64,5 +64,8 @@ test('T7151', normal, compile_fail,['']) test('T7095', normal, compile,['']) test('T7090', normal, compile,['']) test('T7176', normal, compile,['']) +test('T7224', normal, compile_fail,['']) +test('T7230', normal, compile_fail,['']) +test('T7238', normal, compile,['']) diff --git a/testsuite/tests/safeHaskell/check/Check09.stderr b/testsuite/tests/safeHaskell/check/Check09.stderr index 0c723d529d..d79fe5b0bd 100644 --- a/testsuite/tests/safeHaskell/check/Check09.stderr +++ b/testsuite/tests/safeHaskell/check/Check09.stderr @@ -5,4 +5,4 @@ Check09.hs:4:1: Check09.hs:5:1: Data.ByteString.Char8: Can't be safely imported! - The package (bytestring-0.10.0.0) the module resides in isn't trusted. + The package (bytestring-0.10.1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr index 2e8010b4ba..a22386b7a8 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr @@ -3,4 +3,4 @@ The package (base) is required to be trusted but it isn't! <no location info>: - The package (bytestring-0.10.0.0) is required to be trusted but it isn't! + The package (bytestring-0.10.1.0) is required to be trusted but it isn't! diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr index 2e8010b4ba..a22386b7a8 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr @@ -3,4 +3,4 @@ The package (base) is required to be trusted but it isn't! <no location info>: - The package (bytestring-0.10.0.0) is required to be trusted but it isn't! + The package (bytestring-0.10.1.0) is required to be trusted but it isn't! diff --git a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.stderr b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.stderr index 30fcac7f95..4bd2a9ddd3 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.stderr +++ b/testsuite/tests/safeHaskell/check/pkg01/ImpSafeOnly09.stderr @@ -1,3 +1,3 @@ <no location info>: - The package (bytestring-0.10.0.0) is required to be trusted but it isn't! + The package (bytestring-0.10.1.0) is required to be trusted but it isn't! diff --git a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout index 7ac391c779..e3fa2ee853 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout +++ b/testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout @@ -29,17 +29,17 @@ trusted: safe-inferred require own pkg trusted: True M_SafePkg6 -package dependencies: array-0.4.0.1 base* bytestring-0.10.0.0* +package dependencies: array-0.4.0.1 base* bytestring-0.10.1.0* trusted: trustworthy require own pkg trusted: False M_SafePkg7 -package dependencies: array-0.4.0.1 base* bytestring-0.10.0.0* +package dependencies: array-0.4.0.1 base* bytestring-0.10.1.0* trusted: safe require own pkg trusted: False M_SafePkg8 -package dependencies: array-0.4.0.1 base bytestring-0.10.0.0* +package dependencies: array-0.4.0.1 base bytestring-0.10.1.0* trusted: trustworthy require own pkg trusted: False diff --git a/testsuite/tests/safeHaskell/ghci/p12.stderr b/testsuite/tests/safeHaskell/ghci/p12.stderr index 912103c64e..fc43305e11 100644 --- a/testsuite/tests/safeHaskell/ghci/p12.stderr +++ b/testsuite/tests/safeHaskell/ghci/p12.stderr @@ -3,5 +3,5 @@ Some flags have not been recognized: -fno-package-trust <no location info>: Data.ByteString: Can't be safely imported! - The package (bytestring-0.10.0.0) the module resides in isn't trusted. + The package (bytestring-0.10.1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/ghci/p17.stderr b/testsuite/tests/safeHaskell/ghci/p17.stderr index 9a0d5941ca..c46be207c3 100644 --- a/testsuite/tests/safeHaskell/ghci/p17.stderr +++ b/testsuite/tests/safeHaskell/ghci/p17.stderr @@ -1,5 +1,5 @@ <no location info>: Data.ByteString: Can't be safely imported! - The package (bytestring-0.10.0.0) the module resides in isn't trusted. + The package (bytestring-0.10.1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/safeHaskell/ghci/p18.stdout b/testsuite/tests/safeHaskell/ghci/p18.stdout index adc5c8a740..1db55c7815 100644 --- a/testsuite/tests/safeHaskell/ghci/p18.stdout +++ b/testsuite/tests/safeHaskell/ghci/p18.stdout @@ -3,5 +3,5 @@ Package Trust: Off Data.ByteString is trusted! Trust type is (Module: Trustworthy, Package: untrusted) Package Trust: On -Trusted package dependencies (untrusted): bytestring-0.10.0.0 +Trusted package dependencies (untrusted): bytestring-0.10.1.0 Data.ByteString is NOT trusted! diff --git a/testsuite/tests/safeHaskell/ghci/p3.stderr b/testsuite/tests/safeHaskell/ghci/p3.stderr index e00869989e..9ff390705c 100644 --- a/testsuite/tests/safeHaskell/ghci/p3.stderr +++ b/testsuite/tests/safeHaskell/ghci/p3.stderr @@ -6,5 +6,5 @@ <no location info>: Data.ByteString: Can't be safely imported! - The package (bytestring-0.10.0.0) the module resides in isn't trusted. + The package (bytestring-0.10.1.0) the module resides in isn't trusted. diff --git a/testsuite/tests/simplCore/should_run/simplrun010.hs b/testsuite/tests/simplCore/should_run/simplrun010.hs index 0fbc33ac81..6cc79f0d02 100644 --- a/testsuite/tests/simplCore/should_run/simplrun010.hs +++ b/testsuite/tests/simplCore/should_run/simplrun010.hs @@ -14,7 +14,7 @@ import Data.Char(ord,chr) -- low level imports import GHC.Base (realWorld#) -import GHC.IOBase (IO(IO), unIO, unsafePerformIO) +import GHC.IO (IO(IO), unIO, unsafePerformIO) import GHC.Prim (State#,RealWorld) diff --git a/testsuite/tests/typecheck/should_fail/T7210.hs b/testsuite/tests/typecheck/should_fail/T7210.hs new file mode 100644 index 0000000000..3c0a3ffd23 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7210.hs @@ -0,0 +1,5 @@ +module T7210 where + +import Data.IntMap + +data T = C { f :: !IntMap Int } diff --git a/testsuite/tests/typecheck/should_fail/T7210.stderr b/testsuite/tests/typecheck/should_fail/T7210.stderr new file mode 100644 index 0000000000..d0fbf382cb --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7210.stderr @@ -0,0 +1,6 @@ + +T7210.hs:5:19: + Unexpected strictness annotation: !IntMap + In the type `!IntMap Int' + In the definition of data constructor `C' + In the data declaration for `T' diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 7e6f20893c..a84942fc5a 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -281,3 +281,4 @@ test('T5978', normal, compile_fail, ['']) test('TcMultiWayIfFail', if_compiler_lt('ghc', '7.5', skip), compile_fail, ['']) test('T2534', normal, compile_fail, ['']) test('T7175', normal, compile_fail, ['']) +test('T7210', normal, compile_fail, ['']) diff --git a/testsuite/tests/typecheck/should_run/tcrun002.hs b/testsuite/tests/typecheck/should_run/tcrun002.hs index 45fe19fdc9..3dff89311e 100644 --- a/testsuite/tests/typecheck/should_run/tcrun002.hs +++ b/testsuite/tests/typecheck/should_run/tcrun002.hs @@ -5,7 +5,7 @@ module Main where -- care. See comment about polymorphic recursion in TcMonoBinds.lhs import System.Environment (getArgs) -import GHC.IOBase +import GHC.IO sfoldl :: (a -> Int -> a) -> a -> [Int] -> a sfoldl f z [] = z |