diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2017-03-06 17:30:52 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-06 18:51:03 -0500 |
commit | 2fa44217c1d9722227297eefb0d6c6aed7e128ca (patch) | |
tree | 75b6650d7a7e54e6f1a2535ec3bdf86167af8827 /testsuite | |
parent | 2f115a13a0fab84f6bc384c9b6159f29ea038d36 (diff) | |
download | haskell-2fa44217c1d9722227297eefb0d6c6aed7e128ca.tar.gz |
Add rule mapFB c (λx.x) = c
Test Plan: exended T2110 with a case for that.
Reviewers: austin, hvr, dfeuer, bgamari
Reviewed By: dfeuer
Subscribers: dfeuer, thomie
Differential Revision: https://phabricator.haskell.org/D3275
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/simplCore/should_run/T2110.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_run/T2110.stdout | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_run/T2110.hs b/testsuite/tests/simplCore/should_run/T2110.hs index 610be095ae..d945fac632 100644 --- a/testsuite/tests/simplCore/should_run/T2110.hs +++ b/testsuite/tests/simplCore/should_run/T2110.hs @@ -5,6 +5,8 @@ import Unsafe.Coerce newtype Age = Age Int +foo :: [Int] -> [Int] +foo = map id fooAge :: [Int] -> [Age] fooAge = map Age fooCoerce :: [Int] -> [Age] @@ -19,6 +21,7 @@ same x y = case reallyUnsafePtrEquality# (unsafeCoerce x) y of main = do let l = [1,2,3] + same (foo l) l same (fooAge l) l same (fooCoerce l) l same (fooUnsafeCoerce l) l diff --git a/testsuite/tests/simplCore/should_run/T2110.stdout b/testsuite/tests/simplCore/should_run/T2110.stdout index 55f7ebb441..4ff957b404 100644 --- a/testsuite/tests/simplCore/should_run/T2110.stdout +++ b/testsuite/tests/simplCore/should_run/T2110.stdout @@ -1,3 +1,4 @@ yes yes yes +yes |