summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T17804.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/th/T17804.hs')
-rw-r--r--testsuite/tests/th/T17804.hs26
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/th/T17804.hs b/testsuite/tests/th/T17804.hs
new file mode 100644
index 0000000000..152812a728
--- /dev/null
+++ b/testsuite/tests/th/T17804.hs
@@ -0,0 +1,26 @@
+{-# OPTIONS_GHC -Wimplicit-lift #-}
+{-# LANGUAGE TemplateHaskell #-}
+module T17804 where
+
+import Language.Haskell.TH.Syntax
+
+warning1 :: Lift t => t -> Q Exp
+warning1 x = [| x |]
+
+warning2 :: Lift t => t -> Code Q t
+warning2 x = [|| x ||]
+
+noWarning1 :: Q Exp
+noWarning1 = [| \x -> x |]
+
+noWarning2 :: Code Q (a -> a)
+noWarning2 = [|| \x -> x ||]
+
+i :: Int
+i = 0
+
+noWarning3 :: Q Exp
+noWarning3 = [| i |]
+
+noWarning4 :: Code Q Int
+noWarning4 = [|| i ||]