summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/InlinePatSyn_NoInlineBuilder.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/InlinePatSyn_NoInlineBuilder.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/InlinePatSyn_NoInlineBuilder.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/InlinePatSyn_NoInlineBuilder.hs b/testsuite/tests/typecheck/should_compile/InlinePatSyn_NoInlineBuilder.hs
new file mode 100644
index 0000000000..39b265e937
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/InlinePatSyn_NoInlineBuilder.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE PatternSynonyms #-}
+
+module InlinePatSyn_NoInlineBuilder where
+
+-- Pattern with "NOINLINE" pragma, neither builder nor matcher should be inlined
+pattern NonInlinablePattern a = Left a
+{-# NOINLINE NonInlinablePattern #-}
+
+testNonBuilder x = NonInlinablePattern (x+1)