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
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
gershomb
GHC
Commits
7cdcd3e1
Commit
7cdcd3e1
authored
6 years ago
by
Roland Senn
Committed by
Marge Bot
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix #12509: ghci -XSafe fails in an inscrutable way
parent
b1e569a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ghc/GHCi/UI/Monad.hs
+9
-4
9 additions, 4 deletions
ghc/GHCi/UI/Monad.hs
testsuite/tests/safeHaskell/ghci/T12509.script
+0
-0
0 additions, 0 deletions
testsuite/tests/safeHaskell/ghci/T12509.script
testsuite/tests/safeHaskell/ghci/all.T
+1
-0
1 addition, 0 deletions
testsuite/tests/safeHaskell/ghci/all.T
with
10 additions
and
4 deletions
ghc/GHCi/UI/Monad.hs
+
9
−
4
View file @
7cdcd3e1
...
...
@@ -511,10 +511,15 @@ compileGHCiExpr expr =
withTempSession
mkTempSession
$
GHC
.
compileExprRemote
expr
where
mkTempSession
hsc_env
=
hsc_env
{
hsc_dflags
=
(
hsc_dflags
hsc_env
)
-- RebindableSyntax can wreak havoc with GHCi in several ways
-- (see #13385 and #14342 for examples), so we take care to disable it
-- for the duration of running expressions that are internal to GHCi.
{
hsc_dflags
=
(
hsc_dflags
hsc_env
)
{
-- Running GHCi's internal expression is incompatible with -XSafe.
-- We temporarily disable any Safe Haskell settings while running
-- GHCi internal expressions. (see #12509)
safeHaskell
=
Sf_None
}
-- RebindableSyntax can wreak havoc with GHCi in several ways
-- (see #13385 and #14342 for examples), so we temporarily
-- disable it too.
`
xopt_unset
`
LangExt
.
RebindableSyntax
-- We heavily depend on -fimplicit-import-qualified to compile expr
-- with fully qualified names without imports.
...
...
This diff is collapsed.
Click to expand it.
testsuite/tests/safeHaskell/ghci/T12509.script
0 → 100644
+
0
−
0
View file @
7cdcd3e1
This diff is collapsed.
Click to expand it.
testsuite/tests/safeHaskell/ghci/all.T
+
1
−
0
View file @
7cdcd3e1
...
...
@@ -18,4 +18,5 @@ test('p16', normal, ghci_script, ['p16.script'])
test
('
p17
',
normalise_version
("
bytestring
"),
ghci_script
,
['
p17.script
'])
# 7172
test
('
p18
',
normalise_version
("
bytestring
"),
ghci_script
,
['
p18.script
'])
test
('
T12509
',
[
extra_hc_opts
('
-XSafe
')],
ghci_script
,
['
T12509.script
'])
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