summaryrefslogtreecommitdiff
path: root/test2.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test2.hs')
-rw-r--r--test2.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/test2.hs b/test2.hs
new file mode 100644
index 0000000000..1191f4096d
--- /dev/null
+++ b/test2.hs
@@ -0,0 +1,16 @@
+module Lib (g) where
+
+{-# RULES
+ "blah" forall x . f x x = sf x
+#-}
+
+f :: Int -> Int -> (Int, Int)
+f x y = (sum [0..x], sum [1..2*y])
+{-# NOINLINE f #-}
+
+sf :: Int -> (Int, Int)
+sf x = (sum [0..x], sum [1..2*x])
+{-# NOINLINE sf #-}
+
+g :: Int
+g = case f 42 42 of (a, _) -> a + 1