Commit 27d0701d authored by Ian Lynagh's avatar Ian Lynagh

Add test TH_recompile for trac #481 (Recompilation check fails for TH)

parent 543a9a2e
module Main where
import Sub
main = print $x
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# Test for trac #481. GHC should notice that the code that generates
# the splice has changed, and thus re-run it.
clean:
rm -f *.o
rm -f hi
rm -f test test2
rm -f Sub.hs
TH_recompile:
$(MAKE) clean
cp Sub1.hs Sub.hs
ghc -v0 --make -fth Main.hs -o test
cp Sub2.hs Sub.hs
ghc -v0 --make -fth Main.hs -o test2
./test
./test2
def f(opts):
opts.extra_hc_opts = '-fth -package template-haskell'
if (ghc_with_interpreter == 0):
opts.skip = 1
setTestOpts(f)
setTestOpts(only_compiler_types(['ghc']))
setTestOpts(only_ways(['normal']));
test('TH_recompile', normal, run_command, ['$MAKE -s TH_recompile'])
if default_testopts.cleanup != '':
runCmd('$MAKE -C ' + in_testdir('') + ' clean')
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