summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T23036.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/th/T23036.hs')
-rw-r--r--testsuite/tests/th/T23036.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/th/T23036.hs b/testsuite/tests/th/T23036.hs
new file mode 100644
index 0000000000..f841ede059
--- /dev/null
+++ b/testsuite/tests/th/T23036.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T23036 where
+
+import Language.Haskell.TH
+
+a, b, c :: ()
+a = $([|let x = undefined in ()|])
+b = $([|let !x = undefined in ()|])
+c = $([|let ~x = undefined in ()|])
+
+-- Test strictness annotations are also correctly handled in function and pattern binders
+d, e, f:: ()
+d = $([|let !(x,y) = undefined in ()|])
+e = $([|let (!x,y,~z) = undefined in ()|])
+f = $([|let f !x ~y z = undefined in ()|])
+