diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-02-15 12:01:11 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-18 13:47:32 -0500 |
commit | a4c53e3b00caacf5d103cf4f34017d932971ab67 (patch) | |
tree | 31dfc9613a431b9dcdb367a25ef8c7b95a32498c | |
parent | b5db34576d9b659366b2790ef98e08a854721ef5 (diff) | |
download | haskell-a4c53e3b00caacf5d103cf4f34017d932971ab67.tar.gz |
TypeMap: Use mkTyConTy instead of TyConApp constructor
This allows TypeMap to benefit from the nullary TyConApp sharing
optimisation described in Note [Sharing nullary TyConApps] in
GHC.Core.TyCon.
-rw-r--r-- | compiler/GHC/Core/Map/Type.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Map/Type.hs b/compiler/GHC/Core/Map/Type.hs index 050d19cba5..32b3fe054b 100644 --- a/compiler/GHC/Core/Map/Type.hs +++ b/compiler/GHC/Core/Map/Type.hs @@ -165,7 +165,7 @@ trieMapView ty -- First check for TyConApps that need to be expanded to -- AppTy chains. | Just (tc, tys@(_:_)) <- tcSplitTyConApp_maybe ty - = Just $ foldl' AppTy (TyConApp tc []) tys + = Just $ foldl' AppTy (mkTyConTy tc) tys -- Then resolve any remaining nullary synonyms. | Just ty' <- tcView ty = Just ty' |