Add a test case for checking QuasiQuotes module
This commit is contained in:
5
test/data/Baz.hs
Normal file
5
test/data/Baz.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
module Baz (baz) where
|
||||
import Foo (fooQ)
|
||||
|
||||
baz = [fooQ| foo bar baz |]
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user