Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
haskell-wasm
GHC
Commits
f9e4ea40
Commit
f9e4ea40
authored
6 years ago
by
John Ericson
Committed by
Ben Gamari
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Dont refer to `cLeadingUnderscore` in test
Can't use this config entry because it's about to go away
parent
015a21b8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/tests/th/T16180.hs
+16
-10
16 additions, 10 deletions
testsuite/tests/th/T16180.hs
testsuite/tests/th/all.T
+2
-2
2 additions, 2 deletions
testsuite/tests/th/all.T
with
18 additions
and
12 deletions
testsuite/tests/th/T16180.hs
+
16
−
10
View file @
f9e4ea40
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module
Main
where
import
Language.Haskell.TH.Syntax
import
Foreign.C.String
import
Config
-- from "ghc" package
$
(
do
-- some targets (e.g. Darwin) require a "_" symbol prefix...
addForeignSource
LangAsm
(
if
cLeadingUnderscore
==
"YES"
then
".global
\"
_mydata
\"\n\
\
_mydata:
\n\
\
.ascii
\"
Hello world
\\
0
\"\n
"
else
".global
\"
mydata
\"\n\
\
mydata:
\n\
\
.ascii
\"
Hello world
\\
0
\"\n
"
)
-- some targets (e.g. Darwin) require a "_" symbol prefix. Ideally we
-- could reuse FP_LEADING_UNDERSCORE from aclocal.m4 for this
-- somehow, but this hopefully is OK for now.
addForeignSource
LangAsm
$
unlines
#
if
defined
(
darwin_HOST_OS
)
||
(
defined
(
mingw32_HOST_OS
)
&&
WORD_SIZE_IN_BITS
==
32
)
[
".global
\"
_mydata
\"
"
,
"_mydata:"
,
".ascii
\"
Hello world
\\
0
\"
"
]
#
else
[
".global
\"
mydata
\"
"
,
"mydata:"
,
".ascii
\"
Hello world
\\
0
\"
"
]
#
endif
return
[]
)
foreign
import
ccall
"&mydata"
mystring
::
CString
...
...
This diff is collapsed.
Click to expand it.
testsuite/tests/th/all.T
+
2
−
2
View file @
f9e4ea40
...
...
@@ -13,7 +13,7 @@ if config.have_ext_interp :
setTestOpts
(
extra_ways
(['
ext-interp
']))
setTestOpts
(
only_ways
(['
normal
','
ghci
','
ext-interp
']))
broken_tests
=
["
ClosedFam1TH
","
T10620
","
T10828
","
T11721_TH
","
T11797
","
T12045TH2
","
T12478_1
","
T12646
","
T13642
","
T14060
","
T15502
","
T15738
","
T15792
","
T15845
","
T16180
","
T1835
","
T3920
","
T4135
","
T4188
","
T5037
","
T5362
","
T7477
","
T7910
","
T8761
","
T8884
","
T8953
","
T9262
","
T9692
","
T9738
","
TH_Lift
","
TH_RichKinds
","
TH_RichKinds2
","
TH_Roles3
","
TH_TyInstWhere2
","
TH_implicitParams
","
TH_recursiveDo
","
TH_reifyDecl1
","
TH_reifyExplicitForAllFams
","
TH_reifyInstances
","
TH_reifyMkName
","
TH_repE2
","
TH_repGuard
","
TH_repPrim
","
TH_repPrim2
","
TH_repUnboxedTuples
","
TH_spliceE6
","
T16326_TH
"]
broken_tests
=
["
ClosedFam1TH
","
T10620
","
T10828
","
T11721_TH
","
T11797
","
T12045TH2
","
T12478_1
","
T12646
","
T13642
","
T14060
","
T15502
","
T15738
","
T15792
","
T15845
","
T1835
","
T3920
","
T4135
","
T4188
","
T5037
","
T5362
","
T7477
","
T7910
","
T8761
","
T8884
","
T8953
","
T9262
","
T9692
","
T9738
","
TH_Lift
","
TH_RichKinds
","
TH_RichKinds2
","
TH_Roles3
","
TH_TyInstWhere2
","
TH_implicitParams
","
TH_recursiveDo
","
TH_reifyDecl1
","
TH_reifyExplicitForAllFams
","
TH_reifyInstances
","
TH_reifyMkName
","
TH_repE2
","
TH_repGuard
","
TH_repPrim
","
TH_repPrim2
","
TH_repUnboxedTuples
","
TH_spliceE6
","
T16326_TH
"]
# ext-interp, integer-gmp and llvm is broken see #16087
def
broken_ext_interp
(
name
,
opts
):
if
name
in
broken_tests
and
config
.
ghc_built_by_llvm:
...
...
@@ -467,7 +467,7 @@ test('T15437', expect_broken(15437), multimod_compile,
test
('
T15985
',
normal
,
compile
,
[''])
test
('
T16133
',
normal
,
compile_fail
,
[''])
test
('
T15471
',
normal
,
multimod_compile
,
['
T15471.hs
',
'
-v0
'])
test
('
T16180
',
normal
,
compile_and_run
,
['
-package ghc
'])
test
('
T16180
',
normal
,
compile_and_run
,
[''])
test
('
T16183
',
normal
,
compile
,
['
-v0 -ddump-splices -dsuppress-uniques
'])
test
('
T16195
',
normal
,
multimod_compile
,
['
T16195.hs
',
'
-v0
'])
test
('
T16293b
',
normal
,
compile
,
[''])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment