diff options
author | David Feuer <david.feuer@gmail.com> | 2017-11-09 17:54:11 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-11-09 18:31:22 -0500 |
commit | 6b52b4c832f888f7741a4ba0fec1fdac10244f6d (patch) | |
tree | bf8c9b5ab331b717a1c78266db98c6f208a4518d /testsuite/tests/simplCore | |
parent | 0656cb4add7c45382f6a5c3234ad5c75d3e5f112 (diff) | |
download | haskell-6b52b4c832f888f7741a4ba0fec1fdac10244f6d.tar.gz |
Remove unreliable Core Lint empty case checks
Trac #13990 shows that the Core Lint checks for empty case are
unreliable, and very hard to make reliable. The consensus (among
simonpj, nomeata, and goldfire) seems to be that they should be
removed altogether. Do that.
Add test
Reviewers: goldfire, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13990
Differential Revision: https://phabricator.haskell.org/D4161
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T13990.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T13990.hs b/testsuite/tests/simplCore/should_compile/T13990.hs new file mode 100644 index 0000000000..cbf3949af7 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T13990.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE EmptyCase, GADTs #-} + +module T13990 where + +data T a where + TInt :: T Int + +absurd :: T Bool -> a +absurd v = case v of {} + +data Foo = Foo !(T Bool) + +absurdFoo :: Foo -> a +absurdFoo (Foo x) = absurd x diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index e411a6d637..0b85692248 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -284,3 +284,4 @@ test('T14272', normal, compile, ['']) test('T14270a', normal, compile, ['']) test('T14152', [ only_ways(['optasm']), check_errmsg(r'dead code') ], compile, ['-ddump-simpl']) test('T14152a', [ only_ways(['optasm']), check_errmsg(r'dead code') ], compile, ['-fno-exitification -ddump-simpl']) +test('T13990', normal, compile, ['-dcore-lint -O']) |