From 3facdf199d720f64ea57dbfbb7cbbcb11afbff55 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 10 Jan 2009 18:29:17 +0000 Subject: Add test for Template Haskell splicing --- tests/tests/TH.hs | 8 +++++ tests/tests/TH.html.ref | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/tests/TH2.hs | 8 +++++ tests/tests/TH2.html.ref | 74 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 182 insertions(+) create mode 100644 tests/tests/TH.hs create mode 100644 tests/tests/TH.html.ref create mode 100644 tests/tests/TH2.hs create mode 100644 tests/tests/TH2.html.ref diff --git a/tests/tests/TH.hs b/tests/tests/TH.hs new file mode 100644 index 00000000..f8178bcb --- /dev/null +++ b/tests/tests/TH.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TH where + +import Language.Haskell.TH + +decl :: Q [Dec] +decl = [d| f x = x|] diff --git a/tests/tests/TH.html.ref b/tests/tests/TH.html.ref new file mode 100644 index 00000000..2c78c271 --- /dev/null +++ b/tests/tests/TH.html.ref @@ -0,0 +1,92 @@ + + +TH
 ContentsIndex
TH
Documentation
decl :: Q [Dec]
Produced by Haddock version 2.4.2
diff --git a/tests/tests/TH2.hs b/tests/tests/TH2.hs new file mode 100644 index 00000000..f8f27710 --- /dev/null +++ b/tests/tests/TH2.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TH2 where + +import TH + +-- we can't add a type sig here, so we get no doc +$( decl ) diff --git a/tests/tests/TH2.html.ref b/tests/tests/TH2.html.ref new file mode 100644 index 00000000..2075f996 --- /dev/null +++ b/tests/tests/TH2.html.ref @@ -0,0 +1,74 @@ + + +TH2
 ContentsIndex
TH2
Produced by Haddock version 2.4.2
-- cgit v1.2.3