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
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
Alexander Kaznacheev
GHC
Commits
20b25bc6
Commit
20b25bc6
authored
12 years ago
by
Simon Peyton Jones
Committed by
pcapriotti
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't specialise on implicit-parameter arguments in Specalise
This is a fix for Trac #7101 MERGED from commit
2f08f709
parent
2caef4d6
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/specialise/Specialise.lhs
+8
-4
8 additions, 4 deletions
compiler/specialise/Specialise.lhs
with
8 additions
and
4 deletions
compiler/specialise/Specialise.lhs
+
8
−
4
View file @
20b25bc6
...
...
@@ -1573,10 +1573,7 @@ mkCallUDs :: Id -> [CoreExpr] -> UsageDetails
mkCallUDs f args
| not (want_calls_for f) -- Imported from elsewhere
|| null theta -- Not overloaded
|| not (all isClassPred theta)
-- Only specialise if all overloading is on class params.
-- In ptic, with implicit params, the type args
-- *don't* say what the value of the implicit param is!
|| not (all type_determines_value theta)
|| not (spec_tys `lengthIs` n_tyvars)
|| not ( dicts `lengthIs` n_dicts)
|| not (any interestingDict dicts) -- Note [Interesting dictionary arguments]
...
...
@@ -1603,6 +1600,13 @@ mkCallUDs f args
| otherwise = Nothing
want_calls_for f = isLocalId f || isInlinablePragma (idInlinePragma f)
type_determines_value pred = isClassPred pred && not (isIPPred pred)
-- Only specialise if all overloading is on non-IP *class* params,
-- because these are the ones whose *type* determines their *value*.
-- In ptic, with implicit params, the type args
-- *don't* say what the value of the implicit param is!
-- See Trac #7101
\end{code}
Note [Interesting dictionary arguments]
...
...
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