diff options
Diffstat (limited to 'testsuite/tests/stranal/should_compile/T20746b.hs')
-rw-r--r-- | testsuite/tests/stranal/should_compile/T20746b.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/stranal/should_compile/T20746b.hs b/testsuite/tests/stranal/should_compile/T20746b.hs new file mode 100644 index 0000000000..6804fb4449 --- /dev/null +++ b/testsuite/tests/stranal/should_compile/T20746b.hs @@ -0,0 +1,14 @@ +module T20746b where + +mightThrow :: Int -> IO Int +{-# NOINLINE mightThrow #-} +mightThrow n = return n + +-- Should not unbox trp +-- Recursive because if it's too small +-- we don't do worker/wrapper at all +f :: Bool -> (Int, Int, Int) -> IO (Int, Int, Int) +f False trp = f True trp +f True trp@(a,b,c) = do + _ <- mightThrow a -- this potentially throwing IO action should not force unboxing of trp + return trp |