summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T4201.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T4201.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T4201.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T4201.hs b/testsuite/tests/simplCore/should_compile/T4201.hs
new file mode 100644
index 0000000000..dfebd0534e
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T4201.hs
@@ -0,0 +1,15 @@
+module Eta where
+
+data T = MkT
+newtype Foo = Foo T
+
+lift :: Foo -> T
+lift (Foo x) = bof x
+ -- The point is that we expect
+ -- lift = bof |> co
+ -- not
+ -- lift = \fx -> bof (fx |> co)
+
+bof :: T -> T
+{-# NOINLINE bof #-}
+bof MkT = MkT