[Git][ghc/ghc][wip/sjakobi/regression-tests-2] Add regression test for #12640
Simon Jakobi pushed to branch wip/sjakobi/regression-tests-2 at Glasgow Haskell Compiler / GHC Commits: ec46588f by Simon Jakobi at 2026-03-04T22:04:05+01:00 Add regression test for #12640 Closes #12640. - - - - - 3 changed files: - + testsuite/tests/simplCore/should_compile/T12640.hs - + testsuite/tests/simplCore/should_compile/T12640.stderr - testsuite/tests/simplCore/should_compile/all.T Changes: ===================================== testsuite/tests/simplCore/should_compile/T12640.hs ===================================== @@ -0,0 +1,18 @@ +{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} +module T12640 where + +class Ex2 a b c | a b -> c where + (+++) :: a -> b -> c + +instance Ex2 Bool Bool Bool where + (+++) = ex_or + +{-# INLINE [2] ex_or #-} +ex_or = (||) + +{-# RULES +"force-inline" forall a b . ex_or a b = a || b + #-} + +main = print (True +++ True) + ===================================== testsuite/tests/simplCore/should_compile/T12640.stderr ===================================== @@ -0,0 +1,2 @@ +Rule fired: Class op show (BUILTIN) +Rule fired: force-inline (T12640) ===================================== testsuite/tests/simplCore/should_compile/all.T ===================================== @@ -227,6 +227,7 @@ test('T9509', test('T12603', normal, makefile_test, ['T12603']) +test('T12640', [grep_errmsg(r'force-inline')], compile, ['-O2 -ddump-rule-firings']) test('T12877', normal, makefile_test, ['T12877']) test('T13027', normal, compile, ['']) test('T13025', View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ec46588f79d0048138afd7049af90c80... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ec46588f79d0048138afd7049af90c80... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)