Commit 18b74cdb authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

testsuite: Add tests for #15270

Reviewers: alpmestan

Reviewed By: alpmestan

Subscribers: rwbarton, carter

Differential Revision:
parent f582379d
{-# LANGUAGE TemplateHaskell #-}
module T10047A where
import Language.Haskell.TH
-- Passing var name to conE should fail.
x = $(conE 'id)
Illegal data constructor name: ‘id’
When splicing a TH expression:
In the untyped splice: $(conE 'id)
{-# LANGUAGE TemplateHaskell #-}
module T10047B where
import Language.Haskell.TH
-- Passing datacon name to varE should fail.
x = $(varE 'Just)
Illegal variable name: ‘Just’
When splicing a TH expression: GHC.Maybe.Just
In the untyped splice: $(varE 'Just)
......@@ -419,6 +419,8 @@ test('T14885a', normal, compile, [''])
test('T14885b', normal, compile, [''])
test('T14885c', normal, compile, [''])
test('T15243', normal, compile, ['-dsuppress-uniques'])
test('T15270A', normal, compile_fail, [''])
test('T15270B', normal, compile_fail, [''])
test('T15321', normal, compile_fail, [''])
test('T15324', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T15331', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
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