diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-26 09:09:32 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-26 17:23:56 -0800 |
commit | c5384a33c0488d7e1274ba5579a24cf733eee934 (patch) | |
tree | 5526bf2ad746db20296242fa73227992b667da95 /tests/Tests | |
parent | 422bba202ef6731f0487880f08200f5dc9d6bbb0 (diff) | |
download | pandoc-c5384a33c0488d7e1274ba5579a24cf733eee934.tar.gz |
Updates for compiling with ghc 7.
We now use a CPP trick to have compatible quasiquotes that
work in both GHC 6.12 and 7.
Diffstat (limited to 'tests/Tests')
-rw-r--r-- | tests/Tests/Helpers.hs | 8 | ||||
-rw-r--r-- | tests/Tests/Writers/ConTeXt.hs | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/Tests/Helpers.hs b/tests/Tests/Helpers.hs index 53bad097e..b8d6b83a7 100644 --- a/tests/Tests/Helpers.hs +++ b/tests/Tests/Helpers.hs @@ -20,15 +20,17 @@ import Test.HUnit (assertBool) import Text.Pandoc.Shared (normalize, defaultWriterOptions, WriterOptions(..), removeTrailingSpace) import Text.Pandoc.Writers.Native (writeNative) -import Language.Haskell.TH.Quote +import Language.Haskell.TH.Quote (QuasiQuoter(..)) import Language.Haskell.TH.Syntax (Q, runIO) import qualified Test.QuickCheck.Property as QP import System.Console.ANSI import Data.Algorithm.Diff lit :: QuasiQuoter -lit = QuasiQuoter ((\a -> let b = rnl a in [|b|]) . filter (/= '\r')) $ - error "Cannot use lit as a pattern" +lit = QuasiQuoter { + quoteExp = (\a -> let b = rnl a in [|b|]) . filter (/= '\r') + , quotePat = error "Cannot use lit as a pattern" + } where rnl ('\n':xs) = xs rnl xs = xs diff --git a/tests/Tests/Writers/ConTeXt.hs b/tests/Tests/Writers/ConTeXt.hs index db01e1560..ab8efee3d 100644 --- a/tests/Tests/Writers/ConTeXt.hs +++ b/tests/Tests/Writers/ConTeXt.hs @@ -52,7 +52,7 @@ tests = [ testGroup "inline code" bulletList [plain (text "top") ,bulletList [plain (text "next") ,bulletList [plain (text "bot")]]] - =?> [$lit| + =?> [_LIT| \startitemize \item top |