diff options
Diffstat (limited to 'testsuite/tests/ghc-regress/quasiquotation')
44 files changed, 0 insertions, 456 deletions
diff --git a/testsuite/tests/ghc-regress/quasiquotation/Makefile b/testsuite/tests/ghc-regress/quasiquotation/Makefile deleted file mode 100644 index 96a01ba5bc..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -TOP=../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk - -.PHONY: T4150 - -T4150: - $(RM) T4150A.hi T4150A.o T4150.hi T4150.o - '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T4150A.hs - -'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T4150.hs - diff --git a/testsuite/tests/ghc-regress/quasiquotation/T3953.hs b/testsuite/tests/ghc-regress/quasiquotation/T3953.hs deleted file mode 100644 index 2b17419201..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/T3953.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} - -module T3953 where - -foo = [notDefinedHere| |] - diff --git a/testsuite/tests/ghc-regress/quasiquotation/T3953.stderr b/testsuite/tests/ghc-regress/quasiquotation/T3953.stderr deleted file mode 100644 index da6f2dcebf..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/T3953.stderr +++ /dev/null @@ -1,2 +0,0 @@ - -T3953.hs:5:7: Not in scope: `notDefinedHere' diff --git a/testsuite/tests/ghc-regress/quasiquotation/T4150.hs b/testsuite/tests/ghc-regress/quasiquotation/T4150.hs deleted file mode 100644 index 3bf7cddc49..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/T4150.hs +++ /dev/null @@ -1,16 +0,0 @@ -{-# LANGUAGE CPP, QuasiQuotes #-} - -module Main (main) where - -import T4150A - -myHtmlsTemplate = [multiLineStr| -#include "T4150template.txt" -|] - -somethingElse :: NoSuchType -somethingElse = undefined - -main :: IO () -main = print myHtmlsTemplate - diff --git a/testsuite/tests/ghc-regress/quasiquotation/T4150.stderr b/testsuite/tests/ghc-regress/quasiquotation/T4150.stderr deleted file mode 100644 index 9e0f4c26ab..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/T4150.stderr +++ /dev/null @@ -1,3 +0,0 @@ - -T4150.hs:11:18: - Not in scope: type constructor or class `NoSuchType' diff --git a/testsuite/tests/ghc-regress/quasiquotation/T4150A.hs b/testsuite/tests/ghc-regress/quasiquotation/T4150A.hs deleted file mode 100644 index 25ee003fee..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/T4150A.hs +++ /dev/null @@ -1,13 +0,0 @@ - -module T4150A where - -import Language.Haskell.TH -import Language.Haskell.TH.Quote - -multiLineStr :: QuasiQuoter -multiLineStr = QuasiQuoter { - quoteExp = stringE, - quotePat = error "XXX", - quoteType = error "XXX", - quoteDec = error "XXX" - } diff --git a/testsuite/tests/ghc-regress/quasiquotation/T4150template.txt b/testsuite/tests/ghc-regress/quasiquotation/T4150template.txt deleted file mode 100644 index a92d664bc2..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/T4150template.txt +++ /dev/null @@ -1,3 +0,0 @@ -line 1 -line 2 -line 3 diff --git a/testsuite/tests/ghc-regress/quasiquotation/all.T b/testsuite/tests/ghc-regress/quasiquotation/all.T deleted file mode 100644 index 2fa0427813..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/all.T +++ /dev/null @@ -1,7 +0,0 @@ -test('T3953', [req_interp, only_compiler_types(['ghc'])], compile_fail, ['']) -test('T4150', - [only_compiler_types(['ghc']), - expect_broken(4150), - extra_clean(['T4150A.hi', 'T4150A.o', 'T4150.hi', 'T4150.o'])], - run_command, - ['$MAKE -s --no-print-directory T4150']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq001/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq001/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq001/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq001/qq001.hs b/testsuite/tests/ghc-regress/quasiquotation/qq001/qq001.hs deleted file mode 100644 index 652c8cf874..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq001/qq001.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -module Main where - -parse = undefined - -main :: IO () -main = print $ [parse||] diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq001/qq001.stderr b/testsuite/tests/ghc-regress/quasiquotation/qq001/qq001.stderr deleted file mode 100644 index aa748e60cd..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq001/qq001.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -qq001.hs:7:16: - GHC stage restriction: parse - is used in a quasiquote, and must be imported, not defined locally diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq001/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq001/test.T deleted file mode 100644 index 2db7546687..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq001/test.T +++ /dev/null @@ -1,2 +0,0 @@ -test('qq001', [req_interp, only_compiler_types(['ghc'])], - compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq002/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq002/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq002/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq002/qq002.hs b/testsuite/tests/ghc-regress/quasiquotation/qq002/qq002.hs deleted file mode 100644 index a9ac995e5a..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq002/qq002.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -module Main where - -parse = undefined - -main :: IO () -main = case () of - [parse||] -> return () - _ -> return () diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq002/qq002.stderr b/testsuite/tests/ghc-regress/quasiquotation/qq002/qq002.stderr deleted file mode 100644 index b32b5ac6a0..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq002/qq002.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -qq002.hs:8:10: - GHC stage restriction: parse - is used in a quasiquote, and must be imported, not defined locally diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq002/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq002/test.T deleted file mode 100644 index 2c39664a85..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq002/test.T +++ /dev/null @@ -1,2 +0,0 @@ -test('qq002', [req_interp, only_compiler_types(['ghc'])], - compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq003/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq003/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq003/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq003/qq003.hs b/testsuite/tests/ghc-regress/quasiquotation/qq003/qq003.hs deleted file mode 100644 index 7afbad964e..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq003/qq003.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -module Main where - -main :: IO () -main = print $ \parse -> [parse||] diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq003/qq003.stderr b/testsuite/tests/ghc-regress/quasiquotation/qq003/qq003.stderr deleted file mode 100644 index a1f490fb2c..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq003/qq003.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -qq003.hs:5:26: - GHC stage restriction: parse - is used in a quasiquote, and must be imported, not defined locally diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq003/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq003/test.T deleted file mode 100644 index 9c61d0a11a..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq003/test.T +++ /dev/null @@ -1,2 +0,0 @@ -test('qq003', [req_interp, only_compiler_types(['ghc'])], - compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq004/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq004/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq004/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq004/qq004.hs b/testsuite/tests/ghc-regress/quasiquotation/qq004/qq004.hs deleted file mode 100644 index c95b94ef02..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq004/qq004.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -module Main where - -main :: IO () -main = p undefined - where - p = \parse -> case () of - [parse||] -> return () - _ -> return () diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq004/qq004.stderr b/testsuite/tests/ghc-regress/quasiquotation/qq004/qq004.stderr deleted file mode 100644 index be61788926..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq004/qq004.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -qq004.hs:8:21: - GHC stage restriction: parse - is used in a quasiquote, and must be imported, not defined locally diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq004/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq004/test.T deleted file mode 100644 index 13ecda5dad..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq004/test.T +++ /dev/null @@ -1,2 +0,0 @@ -test('qq004', [req_interp, only_compiler_types(['ghc'])], - compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq005/Expr.hs b/testsuite/tests/ghc-regress/quasiquotation/qq005/Expr.hs deleted file mode 100644 index d628e8d52f..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq005/Expr.hs +++ /dev/null @@ -1,99 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -module Expr where - -import Data.Generics -import Language.Haskell.TH as TH -import Language.Haskell.TH.Quote - -import Text.ParserCombinators.Parsec -import Text.ParserCombinators.Parsec.Char - -data Expr = IntExpr Integer - | AntiIntExpr String - | BinopExpr BinOp Expr Expr - | AntiExpr String - deriving(Typeable, Data) - -data BinOp = AddOp - | SubOp - | MulOp - | DivOp - deriving(Typeable, Data) - -eval :: Expr -> Integer -eval (IntExpr n) = n -eval (BinopExpr op x y) = (opToFun op) (eval x) (eval y) - where - opToFun AddOp = (+) - opToFun SubOp = (-) - opToFun MulOp = (*) - opToFun DivOp = (div) - -small = lower <|> char '_' -large = upper -idchar = small <|> large <|> digit <|> char '\'' - -lexeme p = do{ x <- p; spaces; return x } -symbol name = lexeme (string name) -parens p = between (symbol "(") (symbol ")") p - -_expr :: CharParser st Expr -_expr = term `chainl1` mulop - -term :: CharParser st Expr -term = factor `chainl1` addop - -factor :: CharParser st Expr -factor = parens _expr <|> integer <|> anti - -mulop = do{ symbol "*"; return $ BinopExpr MulOp } - <|> do{ symbol "/"; return $ BinopExpr DivOp } - -addop = do{ symbol "+"; return $ BinopExpr AddOp } - <|> do{ symbol "-"; return $ BinopExpr SubOp } - -integer :: CharParser st Expr -integer = lexeme $ do{ ds <- many1 digit ; return $ IntExpr (read ds) } - -anti = lexeme $ - do symbol "$" - c <- small - cs <- many idchar - return $ AntiIntExpr (c : cs) - -parseExpr :: Monad m => TH.Loc -> String -> m Expr -parseExpr (Loc {loc_filename = file, loc_start = (line,col)}) s = - case runParser p () "" s of - Left err -> fail $ show err - Right e -> return e - where - p = do pos <- getPosition - setPosition $ setSourceName (setSourceLine (setSourceColumn pos col) line) file - spaces - e <- _expr - eof - return e - -expr = QuasiQuoter { quoteExp = parseExprExp, quotePat = parseExprPat } - -parseExprExp :: String -> Q Exp -parseExprExp s = do loc <- location - expr <- parseExpr loc s - dataToExpQ (const Nothing `extQ` antiExprExp) expr - -antiExprExp :: Expr -> Maybe (Q Exp) -antiExprExp (AntiIntExpr v) = Just $ appE (conE (mkName "IntExpr")) - (varE (mkName v)) -antiExprExp (AntiExpr v) = Just $ varE (mkName v) -antiExprExp _ = Nothing - -parseExprPat :: String -> Q Pat -parseExprPat s = do loc <- location - expr <- parseExpr loc s - dataToPatQ (const Nothing `extQ` antiExprPat) expr - -antiExprPat :: Expr -> Maybe (Q Pat) -antiExprPat (AntiIntExpr v) = Just $ conP (mkName "IntExpr") - [varP (mkName v)] -antiExprPat (AntiExpr v) = Just $ varP (mkName v) -antiExprPat _ = Nothing diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq005/Main.hs b/testsuite/tests/ghc-regress/quasiquotation/qq005/Main.hs deleted file mode 100644 index d8c8a3433c..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq005/Main.hs +++ /dev/null @@ -1,13 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -module Main where - -import Expr - -main :: IO () -main = do print $ eval [expr|1 + 3 + 5|] - case [expr|2|] of - [expr|$n|] -> print n - _ -> return () - case [$expr|1 + 2|] of - [expr|$x + $y|] -> putStrLn $ show x ++ " + " ++ show y - _ -> return () diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq005/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq005/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq005/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq005/qq005.stderr b/testsuite/tests/ghc-regress/quasiquotation/qq005/qq005.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq005/qq005.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq005/qq005.stdout b/testsuite/tests/ghc-regress/quasiquotation/qq005/qq005.stdout deleted file mode 100644 index b9473d1e3b..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq005/qq005.stdout +++ /dev/null @@ -1,3 +0,0 @@ -9 -2 -1 + 2 diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq005/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq005/test.T deleted file mode 100644 index 52671ef838..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq005/test.T +++ /dev/null @@ -1,11 +0,0 @@ -test('qq005', - [skip_if_fast, - reqlib('parsec'), - only_compiler_types(['ghc']), - # We'd need to jump through some hoops to run this test the - # profiling ways, due to the TH use, so for now we just - # omit the profiling ways - omit_ways(['profasm','profthreaded']), - extra_clean(['Expr.hi', 'Expr.o', 'Main.hi', 'Main.o'])], - multimod_compile_and_run, - ['Main', '']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq006/Expr.hs b/testsuite/tests/ghc-regress/quasiquotation/qq006/Expr.hs deleted file mode 100644 index d628e8d52f..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq006/Expr.hs +++ /dev/null @@ -1,99 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -module Expr where - -import Data.Generics -import Language.Haskell.TH as TH -import Language.Haskell.TH.Quote - -import Text.ParserCombinators.Parsec -import Text.ParserCombinators.Parsec.Char - -data Expr = IntExpr Integer - | AntiIntExpr String - | BinopExpr BinOp Expr Expr - | AntiExpr String - deriving(Typeable, Data) - -data BinOp = AddOp - | SubOp - | MulOp - | DivOp - deriving(Typeable, Data) - -eval :: Expr -> Integer -eval (IntExpr n) = n -eval (BinopExpr op x y) = (opToFun op) (eval x) (eval y) - where - opToFun AddOp = (+) - opToFun SubOp = (-) - opToFun MulOp = (*) - opToFun DivOp = (div) - -small = lower <|> char '_' -large = upper -idchar = small <|> large <|> digit <|> char '\'' - -lexeme p = do{ x <- p; spaces; return x } -symbol name = lexeme (string name) -parens p = between (symbol "(") (symbol ")") p - -_expr :: CharParser st Expr -_expr = term `chainl1` mulop - -term :: CharParser st Expr -term = factor `chainl1` addop - -factor :: CharParser st Expr -factor = parens _expr <|> integer <|> anti - -mulop = do{ symbol "*"; return $ BinopExpr MulOp } - <|> do{ symbol "/"; return $ BinopExpr DivOp } - -addop = do{ symbol "+"; return $ BinopExpr AddOp } - <|> do{ symbol "-"; return $ BinopExpr SubOp } - -integer :: CharParser st Expr -integer = lexeme $ do{ ds <- many1 digit ; return $ IntExpr (read ds) } - -anti = lexeme $ - do symbol "$" - c <- small - cs <- many idchar - return $ AntiIntExpr (c : cs) - -parseExpr :: Monad m => TH.Loc -> String -> m Expr -parseExpr (Loc {loc_filename = file, loc_start = (line,col)}) s = - case runParser p () "" s of - Left err -> fail $ show err - Right e -> return e - where - p = do pos <- getPosition - setPosition $ setSourceName (setSourceLine (setSourceColumn pos col) line) file - spaces - e <- _expr - eof - return e - -expr = QuasiQuoter { quoteExp = parseExprExp, quotePat = parseExprPat } - -parseExprExp :: String -> Q Exp -parseExprExp s = do loc <- location - expr <- parseExpr loc s - dataToExpQ (const Nothing `extQ` antiExprExp) expr - -antiExprExp :: Expr -> Maybe (Q Exp) -antiExprExp (AntiIntExpr v) = Just $ appE (conE (mkName "IntExpr")) - (varE (mkName v)) -antiExprExp (AntiExpr v) = Just $ varE (mkName v) -antiExprExp _ = Nothing - -parseExprPat :: String -> Q Pat -parseExprPat s = do loc <- location - expr <- parseExpr loc s - dataToPatQ (const Nothing `extQ` antiExprPat) expr - -antiExprPat :: Expr -> Maybe (Q Pat) -antiExprPat (AntiIntExpr v) = Just $ conP (mkName "IntExpr") - [varP (mkName v)] -antiExprPat (AntiExpr v) = Just $ varP (mkName v) -antiExprPat _ = Nothing diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq006/Main.hs b/testsuite/tests/ghc-regress/quasiquotation/qq006/Main.hs deleted file mode 100644 index 7e21acc235..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq006/Main.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -module Main where - -import Expr - -main :: IO () -main = do case [$expr|1 + 2|] of - [$expr|$x + $x|] -> print x - _ -> return () diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq006/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq006/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq006/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq006/qq006.stderr b/testsuite/tests/ghc-regress/quasiquotation/qq006/qq006.stderr deleted file mode 100644 index 3eb51824b0..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq006/qq006.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -Main.hs:8:20: - Conflicting definitions for `x' - In a case alternative diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq006/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq006/test.T deleted file mode 100644 index 21d9a3db1c..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq006/test.T +++ /dev/null @@ -1,7 +0,0 @@ -test('qq006', - [skip_if_fast, - reqlib('parsec'), - extra_clean(['Expr.hi', 'Expr.o']), - only_compiler_types(['ghc'])], - multimod_compile_fail, - ['Main', '-v0']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq007/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq007/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq007/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq007/QQ.hs b/testsuite/tests/ghc-regress/quasiquotation/qq007/QQ.hs deleted file mode 100644 index 3c13315a31..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq007/QQ.hs +++ /dev/null @@ -1,11 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-}
-module QQ where
-
-import Language.Haskell.TH.Quote
-import Language.Haskell.TH
-
-pq = QuasiQuoter { quoteDec = \_ -> [d| f x = x |],
- quoteType = \_ -> [t| Int -> Int |],
- quoteExp = \_ -> [| $(varE (mkName "x")) + 1::Int |],
- quotePat = \_ -> [p| Just x |] }
-
diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq007/Test.hs b/testsuite/tests/ghc-regress/quasiquotation/qq007/Test.hs deleted file mode 100644 index 42cef722d3..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq007/Test.hs +++ /dev/null @@ -1,13 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-}
-module Test where
-
-import QQ
-
-f :: [pq| foo |] -- Expands to Int -> Int
-[pq| blah |] -- Expands to f x = x
-
-h [pq| foo |] = f [pq| blah |] * 8
- -- Expands to h (Just x) = f (x+1) * 8
-
-
-
diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq007/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq007/test.T deleted file mode 100644 index 6b7ef6dcd7..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq007/test.T +++ /dev/null @@ -1,10 +0,0 @@ -test('qq007', - [skip_if_fast, - extra_clean(['QQ.hi', 'QQ.o', 'Test.hi', 'Test.o']), - # We'd need to jump through some hoops to run this test the - # profiling ways, due to the TH use, so for now we just - # omit the profiling ways - omit_ways(['profasm','profthreaded']), - only_compiler_types(['ghc'])], - multimod_compile, - ['Test', '-v0']) diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq008/Makefile b/testsuite/tests/ghc-regress/quasiquotation/qq008/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq008/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq008/QQ.hs b/testsuite/tests/ghc-regress/quasiquotation/qq008/QQ.hs deleted file mode 100644 index eee8dc9670..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq008/QQ.hs +++ /dev/null @@ -1,11 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} -module QQ where - -import Language.Haskell.TH.Quote -import Language.Haskell.TH - -pq = QuasiQuoter { quoteDec = \_ -> [d| f x = x |], - quoteType = \_ -> [t| Int -> Int |], - quoteExp = \_ -> [| $(varE (mkName "x")) + 1::Int |], - quotePat = \_ -> [p| Just x |] } - diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq008/Test.hs b/testsuite/tests/ghc-regress/quasiquotation/qq008/Test.hs deleted file mode 100644 index c04f427f63..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq008/Test.hs +++ /dev/null @@ -1,13 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -module Test where - -import QQ - -f :: [pq| foo |] -- Expands to Int -> Int -[pq| blah |] -- Expands to f x = x - -h [pq| foo |] = f [$pq| blah |] * 8 --- Expands to h (Just x) = f (x+1) * 8 - - - diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq008/qq008.stderr b/testsuite/tests/ghc-regress/quasiquotation/qq008/qq008.stderr deleted file mode 100644 index b13e999463..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq008/qq008.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -Test.hs:9:19: - Warning: Deprecated syntax: - quasiquotes no longer need a dollar sign: $pq diff --git a/testsuite/tests/ghc-regress/quasiquotation/qq008/test.T b/testsuite/tests/ghc-regress/quasiquotation/qq008/test.T deleted file mode 100644 index 02b88dbd0a..0000000000 --- a/testsuite/tests/ghc-regress/quasiquotation/qq008/test.T +++ /dev/null @@ -1,10 +0,0 @@ -test('qq008', - [skip_if_fast, - extra_clean(['QQ.hi', 'QQ.o', 'Test.hi', 'Test.o']), - # We'd need to jump through some hoops to run this test the - # profiling ways, due to the TH use, so for now we just - # omit the profiling ways - omit_ways(['profasm','profthreaded']), - only_compiler_types(['ghc'])], - multimod_compile, - ['Test', '-v0']) |