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
Terraform modules
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
Gregory Gerasev
GHC
Commits
9882db62
Commit
9882db62
authored
3 years ago
by
Richard Eisenberg
Committed by
Ben Gamari
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Flip some bits (directions of coercions in rewriting)
parent
177d6a78
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/GHC/Tc/Solver/Rewrite.hs
+4
-4
4 additions, 4 deletions
compiler/GHC/Tc/Solver/Rewrite.hs
with
4 additions
and
4 deletions
compiler/GHC/Tc/Solver/Rewrite.hs
+
4
−
4
View file @
9882db62
...
...
@@ -551,20 +551,20 @@ rewrite_one (FunTy { ft_af = vis, ft_mult = mult, ft_arg = ty1, ft_res = ty2 })
(
rewrite_one
res_rep
)
;
role
<-
getRole
;
let
arg_rep_co
=
snd
arg_rep_redn
;
let
arg_rep_co
=
mkSymCo
(
snd
arg_rep_redn
)
-- :: arg_rep ~ arg_rep_xi
arg_ki_co
=
mkTyConAppCo
Nominal
tYPETyCon
[
arg_rep_co
]
-- :: TYPE arg_rep ~ TYPE arg_rep_xi
casted_arg_redn
=
(
mkCastTy
arg_xi
arg_ki_co
,
mkCoherence
Righ
tCo
role
arg_xi
arg_ki_co
arg_co
,
mkCoherence
Lef
tCo
role
arg_xi
arg_ki_co
arg_co
)
-- :: ty1 ~> arg_xi |> arg_ki_co
res_ki_co
=
mkTyConAppCo
Nominal
tYPETyCon
[
snd
res_rep_redn
]
res_ki_co
=
mkTyConAppCo
Nominal
tYPETyCon
[
mkSymCo
$
snd
res_rep_redn
]
casted_res_redn
=
(
mkCastTy
res_xi
res_ki_co
,
mkCoherence
Righ
tCo
role
res_xi
res_ki_co
res_co
,
mkCoherence
Lef
tCo
role
res_xi
res_ki_co
res_co
)
-- We must rewrite the representations, because that's what would
...
...
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