summaryrefslogtreecommitdiff
path: root/compiler/prelude
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2020-04-08 17:26:55 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-09 23:11:21 -0400
commit101fab6ee6cee72b9ffce40e45ebf39466d1c01a (patch)
treec122df48ecbc2e1db472e43d2b6fac5be7b9a9d4 /compiler/prelude
parent045139f40089f288866c1c59c7379be82ecdaf34 (diff)
downloadhaskell-101fab6ee6cee72b9ffce40e45ebf39466d1c01a.tar.gz
Special case `isConstraintKindCon` on `AlgTyCon`
Previously, the `tyConUnique` record selector would unfold into a huge case expression that would be inlined in all call sites, such as the `INLINE`-annotated `coreView`, see #18026. `constraintKindTyConKey` only occurs as the `Unique` of an `AlgTyCon` anyway, so we can make the code a lot more compact, but have to move it to GHC.Core.TyCon. Metric Decrease: T12150 T12234
Diffstat (limited to 'compiler/prelude')
-rw-r--r--compiler/prelude/TysWiredIn.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs
index 4bf7ad6642..682c9d7d8a 100644
--- a/compiler/prelude/TysWiredIn.hs
+++ b/compiler/prelude/TysWiredIn.hs
@@ -639,6 +639,7 @@ typeNatKind = mkTyConTy typeNatKindCon
typeSymbolKind = mkTyConTy typeSymbolKindCon
constraintKindTyCon :: TyCon
+-- 'TyCon.isConstraintKindCon' assumes that this is an AlgTyCon!
constraintKindTyCon = pcTyCon constraintKindTyConName Nothing [] []
liftedTypeKind, typeToTypeKind, constraintKind :: Kind