summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T13543.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T13543.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T13543.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T13543.hs b/testsuite/tests/simplCore/should_compile/T13543.hs
new file mode 100644
index 0000000000..88a0b142b0
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T13543.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE RankNTypes, GADTs #-}
+
+module Foo where
+
+g :: (Int, Int) -> Int
+{-# NOINLINE g #-}
+g (p,q) = p+q
+
+f :: Int -> Int -> Int -> Int
+f x p q
+ = g (let j y = (p,q)
+ {-# NOINLINE j #-}
+ in
+ case x of
+ 2 -> j 3
+ _ -> j 4)
+