diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-03-26 15:41:39 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-03-27 09:53:10 -0400 |
commit | d1fb5831f574953661a3716720fbc798781d37eb (patch) | |
tree | a69d5fdc0f923802c1c876cb528fd2ba69f0f341 | |
parent | d5c4d46a62ce6a0cfa6440344f707136eff18119 (diff) | |
download | haskell-d1fb5831f574953661a3716720fbc798781d37eb.tar.gz |
testsuite: Add test for #14965
-rw-r--r-- | testsuite/tests/simplCore/should_run/T14965.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_run/T14965.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_run/T14965_Sep.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_run/all.T | 1 |
4 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_run/T14965.hs b/testsuite/tests/simplCore/should_run/T14965.hs new file mode 100644 index 0000000000..f4fa01148e --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T14965.hs @@ -0,0 +1,15 @@ +module Main (main) where + +import T14965_Sep + +main :: IO () +main = print $ cc bb + +bb :: Sep +bb = catSep b1 b2 + +b1 :: Sep +b1 = Sep [] ["foo"] [] + +b2 :: Sep +b2 = Sep [] ["bar"] [] diff --git a/testsuite/tests/simplCore/should_run/T14965.stdout b/testsuite/tests/simplCore/should_run/T14965.stdout new file mode 100644 index 0000000000..0ca95142bb --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T14965.stdout @@ -0,0 +1 @@ +True diff --git a/testsuite/tests/simplCore/should_run/T14965_Sep.hs b/testsuite/tests/simplCore/should_run/T14965_Sep.hs new file mode 100644 index 0000000000..46c0f1b7e4 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T14965_Sep.hs @@ -0,0 +1,13 @@ +module T14965_Sep where + +data Sep = Sep + { bugVanishesWithoutThis :: [()] + , middle :: [String] + , orThis :: [()] + } + +catSep :: Sep -> Sep -> Sep +catSep (Sep a b c) (Sep x y z) = Sep (a ++ x) (b ++ y) (c ++ z) + +cc :: Sep -> Bool +cc boost = elem "foo" $ middle boost diff --git a/testsuite/tests/simplCore/should_run/all.T b/testsuite/tests/simplCore/should_run/all.T index d697605754..ca69565c26 100644 --- a/testsuite/tests/simplCore/should_run/all.T +++ b/testsuite/tests/simplCore/should_run/all.T @@ -83,3 +83,4 @@ test('T14868', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261))], compile_and_run, ['']) test('T14894', normal, compile_and_run, ['']) +test('T14965', normal, compile_and_run, ['']) |