Commit 20bcf3d3 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #3395

parent e44d60e0
{-# LANGUAGE TemplateHaskell #-}
module T3395 where
import Language.Haskell.TH
foo = $(return $
[NoBindS (VarE $ mkName "undefined")
,BindS (VarP $ mkName "r1") (VarE $ mkName "undefined") ])
Illegal last statement of a list comprehension:
r1 <- undefined
(It should be an expression.)
When splicing TH expression: [r1 <- undefined | undefined]
In the expression:
$ CompE
[NoBindS (VarE $ mkName "undefined"),
BindS (VarP $ mkName "r1") (VarE $ mkName "undefined")])
In the definition of `foo':
foo = $(return
$ CompE
[NoBindS (VarE $ mkName "undefined"),
BindS (VarP $ mkName "r1") (VarE $ mkName "undefined")])
......@@ -146,3 +146,5 @@ test('T3177', normal, compile, ['-v0'])
test('T3177a', normal, compile_fail, ['-v0'])
test('T3319', normal, compile, ['-ddump-splices -v0'])
test('T3395', normal, compile_fail, ['-v0'])
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