summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T21948.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T21948.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T21948.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T21948.hs b/testsuite/tests/simplCore/should_compile/T21948.hs
new file mode 100644
index 0000000000..5354bd0020
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T21948.hs
@@ -0,0 +1,10 @@
+module T21948 where
+
+import GHC.Int( Int64 )
+
+nf' :: (b -> ()) -> (a -> b) -> a -> (Int64 -> IO ())
+nf' reduce f x = go
+ where
+ go n | n <= 0 = return ()
+ | otherwise = let !y = f x
+ in reduce y `seq` go (n-1)