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

testsuite: Add tests for #15270

Reviewers: alpmestan

Reviewed By: alpmestan

Subscribers: rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5216
parent f582379d
{-# LANGUAGE TemplateHaskell #-}
module T10047A where
import Language.Haskell.TH
-- Passing var name to conE should fail.
x = $(conE 'id)
T15270A.hs:8:7:
Illegal data constructor name: ‘id’
When splicing a TH expression: GHC.Base.id
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)
T15270B.hs:8:7:
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