diff options
Diffstat (limited to 'testsuite/tests/arityanal/should_compile/T18870.hs')
-rw-r--r-- | testsuite/tests/arityanal/should_compile/T18870.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/arityanal/should_compile/T18870.hs b/testsuite/tests/arityanal/should_compile/T18870.hs new file mode 100644 index 0000000000..b94fd13ffb --- /dev/null +++ b/testsuite/tests/arityanal/should_compile/T18870.hs @@ -0,0 +1,12 @@ +{-# OPTIONS_GHC -O2 -fforce-recomp #-} + +module T18870 where + +import GHC.Exts + +-- This function should not lead to an "Exciting arity" DEBUG message. +-- It should only do one round of fixed-point iteration to conclude that it has +-- arity 2. +f :: [a] -> a -> a +f [] = id +f (x:xs) = oneShot (\_ -> f xs x) |