diff --git a/testsuite/tests/perf/compiler/T3064.hs b/testsuite/tests/perf/compiler/T3064.hs index 7b458838717fdaa060745ec150e3117c3ab2daa6..5dde491e8a2d14b33d49cc634c771c8b456531c0 100644 --- a/testsuite/tests/perf/compiler/T3064.hs +++ b/testsuite/tests/perf/compiler/T3064.hs @@ -58,16 +58,18 @@ runCtxM action = runReaderT (unResourceT action) Ctx -- test13 = runCA(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn( -- newRgn(newRgn(newRgn(newRgn(return())))))))))))) + +{- test14 :: IO () test14 = runCA(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn( newRgn(newRgn(newRgn(newRgn(return()))))))))))))) -{- test28 :: IO () test28 = runCA(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn( newRgn(newRgn(newRgn(newRgn( newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn( newRgn(newRgn(newRgn(newRgn(return()))))))))))))))))))))))))) +-} test56 :: IO () test56 = runCA(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn( @@ -78,4 +80,3 @@ test56 = runCA(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn( newRgn(newRgn(newRgn(newRgn( newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn(newRgn( newRgn(newRgn(newRgn(newRgn(return()))))))))))))))))))))))))))))))))))))))))))))))))) --} diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index a599ccf0fe8b17fc7a332a1e33e44f37c7b5b8a2..0f70d9b5fdfc62d326f416a09bc2f95dac7ccb69 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -129,22 +129,22 @@ test('T3064', compiler_stats_num_field('peak_megabytes_allocated', 7, 12)), # expected value: 18 (amd64/Linux): if_wordsize(64, - compiler_stats_num_field('peak_megabytes_allocated', 9, 16)), + compiler_stats_num_field('peak_megabytes_allocated', 30, 38)), # expected value: 56380288 (x86/Linux) (28/6/2011) if_wordsize(32, compiler_stats_range_field('bytes allocated', 39800820, 10)), # expected value: 73259544 (amd64/Linux) (28/6/2011): if_wordsize(64, - compiler_stats_num_field('bytes allocated', 60000000, - 80000000)), + compiler_stats_num_field('bytes allocated', 200000000, + 280000000)), # expected value: 2247016 (x86/Linux) (28/6/2011): if_wordsize(32, compiler_stats_num_field('max_bytes_used', 2000000, 3000000)), # expected value: 4032024 (amd64/Linux, intree) (28/6/2011): if_wordsize(64, - compiler_stats_num_field('max_bytes_used', 3000000, - 5000000)), + compiler_stats_num_field('max_bytes_used', 10000000, + 14000000)), only_ways(['normal']) ], compile, diff --git a/testsuite/tests/polykinds/T5716a.hs b/testsuite/tests/polykinds/T5716a.hs new file mode 100644 index 0000000000000000000000000000000000000000..af75f4496cedd8b41cca68920cb93533e1896853 --- /dev/null +++ b/testsuite/tests/polykinds/T5716a.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} + +module T5716a where + + +data family DF a +data instance DF a = Bar (Bar a) + diff --git a/testsuite/tests/polykinds/T5716a.stderr b/testsuite/tests/polykinds/T5716a.stderr new file mode 100644 index 0000000000000000000000000000000000000000..0578a2c11383120a34185e5e0bfefb1191888219 --- /dev/null +++ b/testsuite/tests/polykinds/T5716a.stderr @@ -0,0 +1,4 @@ + +T5716a.hs:10:1: + Cycle in type declarations: data constructor used (in a type) before it is defined + T5716a.hs:10:1-32: data instance DF a = Bar (Bar a) diff --git a/testsuite/tests/polykinds/T5938.hs b/testsuite/tests/polykinds/T5938.hs index bde1e7453e811616640a2353508fa61419639014..1e78f759ef6b75f6208e2e0fa8988d2839d5b206 100644 --- a/testsuite/tests/polykinds/T5938.hs +++ b/testsuite/tests/polykinds/T5938.hs @@ -1,7 +1,7 @@ -{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-} -module T5938 where - -type family KindFam a -type instance KindFam (a :: *) = Int -type instance KindFam (a :: Bool) = Bool -type instance KindFam (a :: Maybe k) = Char -- doesn't work +{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-} +module T5938 where + +type family KindFam a +type instance KindFam (a :: *) = Int +type instance KindFam (a :: Bool) = Bool +type instance KindFam (a :: Maybe k) = Char -- doesn't work diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index fee495d5b5dc83298793e929832d105b8384c3fb..7f12a673f114f5eccd38cb9f44102491e8ff03b6 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -29,8 +29,11 @@ test('T5862', normal, compile, ['']) test('T5912', normal, compile, ['']) test('T5881', normal, run_command, ['$MAKE -s --no-print-directory T5881']) test('T5716', normal, compile_fail, ['']) +test('T5716a', normal, compile_fail, ['']) test('T5937', normal, compile, ['']) test('T5935', normal, compile, ['']) test('T5938', normal, compile, ['']) test('T5948', normal, compile, ['']) test('T6020', normal, compile, ['']) +test('T6035', normal, compile, ['']) +test('T6036', normal, compile, ['']) diff --git a/testsuite/tests/simplCore/should_run/T5920.hs b/testsuite/tests/simplCore/should_run/T5920.hs new file mode 100644 index 0000000000000000000000000000000000000000..64e4c3b5681ab51966c6b96863d6d6e6d6051886 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T5920.hs @@ -0,0 +1,10 @@ +module Main where + +-- Stack overflow if the tail recursion does not work + +goInt :: Integer -> Integer -> Int +goInt 500 100000 = 0 +goInt x 100000 = goInt (x+1) 1 +goInt x y = goInt x (y+1) + +main = print $ goInt 1 1 diff --git a/testsuite/tests/simplCore/should_run/T5920.stdout b/testsuite/tests/simplCore/should_run/T5920.stdout new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T5920.stdout @@ -0,0 +1 @@ +0 diff --git a/testsuite/tests/simplCore/should_run/all.T b/testsuite/tests/simplCore/should_run/all.T index aa3cc7f2362785268f9d493bbbbd6739a7b4084c..20b25787a05fe4967f54560d77bf5376e9a6f984 100644 --- a/testsuite/tests/simplCore/should_run/all.T +++ b/testsuite/tests/simplCore/should_run/all.T @@ -54,3 +54,4 @@ test('T5603', normal, compile_and_run, ['']) test('T5625', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run, ['']) test('T5587', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run, ['']) test('T5915', only_ways(['normal','optasm']), compile_and_run, ['']) +test('T5920', only_ways(['normal','optasm']), compile_and_run, ['']) diff --git a/testsuite/tests/typecheck/should_fail/T5853.hs b/testsuite/tests/typecheck/should_fail/T5853.hs new file mode 100644 index 0000000000000000000000000000000000000000..7dde62d89d5a41283fd417d0f58883a1264143a2 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T5853.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE NoImplicitPrelude, TypeFamilies #-} + +module T5853 where +import Prelude (undefined,Bool(..),Show(..),(.)) + +type family Elem f :: * +type family Subst f b :: * + +class (Subst fa (Elem fa) ~ fa) => F fa where + (<$>) :: (Elem fa ~ a, Elem fb ~ b, + Subst fa b ~ fb, Subst fb a ~ fa) => + (a -> b) -> (fa -> fb) + +{-# RULES + "map/map" forall f g xs. f <$> (g <$> xs) = (f.g) <$> xs + #-} diff --git a/testsuite/tests/typecheck/should_fail/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr new file mode 100644 index 0000000000000000000000000000000000000000..eeba39fb1d5a44295d5c6d94329b8670ac308df7 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T5853.stderr @@ -0,0 +1,14 @@ + +T5853.hs:15:52: + Could not deduce (fb ~ Subst fa1 (Elem fb)) + from the context (F fa, + Subst fa (Elem fb) ~ fb, + Subst fb (Elem fa) ~ fa, + F fa1, + Subst fa1 (Elem fa) ~ fa, + Subst fa (Elem fa1) ~ fa1) + bound by the RULE "map/map" at T5853.hs:15:2-57 + `fb' is a rigid type variable bound by + the RULE "map/map" at T5853.hs:15:2 + In the expression: (f . g) <$> xs + When checking the transformation rule "map/map" diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 4c23ef99d6b9b9549be44b6517a82cb084d01e42..1dc3249f3a158cc24647a8e34bea05c610f1d27b 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -275,3 +275,4 @@ test('T5858', normal, compile_fail, ['']) test('T5957', normal, compile_fail, ['']) test('T6001', normal, compile_fail, ['']) test('T6022', normal, compile_fail, ['']) +test('T5853', normal, compile_fail, [''])