diff options
author | M Farkas-Dyck <strake888@proton.me> | 2022-09-18 20:23:23 -0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-08 12:53:55 -0500 |
commit | 68f49874aa217c2222c80c596ef11ffd992b459a (patch) | |
tree | 215cafabd967e33b9d1c70182474d3690d1767fa /compiler/GHC/Tc/Utils | |
parent | 5fe11fe612e1881bd4d1b9d5950d0d801e08e159 (diff) | |
download | haskell-68f49874aa217c2222c80c596ef11ffd992b459a.tar.gz |
Define `Infinite` list and use where appropriate.
Also add perf test for infinite list fusion.
In particular, in `GHC.Core`, often we deal with infinite lists of roles. Also in a few locations we deal with infinite lists of names.
Thanks to simonpj for helping to write the Note [Fusion for `Infinite` lists].
Diffstat (limited to 'compiler/GHC/Tc/Utils')
-rw-r--r-- | compiler/GHC/Tc/Utils/TcType.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Utils/TcType.hs b/compiler/GHC/Tc/Utils/TcType.hs index eae089c203..c0f42e056f 100644 --- a/compiler/GHC/Tc/Utils/TcType.hs +++ b/compiler/GHC/Tc/Utils/TcType.hs @@ -976,7 +976,7 @@ any_rewritable role tv_pred tc_pred should_expand go_tc NomEq bvs _ tys = any (go NomEq bvs) tys go_tc ReprEq bvs tc tys = any (go_arg bvs) - (tyConRolesRepresentational tc `zip` tys) + (tyConRoleListRepresentational tc `zip` tys) go_arg bvs (Nominal, ty) = go NomEq bvs ty go_arg bvs (Representational, ty) = go ReprEq bvs ty |