diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-07-28 15:30:08 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-02 04:15:41 -0400 |
commit | 901c79d8de49dee9562845e846e9aa3665acd6c4 (patch) | |
tree | 56b2152bd37f96296e52c2fb766f61a6861bac6a /testsuite | |
parent | 3968cd0c9282ea88b3952133f1c0ceb29bb23e03 (diff) | |
download | haskell-901c79d8de49dee9562845e846e9aa3665acd6c4.tar.gz |
Lookup string literals in top-level thunks (fix #16373)
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T16373.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T16373.stderr | 13 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 1 |
3 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T16373.hs b/testsuite/tests/simplCore/should_compile/T16373.hs new file mode 100644 index 0000000000..e8346ca30a --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16373.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE DataKinds #-} +{-# OPTIONS_GHC -ddump-simpl -dsuppress-all -dno-typeable-binds -O2 #-} + +module Test2 where + +import GHC.TypeLits +import Data.Proxy + +testAA :: Bool +testAA = symbolVal (Proxy :: Proxy "A") == symbolVal (Proxy :: Proxy "A") + +testAB :: Bool +testAB = symbolVal (Proxy :: Proxy "A") == symbolVal (Proxy :: Proxy "B") diff --git a/testsuite/tests/simplCore/should_compile/T16373.stderr b/testsuite/tests/simplCore/should_compile/T16373.stderr new file mode 100644 index 0000000000..0fe8484609 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16373.stderr @@ -0,0 +1,13 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core + = {terms: 4, types: 2, coercions: 0, joins: 0/0} + +-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} +testAB = False + +-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} +testAA = True + + + diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index dbec3b3066..25296eda0f 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -370,3 +370,4 @@ test('T19890', [ grep_errmsg(r'= T19890.foo1') ], compile, ['-O -ddump-simpl']) test('T20125', [ grep_errmsg(r'= T20125.MkT') ], compile, ['-O -ddump-simpl -dsuppress-uniques']) test('T20143', [ grep_errmsg(r'unsafeEqualityProof') ], compile, ['-O -ddump-simpl -dsuppress-uniques']) test('T20174', normal, compile, ['']) +test('T16373', normal, compile, ['']) |