diff options
Diffstat (limited to 'testsuite/tests/stranal')
-rw-r--r-- | testsuite/tests/stranal/should_compile/T16029.stdout | 8 | ||||
-rw-r--r-- | testsuite/tests/stranal/should_compile/T19766.hs | 19 | ||||
-rw-r--r-- | testsuite/tests/stranal/should_compile/all.T | 1 |
3 files changed, 24 insertions, 4 deletions
diff --git a/testsuite/tests/stranal/should_compile/T16029.stdout b/testsuite/tests/stranal/should_compile/T16029.stdout index 2d1f2106f3..76bf2617fb 100644 --- a/testsuite/tests/stranal/should_compile/T16029.stdout +++ b/testsuite/tests/stranal/should_compile/T16029.stdout @@ -4,8 +4,8 @@ :: GHC.Prim.Int# -> GHC.Prim.Int# = \ (ww :: GHC.Prim.Int#) -> g2 [InlPrag=[2]] :: T -> Int -> Int - Tmpl= \ (w [Occ=Once1!] :: T) (w1 [Occ=Once1!] :: Int) -> - = \ (w :: T) (w1 :: Int) -> + Tmpl= \ (ds [Occ=Once1!] :: T) (ds1 [Occ=Once1!] :: Int) -> + = \ (ds :: T) (ds1 :: Int) -> g1 [InlPrag=[2]] :: S -> Int -> Int - Tmpl= \ (w [Occ=Once1!] :: S) (w1 [Occ=Once1!] :: Int) -> - = \ (w :: S) (w1 :: Int) -> + Tmpl= \ (ds [Occ=Once1!] :: S) (ds1 [Occ=Once1!] :: Int) -> + = \ (ds :: S) (ds1 :: Int) -> diff --git a/testsuite/tests/stranal/should_compile/T19766.hs b/testsuite/tests/stranal/should_compile/T19766.hs new file mode 100644 index 0000000000..1062c57cc1 --- /dev/null +++ b/testsuite/tests/stranal/should_compile/T19766.hs @@ -0,0 +1,19 @@ +{-# OPTIONS_GHC -O #-} + +module T19766 where + +data T a b = T !a !b + +data HasT = A (T Int Int) | B (T Int Int) + +getT :: HasT -> T Int Int +getT (A t) = t +getT (B t) = t + +f :: HasT -> [Int] +f ht = case getT ht of t@(T _ _) -> reverse $ reverse $ reverse $ reverse $ reverse $ reverse $ lookupGRE t 15 [1,2,3,4] +{-# NOINLINE f #-} + +lookupGRE :: T Int a -> Int -> [Int] -> [Int] +lookupGRE ~(T n _) !k xs = [ x | x <- xs, x+k == n ] +{-# NOINLINE lookupGRE #-} diff --git a/testsuite/tests/stranal/should_compile/all.T b/testsuite/tests/stranal/should_compile/all.T index f5ebbf289a..9a210ea165 100644 --- a/testsuite/tests/stranal/should_compile/all.T +++ b/testsuite/tests/stranal/should_compile/all.T @@ -66,6 +66,7 @@ test('T18894b', [ grep_errmsg(r'Arity=2') ], compile, ['-ddump-stranal -dsuppre test('T18982', [ grep_errmsg(r'\$w. .*Int#$') ], compile, ['-dppr-cols=1000 -ddump-simpl -dsuppress-idinfo -dsuppress-uniques']) test('T19180', normal, compile, ['']) +test('T19766', [ grep_errmsg(r'absentError') ], compile, ['-ddump-worker-wrapper']) test('T19849', normal, compile, ['']) test('T19882a', normal, compile, ['']) test('T19882b', normal, compile, ['']) |