diff options
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T14137.hs')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T14137.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T14137.hs b/testsuite/tests/simplCore/should_compile/T14137.hs new file mode 100644 index 0000000000..f8cbbc251a --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T14137.hs @@ -0,0 +1,15 @@ +module T14137 where + +-- The point of this test is that we should inline 'thunk' +-- into j's RHS, and we can do so quite aggressively, even +-- when we aren't optimising. See the ticket. +-- +-- It's not a big deal, because in the end FloatIn +-- does the same job, only later + +f xs = let thunk = length xs + j = Just thunk + g 0 = j + g n = g (n-1) + in + g 7 |