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
Alex D
GHC
Commits
a192d6b4
Commit
a192d6b4
authored
Aug 07, 2015
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments only
parent
79e0a10e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
compiler/typecheck/TcCanonical.hs
compiler/typecheck/TcCanonical.hs
+2
-2
compiler/typecheck/TcFlatten.hs
compiler/typecheck/TcFlatten.hs
+5
-4
compiler/typecheck/TcSMonad.hs
compiler/typecheck/TcSMonad.hs
+1
-1
No files found.
compiler/typecheck/TcCanonical.hs
View file @
a192d6b4
...
...
@@ -1128,7 +1128,7 @@ canEqTyVarTyVar ev eq_rel swapped tv1 tv2
|
incompat_kind
=
incompatibleKind
ev
xi1
k1
xi2
k2
-- We don't do this any more
-- See Note [Orientation of equalities with fmvs] in Tc
SMonad
-- See Note [Orientation of equalities with fmvs] in Tc
Flatten
-- | isFmvTyVar tv1 = do_fmv swapped tv1 xi1 xi2 co1 co2
-- | isFmvTyVar tv2 = do_fmv (flipSwap swapped) tv2 xi2 xi1 co2 co1
...
...
@@ -1159,7 +1159,7 @@ canEqTyVarTyVar ev eq_rel swapped tv1 tv2
,
cc_rhs
=
xi2
,
cc_eq_rel
=
eq_rel
})
{- We don't do this any more
See Note [Orientation of equalities with fmvs] in Tc
SMonad
See Note [Orientation of equalities with fmvs] in Tc
Flatten
-- tv1 is the flatten meta-var
do_fmv swapped tv1 xi1 xi2 co1 co2
| same_kind
...
...
compiler/typecheck/TcFlatten.hs
View file @
a192d6b4
...
...
@@ -264,8 +264,9 @@ This is a real dilemma. CURRENT SOLUTION:
CFunEqCan F fmv ~ fmv, because fmv := F fmv would make an ininite
type. Instead we unify fmv:=a, AND record that we have done so.
If any such "non-CFunEqCan unifications" take place, iterate the
entire process. This is done by the 'go' loop in solveSimpleWanteds.
If any such "non-CFunEqCan unifications" take place (in
unflatten_eq in TcFlatten.unflatten) iterate the entire process.
This is done by the 'go' loop in solveSimpleWanteds.
This story does not feel right but it's the best I can do; and the
iteration only happens in pretty obscure circumstances.
...
...
@@ -1368,7 +1369,7 @@ unflatten tv_eqs funeqs
;
funeqs
<-
foldrBagM
(
unflatten_funeq
dflags
)
emptyCts
funeqs
;
traceTcS
"Unflattening 1"
$
braces
(
pprCts
funeqs
)
-- Step 2: unify the
irred
s, if possible
-- Step 2: unify the
tv_eq
s, if possible
;
tv_eqs
<-
foldrBagM
(
unflatten_eq
dflags
tclvl
)
emptyCts
tv_eqs
;
traceTcS
"Unflattening 2"
$
braces
(
pprCts
tv_eqs
)
...
...
@@ -1376,7 +1377,7 @@ unflatten tv_eqs funeqs
;
funeqs
<-
mapBagM
finalise_funeq
funeqs
;
traceTcS
"Unflattening 3"
$
braces
(
pprCts
funeqs
)
-- Step 4: remove any
irred
s that look like ty ~ ty
-- Step 4: remove any
tv_eq
s that look like ty ~ ty
;
tv_eqs
<-
foldrBagM
finalise_eq
emptyCts
tv_eqs
;
let
all_flat
=
tv_eqs
`
andCts
`
funeqs
...
...
compiler/typecheck/TcSMonad.hs
View file @
a192d6b4
...
...
@@ -994,7 +994,7 @@ Note [Examples of how the inert_model helps completeness]
[D] d4: fmv2 ~ a
At this point we are stuck so we unflatten this set:
See Note [Orientation of equalities with fmvs]
See Note [Orientation of equalities with fmvs]
in TcFlatten
[W] w1: F fmv2 ~ fmv1
[W] w2: UnF fmv1 ~ fmv2
[W] w5: fmv1 ~ fsk1
...
...
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