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
09d24d82
Commit
09d24d82
authored
9 months ago
by
Simon Peyton Jones
Committed by
Marge Bot
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Spelling errors
parent
0dfaeb66
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/GHC/Tc/Types/Constraint.hs
+4
-4
4 additions, 4 deletions
compiler/GHC/Tc/Types/Constraint.hs
with
4 additions
and
4 deletions
compiler/GHC/Tc/Types/Constraint.hs
+
4
−
4
View file @
09d24d82
...
@@ -1342,7 +1342,7 @@ insolubleWC (WC { wc_impl = implics, wc_simple = simples, wc_errors = errors })
...
@@ -1342,7 +1342,7 @@ insolubleWC (WC { wc_impl = implics, wc_simple = simples, wc_errors = errors })
insolubleWantedCt
::
Ct
->
Bool
insolubleWantedCt
::
Ct
->
Bool
-- Definitely insoluble, in particular /excluding/ type-hole constraints
-- Definitely insoluble, in particular /excluding/ type-hole constraints
-- Namely:
-- Namely:
-- a) an insoluble constraint as per 'insoluble
i
rredCt', i.e. either
-- a) an insoluble constraint as per 'insoluble
I
rredCt', i.e. either
-- - an insoluble equality constraint (e.g. Int ~ Bool), or
-- - an insoluble equality constraint (e.g. Int ~ Bool), or
-- - a custom type error constraint, TypeError msg :: Constraint
-- - a custom type error constraint, TypeError msg :: Constraint
-- b) that does not arise from a Given or a Wanted/Wanted fundep interaction
-- b) that does not arise from a Given or a Wanted/Wanted fundep interaction
...
@@ -1356,7 +1356,7 @@ insolubleWantedCt ct
...
@@ -1356,7 +1356,7 @@ insolubleWantedCt ct
,
insolubleIrredCt
ir_ct
,
insolubleIrredCt
ir_ct
-- It's insoluble
-- It's insoluble
,
isEmptyRewriterSet
rewriters
,
isEmptyRewriterSet
rewriters
-- rewriters; see (IW2) in Note [Insoluble Wanteds]
--
It has no
rewriters; see (IW2) in Note [Insoluble Wanteds]
,
not
(
isGivenLoc
loc
)
,
not
(
isGivenLoc
loc
)
-- isGivenLoc: see (IW3) in Note [Insoluble Wanteds]
-- isGivenLoc: see (IW3) in Note [Insoluble Wanteds]
,
not
(
isWantedWantedFunDepOrigin
(
ctLocOrigin
loc
))
,
not
(
isWantedWantedFunDepOrigin
(
ctLocOrigin
loc
))
...
@@ -1456,14 +1456,14 @@ can't be solved. But not quite all such constraints; see wrinkles.
...
@@ -1456,14 +1456,14 @@ can't be solved. But not quite all such constraints; see wrinkles.
(IW1) insolubleWantedCt is tuned for application /after/ constraint
(IW1) insolubleWantedCt is tuned for application /after/ constraint
solving i.e. assuming canonicalisation has been done. That's why
solving i.e. assuming canonicalisation has been done. That's why
it looks only for IrredCt; all insoluble constraints
o
are put into
it looks only for IrredCt; all insoluble constraints are put into
CIrredCan
CIrredCan
(IW2) We only treat it as insoluble if it has an empty rewriter set. (See Note
(IW2) We only treat it as insoluble if it has an empty rewriter set. (See Note
[Wanteds rewrite Wanteds].) Otherwise #25325 happens: a Wanted constraint A
[Wanteds rewrite Wanteds].) Otherwise #25325 happens: a Wanted constraint A
that is /not/ insoluble rewrites some other Wanted constraint B, so B has A
that is /not/ insoluble rewrites some other Wanted constraint B, so B has A
in its rewriter set. Now B looks insoluble. The danger is that we'll
in its rewriter set. Now B looks insoluble. The danger is that we'll
suppress reporting B bec
u
ase of its empty rewriter set; and suppress
suppress reporting B beca
u
se of its empty rewriter set; and suppress
reporting A because there is an insoluble B lying around. (This suppression
reporting A because there is an insoluble B lying around. (This suppression
happens in GHC.Tc.Errors.mkErrorItem.) Solution: don't treat B as insoluble.
happens in GHC.Tc.Errors.mkErrorItem.) Solution: don't treat B as insoluble.
...
...
This diff is collapsed.
Click to expand it.
Simon Peyton Jones
@simonpj
mentioned in commit
ghc/ghc@8ee0a3df
·
4 months ago
mentioned in commit
ghc/ghc@8ee0a3df
mentioned in commit ghc/ghc@8ee0a3df1fe655197c104969d5536d5e2636f5a9
Toggle commit list
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