summaryrefslogtreecommitdiff
path: root/compiler/prelude
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2020-04-08 17:26:55 +0200
committerSebastian Graf <sebastian.graf@kit.edu>2020-04-09 10:36:57 +0200
commit84f0448c56b4a8b37e34fc1ae6faca20c7c1729c (patch)
treea93e2cab653ecee91e6b4e4f2f7a6e7e801bdf3d /compiler/prelude
parent255418da5d264fb2758bc70925adb2094f34adc3 (diff)
downloadhaskell-wip/smaller-coreView.tar.gz
Special case `isConstraintKindCon` on `AlgTyCon`wip/smaller-coreView
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