[Git][ghc/ghc][master] Add a regression test for #24029
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Oct 4 09:44:58 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
2f0a101d by Krzysztof Gogolewski at 2023-10-04T05:43:42-04:00
Add a regression test for #24029
- - - - -
2 changed files:
- + testsuite/tests/simplCore/should_compile/T24029.hs
- testsuite/tests/simplCore/should_compile/all.T
Changes:
=====================================
testsuite/tests/simplCore/should_compile/T24029.hs
=====================================
@@ -0,0 +1,21 @@
+{-# OPTIONS_GHC -O #-}
+module T24029 (surround) where
+
+data Buffer where
+ Buffer :: !Int -> Buffer
+
+newtype Builder = Builder (Buffer -> Buffer)
+
+c :: Builder -> Builder -> Builder
+c (Builder f) (Builder g) = Builder (\b -> f (g b))
+
+i :: Buffer -> Buffer
+i (Buffer x) = Buffer x
+
+surround :: Builder -> Builder
+surround f = f
+{-# NOINLINE [1] surround #-}
+
+{-# RULES
+"surround/surround" forall a. surround a = c (Builder (i . i)) a
+ #-}
=====================================
testsuite/tests/simplCore/should_compile/all.T
=====================================
@@ -502,3 +502,4 @@ test('T23938', [extra_files(['T23938A.hs'])], multimod_compile, ['T23938', '-O -
test('T23922a', normal, compile, ['-O'])
test('T23952', [extra_files(['T23952a.hs'])], multimod_compile, ['T23952', '-v0 -O'])
test('T24014', normal, compile, ['-dcore-lint'])
+test('T24029', normal, compile, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2f0a101dca5ced29072b87a8f7a030e598d00d1a
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2f0a101dca5ced29072b87a8f7a030e598d00d1a
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231004/2285aae8/attachment-0001.html>
More information about the ghc-commits
mailing list