[Git][ghc/ghc][wip/amg/dcoercion] 2 commits: Fix bad multiplicity role in tyConAppFunCo_maybe

sheaf (@sheaf) gitlab at gitlab.haskell.org
Sat May 13 15:59:35 UTC 2023



sheaf pushed to branch wip/amg/dcoercion at Glasgow Haskell Compiler / GHC


Commits:
a175170c by sheaf at 2023-05-13T17:50:46+02:00
Fix bad multiplicity role in tyConAppFunCo_maybe

The function tyConAppFunCo_maybe produces a multiplicity coercion
for the multiplicity argument of the function arrow, except that
it could be at the wrong role if asked to produce a representational
coercion. We fix this by using the 'funRole' function, which computes
the right roles for arguments to the function arrow TyCon.

Fixes #23386

- - - - -
5264cfbd by Adam Gundry at 2023-05-13T17:59:21+02:00
Directed coercions

This patch introduces a slimmer version of coercions, directed coercions,
which store fewer types within them. This more compact representation
considerably speeds up programs which involve many type family
reductions, as the coercion size no longer grows quadratically in
the number of reduction steps.

-------------------------
Metric Decrease:
    LargeRecord
    T12227
    T12545
    T13386
    T3064
    T5030
    T8095
    T9872a
    T9872b
    T9872b_defer
    T9872c
    T9872d
Metric Increase:
    CoOpt_Singletons
    T18223
    T9872a
    T9872b
    T9872c
    T9872d
-------------------------

- - - - -


9 changed files:

- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion.hs-boot
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/FamInstEnv.hs
- + compiler/GHC/Core/FamInstEnv.hs-boot
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b7db69ceb32dbb4161193e9e558b8281e0873cfb...5264cfbd6b81e0fdc5961e63b421bb8017db649f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b7db69ceb32dbb4161193e9e558b8281e0873cfb...5264cfbd6b81e0fdc5961e63b421bb8017db649f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230513/74756541/attachment.html>


More information about the ghc-commits mailing list