-
Trac #14735 (derived from Trac #11735) found that 75% of compile time was being spent in simplCast. This patch is the first in a series to deal with that problem. This particular patch actually has very little effect on performance; it just refactors simplCast so that it builds Refl coercions less often. Refl coercions require us to compute the type to put inside them, and even if that's done lazily it is still work and code. Instead we use Maybe Coercion with Nothing for Refl. This change also percolates to pushCoTyArg and pushValArg. Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14737 Differential Revision: https://phabricator.haskell.org/D4395
7bb7f991