Commit 2c5e4568 authored by Ian Lynagh's avatar Ian Lynagh

Fix TH_spliceE5 in the parallel testsuite

parent 18cb7795
{-# OPTIONS -fglasgow-exts #-}
module Main where
import TH_spliceE5_prof_Lib
v1 = "foo"
main = putStrLn $(expandVars ["v1","v2"])
-- The splice expands to refer to both v1 and v2,
-- and the test checks that we don't dependency-analyse
-- the program so that one or the other isn't in scope
-- to the type checker
v2 = "bar"
{-# OPTIONS -fglasgow-exts #-}
module TH_spliceE5_prof_Lib where
import Language.Haskell.TH
expandVars :: [String] -> Q Exp
expandVars s = [| concat $(return (ListE (map f s))) |]
f x = VarE (mkName x)
......@@ -20,7 +20,10 @@ test('TH_repGuard', normal, compile, ['-v0'])
test('TH_repGuardOutput', normal, compile_and_run, [''])
test('TH_repPatSig', normal, compile_fail, [''])
test('TH_spliceE5', normal, multimod_compile_and_run, ['TH_spliceE5.hs', '-v0'])
extra_clean(['TH_spliceE5_Lib.hi', 'TH_spliceE5_Lib.o']),
['TH_spliceE5.hs', '-v0'])
# Testing profiling with TH is a bit tricky; we've already disabled
# the prof way above, and also we want to add options specifically for
# profiling (-osuf p_o) because this is necessary when mixing
......@@ -29,11 +32,10 @@ test('TH_spliceE5', normal, multimod_compile_and_run, ['TH_spliceE5.hs', '-v0'])
extra_clean(['TH_spliceE5_Lib.p_o', 'TH_spliceE5_Lib.hi',
'TH_spliceE5.hi', 'TH_spliceE5.p_o'])],
extra_clean(['TH_spliceE5_prof_Lib.p_o', 'TH_spliceE5_prof_Lib.hi',
['TH_spliceE5.hs', '-v0 -prof -auto-all -osuf p_o'])
['TH_spliceE5_prof.hs', '-v0 -prof -auto-all -osuf p_o'])
extra_clean(['TH_spliceD1_Lib.hi', 'TH_spliceD1_Lib.o']),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment