Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fumiaki Kinoshita
GHC
Commits
4bdac331
Commit
4bdac331
authored
Jun 28, 2017
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the in-scope set in TcHsType.instantiateTyN
See Trac #13879
parent
22b917ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcHsType.hs
+6
-1
No files found.
compiler/typecheck/TcHsType.hs
View file @
4bdac331
...
...
@@ -929,11 +929,16 @@ instantiateTyN n ty ki
num_to_inst
=
length
bndrs
-
n
-- NB: splitAt is forgiving with invalid numbers
(
inst_bndrs
,
leftover_bndrs
)
=
splitAt
num_to_inst
bndrs
empty_subst
=
mkEmptyTCvSubst
(
mkInScopeSet
(
tyCoVarsOfType
ki
))
in
if
num_to_inst
<=
0
then
return
(
ty
,
ki
)
else
do
{
(
subst
,
inst_args
)
<-
tcInstBinders
inst_bndrs
do
{
(
subst
,
inst_args
)
<-
tcInstBinders
X
empty_subst
Nothing
inst_bndrs
;
let
rebuilt_ki
=
mkPiTys
leftover_bndrs
inner_ki
ki'
=
substTy
subst
rebuilt_ki
;
traceTc
"instantiateTyN"
(
vcat
[
ppr
ty
<+>
dcolon
<+>
ppr
ki
,
ppr
subst
,
ppr
rebuilt_ki
,
ppr
ki'
])
;
return
(
mkNakedAppTys
ty
inst_args
,
ki'
)
}
---------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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