Commit d1a5be8f authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a test for #4255: can't use TH with a profiled compiler

parent 9fd203ab
......@@ -298,6 +298,12 @@ def if_compiler_profiled( f ):
return normal
def unless_compiler_profiled( f ):
if config.compiler_profiled:
return normal
return f
def if_compiler_lt( compiler, version, f ):
if config.compiler_type == compiler and \
version_lt(config.compiler_version, version):
{-# LANGUAGE TemplateHaskell #-}
module T4255 where
f x = $([| x |])
ghc: T4255.hs:2:14-28: You can't use Template Haskell with a profiled compiler
Usage: For basic information, try the `--help' option.
# This test needs to come before the setTestOpts calls below, as we want
# to run it !if_compiler_profiled
test('T4255', unless_compiler_profiled(skip), compile_fail, ['-v0'])
def f(opts):
opts.extra_hc_opts = '-XTemplateHaskell -package template-haskell'
if (ghc_with_interpreter == 0):
Supports Markdown
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