diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-02-15 12:01:11 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-02-16 01:25:40 -0500 |
commit | 870ccaeb818086b1a4c2e00f3ef761729eabf9fd (patch) | |
tree | 6ccc468b110f6465f8e1caa6104c44b384086221 | |
parent | 0337540eb3991371ecbeb0866b065bda694af906 (diff) | |
download | haskell-wip/mkTyConTy.tar.gz |
TypeMap: Use mkTyConTy instead of TyConApp constructorwip/mkTyConTy
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' |