Commit a4c53e3b authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

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
parent b5db3457
......@@ -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'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment