From cdf4445a877428f5969f712a95830af38029b9a0 Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Mon, 7 Oct 2019 20:45:40 -0400 Subject: Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. --- .../ref/src/TemplateHaskellQuasiquotes.html | 659 +++++++++++++++++++++ 1 file changed, 659 insertions(+) create mode 100644 hypsrc-test/ref/src/TemplateHaskellQuasiquotes.html (limited to 'hypsrc-test/ref/src/TemplateHaskellQuasiquotes.html') diff --git a/hypsrc-test/ref/src/TemplateHaskellQuasiquotes.html b/hypsrc-test/ref/src/TemplateHaskellQuasiquotes.html new file mode 100644 index 00000000..6552b676 --- /dev/null +++ b/hypsrc-test/ref/src/TemplateHaskellQuasiquotes.html @@ -0,0 +1,659 @@ +
{-# LANGUAGE TemplateHaskell #-}
+
+module TemplateHaskellQuasiquotes where
+
+import Language.Haskell.TH
+
+aDecl :: DecsQ
+aDecl :: DecsQ
+aDecl = [d|
+    bar :: $aType -> [ (Int, String) ]
+    bar $aPattern = $anExpression
+  |]
+
+aPattern :: PatQ
+aPattern :: PatQ
+aPattern = [p|
+    [ aCrazyLongVariableName
+    , _unused
+    , (y, z)
+    , ( $aNumberPattern, "hello")
+    ]
+  |]
+
+aNumberPattern :: PatQ
+aNumberPattern :: PatQ
+aNumberPattern = [p|
+    w @ v @ 4.5
+  |]
+
+anExpression, anExpression2 :: ExpQ
+anExpression :: ExpQ
+anExpression = [e|
+    [ (1 + $anExpression2, "world") ]
+  |]
+anExpression2 :: ExpQ
+anExpression2 = [| (1 + round pi) |]
+
+aType :: TypeQ
+aType :: TypeQ
+aType = [t|
+    [ (Double, String) ]
+  |]
+
+
+
+
\ No newline at end of file -- cgit v1.2.3