summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_repE3.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examples/ghc86/TH_repE3.hs')
-rw-r--r--tests/examples/ghc86/TH_repE3.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/examples/ghc86/TH_repE3.hs b/tests/examples/ghc86/TH_repE3.hs
new file mode 100644
index 0000000..488fbe0
--- /dev/null
+++ b/tests/examples/ghc86/TH_repE3.hs
@@ -0,0 +1,20 @@
+-- test the representation of literals and also explicit type annotations
+{-# LANGUAGE TemplateHaskell #-}
+
+module TH_repE1
+where
+
+import Language.Haskell.TH
+
+emptyListExpr :: ExpQ
+emptyListExpr = [| [] |]
+
+singletonListExpr :: ExpQ
+singletonListExpr = [| [4] |]
+
+listExpr :: ExpQ
+listExpr = [| [4,5,6] |]
+
+consExpr :: ExpQ
+consExpr = [| 4:5:6:[] |]
+