[commit: ghc] wip/T13861: WIP: another test (f3fd83b)
git at git.haskell.org
git at git.haskell.org
Sat Dec 30 13:14:53 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T13861
Link : http://ghc.haskell.org/trac/ghc/changeset/f3fd83b698bf01e9f1542797ba8a9e666268cb37/ghc
>---------------------------------------------------------------
commit f3fd83b698bf01e9f1542797ba8a9e666268cb37
Author: Gabor Greif <ggreif at gmail.com>
Date: Sat Dec 30 14:14:36 2017 +0100
WIP: another test
>---------------------------------------------------------------
f3fd83b698bf01e9f1542797ba8a9e666268cb37
testsuite/tests/simplStg/should_run/T13861.hs | 8 ++++++++
testsuite/tests/simplStg/should_run/T13861.stdout | 1 +
2 files changed, 9 insertions(+)
diff --git a/testsuite/tests/simplStg/should_run/T13861.hs b/testsuite/tests/simplStg/should_run/T13861.hs
index 6c4f5a0..b4049fc 100644
--- a/testsuite/tests/simplStg/should_run/T13861.hs
+++ b/testsuite/tests/simplStg/should_run/T13861.hs
@@ -49,6 +49,12 @@ lump' Three = Tru
lump' other = unsafeCoerce other -- Zero -> Tru, Two -> Dunno
{-# NOINLINE lump' #-}
+lump'' Zero = True
+lump'' One = False
+lump'' Two = False
+lump'' Three = False
+{-# NOINLINE lump'' #-}
+
nested :: Either Int (Either Int a) -> Either Bool (Maybe a)
nested (Right (Right x)) = Right (Just x)
@@ -115,6 +121,8 @@ test x = do
(same $! r58) $! r59 -- yes, lump is STG identity on 'Fal'
let (r60, r61) = (Two, lump' r60)
(same $! r60) $! r61 -- yes, lump' is STG identity on 'Two'
+ let (r62, r63) = (lump'' One, lump'' Three)
+ (same $! r62) $! r63 -- yes
let (r4,_) = bar r1
let r5 = nested r4
diff --git a/testsuite/tests/simplStg/should_run/T13861.stdout b/testsuite/tests/simplStg/should_run/T13861.stdout
index 2a61dc3..0f920b7 100644
--- a/testsuite/tests/simplStg/should_run/T13861.stdout
+++ b/testsuite/tests/simplStg/should_run/T13861.stdout
@@ -14,5 +14,6 @@ yes
yes
yes
yes
+yes
no
("YAY","foo")
More information about the ghc-commits
mailing list