Add a test case for checking QuasiQuotes module

This commit is contained in:
eagletmt
2013-04-01 15:55:29 +09:00
parent c56b625501
commit 4b77af102b
4 changed files with 20 additions and 2 deletions

5
test/data/Baz.hs Normal file
View File

@@ -0,0 +1,5 @@
{-# LANGUAGE QuasiQuotes #-}
module Baz (baz) where
import Foo (fooQ)
baz = [fooQ| foo bar baz |]

View File

@@ -1,5 +1,9 @@
module Foo (foo) where
module Foo (foo, fooQ) where
import Language.Haskell.TH
import Language.Haskell.TH.Quote (QuasiQuoter(..))
foo :: ExpQ
foo = stringE "foo"
fooQ :: QuasiQuoter
fooQ = QuasiQuoter (litE . stringL) undefined undefined undefined