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. --- hypsrc-test/ref/src/Quasiquoter.html | 415 +++++++++++++++++++++++++++++++++++ 1 file changed, 415 insertions(+) create mode 100644 hypsrc-test/ref/src/Quasiquoter.html (limited to 'hypsrc-test/ref/src/Quasiquoter.html') diff --git a/hypsrc-test/ref/src/Quasiquoter.html b/hypsrc-test/ref/src/Quasiquoter.html new file mode 100644 index 00000000..ab631e8c --- /dev/null +++ b/hypsrc-test/ref/src/Quasiquoter.html @@ -0,0 +1,415 @@ +
module Quasiquoter ( string ) where
+
+import Language.Haskell.TH.Quote
+import Language.Haskell.TH.Syntax
+
+-- | Quoter for constructing multiline string literals
+string :: QuasiQuoter
+string :: QuasiQuoter
+string = QuasiQuoter :: (String -> Q Exp)
+-> (String -> Q Pat)
+-> (String -> Q Type)
+-> (String -> Q [Dec])
+-> QuasiQuoter
+QuasiQuoter
+  { quoteExp :: String -> Q Exp
+quoteExp = Exp -> Q Exp
+forall (f :: * -> *) a. Applicative f => a -> f a
+pure (Exp -> Q Exp) -> (String -> Exp) -> String -> Q Exp
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. Lit -> Exp
+LitE (Lit -> Exp) -> (String -> Lit) -> String -> Exp
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. String -> Lit
+StringL
+  , quotePat :: String -> Q Pat
+quotePat = String -> Q Pat
+forall a. String -> Q a
+invalidDomain
+  , quoteType :: String -> Q Type
+quoteType = String -> Q Type
+forall a. String -> Q a
+invalidDomain
+  , quoteDec :: String -> Q [Dec]
+quoteDec = String -> Q [Dec]
+forall a. String -> Q a
+invalidDomain
+  }
+  where
+    invalidDomain :: String -> Q a
+    invalidDomain :: String -> Q a
+invalidDomain _ = String -> Q a
+forall (m :: * -> *) a. MonadFail m => String -> m a
+fail "stringQuoter: only valid in expression context"
+
\ No newline at end of file -- cgit v1.2.3