Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5592baae
Commit
5592baae
authored
Sep 20, 2008
by
simonpj
Browse files
Add tests for Trac
#2597
parent
e1481671
Changes
6
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/th/T2597a.hs
0 → 100644
View file @
5592baae
{-# LANGUAGE TemplateHaskell #-}
-- Test Trac #2597 (first bug)
module
ShouldCompile
where
import
T2597a_Lib
bug
=
$
mkBug
testsuite/tests/ghc-regress/th/T2597a_Lib.hs
0 → 100644
View file @
5592baae
{-# LANGUAGE TemplateHaskell #-}
-- Library module for T2597a
module
T2597a_Lib
where
import
Language.Haskell.TH
mkBug
::
ExpQ
mkBug
=
return
$
CompE
[
BindS
(
VarP
$
mkName
"p"
)
(
ListE
[]
),
NoBindS
(
VarE
$
mkName
"p"
)]
testsuite/tests/ghc-regress/th/T2597b.hs
0 → 100644
View file @
5592baae
{-# LANGUAGE TemplateHaskell #-}
-- Test Trac #2597 (second bug)
module
ShouldCompile
where
import
T2597b_Lib
bug2
=
$
mkBug2
testsuite/tests/ghc-regress/th/T2597b.stderr
0 → 100644
View file @
5592baae
T2597b.hs:8:7:
Empty stmt list in do-block
When splicing generated code into the program
When splicing TH expression: DoE []
In the expression: $mkBug2
In the definition of `bug2': bug2 = $mkBug2
testsuite/tests/ghc-regress/th/T2597b_Lib.hs
0 → 100644
View file @
5592baae
{-# LANGUAGE TemplateHaskell #-}
-- Library module for T2597b
module
T2597b_Lib
where
import
Language.Haskell.TH
mkBug2
::
ExpQ
mkBug2
=
return
$
DoE
[]
testsuite/tests/ghc-regress/th/all.T
View file @
5592baae
...
...
@@ -66,6 +66,16 @@ test('TH_spliceDecl4',
multimod_compile
,
['
TH_spliceDecl4
',
'
-v0
'])
test
('
T2597a
',
extra_clean
(['
T2597a_Lib.hi
',
'
T2597a_Lib.o
']),
multimod_compile
,
['
T2597a
',
'
-v0
'])
test
('
T2597b
',
extra_clean
(['
T2597b_Lib.hi
',
'
T2597b_Lib.o
']),
multimod_compile_fail
,
['
T2597b
',
'
-v0
'])
test
('
TH_spliceE1
',
normal
,
compile_and_run
,
[''])
test
('
TH_spliceExpr1
',
normal
,
compile
,
['
-v0
'])
test
('
TH_spliceE3
',
normal
,
compile
,
['
-v0
'])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment