Skip to content
Snippets Groups Projects
Commit 2f0a101d authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot
Browse files

Add a regression test for #24029

parent f6b2751f
No related branches found
No related tags found
No related merge requests found
{-# 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
#-}
......@@ -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, [''])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment