Commit 0628d60a authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test error message (Trac 844)

parent 9b44c3dc
{-# OPTIONS -fth #-}
-- We should get a civilised report of conflicting variable
-- bindings in the definition spliced in by foo
module TH_spliceD1 where
import TH_spliceD1_Lib
$(foo)
TH_spliceD1.hs:7:2:
Conflicting definitions for `c'
In the definition of `f'
{-# OPTIONS -fth #-}
module TH_spliceD1_Lib where
import Language.Haskell.TH
foo :: Q [Dec]
foo = sequence [funD (mkName "f")
[
clause
[varP $ mkName "c",varP $ mkName "c"]
(normalB $ [| undefined |])
[]
]]
......@@ -21,6 +21,9 @@ test('TH_repPatSig', normal, compile, [''])
test('TH_spliceE5', normal, multimod_compile_and_run, ['TH_spliceE5', '-v0'])
clean(['TH_spliceE5_Lib.hi', 'TH_spliceE5_Lib.o'])
test('TH_spliceD1', normal, multimod_compile_fail, ['TH_spliceD1', '-v0'])
clean(['TH_spliceD1_Lib.hi', 'TH_spliceD1_Lib.o'])
# 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 (-osof p_o) because this is necessary when mixing
......
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