[Git][ghc/ghc][wip/ani/T27156] revert th test
Apoorv Ingle pushed to branch wip/ani/T27156 at Glasgow Haskell Compiler / GHC Commits: ba9730bd by Apoorv Ingle at 2026-07-31T16:51:29-05:00 revert th test - - - - - 2 changed files: - testsuite/tests/th/T18102b.hs - testsuite/tests/th/T18102b_aux.hs Changes: ===================================== testsuite/tests/th/T18102b.hs ===================================== @@ -1,47 +1,9 @@ -{-# LANGUAGE TemplateHaskell, RebindableSyntax #-} +{-# LANGUAGE TemplateHaskell #-} -import Prelude import T18102b_aux -x1 :: Int -x1 = $$(intQuote_TTH) - -z1 :: Int -z1 = $(intQuote_TH) - -x2 :: Char -x2 = $$(charQuote_TTH) - -z2 :: Char -z2 = $(charQuote_TH) - -x3 :: [Int] -x3 = $$(seqQuote_TTH) - -z3 :: [Int] -z3 = $(seqQuote_TH) - -x4 :: [Int] -x4 = $$(listQuote_TTH) - -z4 :: [Int] -z4 = $(listQuote_TH) - +x :: Int +x = $$(intQuote) main :: IO () -main = do - print t1 - print x1 - print z1 - - print t2 - print x2 - print z2 - - print t3 - print x3 - print z3 - - print t4 - print x4 - print z4 +main = print x ===================================== testsuite/tests/th/T18102b_aux.hs ===================================== @@ -1,60 +1,11 @@ -{-# LANGUAGE RebindableSyntax, TemplateHaskell, OverloadedLists #-} +{-# LANGUAGE RebindableSyntax, TemplateHaskell #-} module T18102b_aux where -import Prelude hiding ((>>=), return ) +import Prelude import Language.Haskell.TH.Syntax - - ifThenElse :: Bool -> Int -> Int -> Int ifThenElse _ a b = a+b -intQuote_TTH :: Code Q Int -intQuote_TTH = [|| if True then 10 else 15 ||] - -intQuote_TH :: Quote m => m Exp -intQuote_TH = [| if True then 10 else 15 |] - -t1 :: Int -t1 = if True then 10 else 15 - - -(>>=) :: a -> ((forall b . b) -> c) -> c -a >>= f = f undefined -return _ = 'b' -fail s = undefined - -t2 :: Char -t2 = do { return 'k' } - -charQuote_TTH :: Code Q Char -charQuote_TTH = [|| do { return 'k' } ||] - -charQuote_TH :: Quote m => m Exp -charQuote_TH = [| do { return 'k' } |] - -fromListN :: Int -> [Int] -> [Int] -fromListN _ l = replicate (length l) (length l) - -fromList :: [Int] -> [Int] -fromList x = replicate (length x) (length x) - - -t3 :: [Int] -t3 = [2..7] - -seqQuote_TTH :: Code Q [Int] -seqQuote_TTH = [|| [2..7] ||] - -seqQuote_TH :: Quote m => m Exp -seqQuote_TH = [| [2..7] |] - - -t4 :: [Int] -t4 = [1,2,3] - -listQuote_TTH :: Code Q [Int] -listQuote_TTH = [|| [1,2,3] ||] - -listQuote_TH :: Quote m => m Exp -listQuote_TH = [| [1,2,3] |] +intQuote :: Code Q Int +intQuote = [|| if True then 10 else 15 ||] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ba9730bd09cdde5164950bceb035768c... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ba9730bd09cdde5164950bceb035768c... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Apoorv Ingle (@ani)