summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-07 14:31:15 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-13 07:06:49 -0500
commit2d4f9ad89cb7e79c1f90983bf4898a5f4e3c7457 (patch)
tree9c73c3ae3db627e91910929488b9076aa771409d /compiler/iface
parent535d0edc11e66a9a0bdfda676dd614833d86df68 (diff)
downloadhaskell-2d4f9ad89cb7e79c1f90983bf4898a5f4e3c7457.tar.gz
Ensure that coreView/tcView are able to inline
Previously an import cycle between Type and TyCoRep meant that several functions in TyCoRep ended up SOURCE import coreView. This is quite unfortunate as coreView is intended to be fused into a larger pattern match and not incur an extra call. Fix this with a bit of restructuring: * Move the functions in `TyCoRep` which depend upon things in `Type` into `Type` * Fold contents of `Kind` into `Type` and turn `Kind` into a simple wrapper re-exporting kind-ish things from `Type` * Clean up the redundant imports that popped up as a result Closes #17441. Metric Decrease: T4334
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/IfaceType.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs
index 09e7c1a3a8..37355a1329 100644
--- a/compiler/iface/IfaceType.hs
+++ b/compiler/iface/IfaceType.hs
@@ -63,7 +63,7 @@ import GhcPrelude
import {-# SOURCE #-} TysWiredIn ( coercibleTyCon, heqTyCon
, liftedRepDataConTyCon, tupleTyConName )
-import {-# SOURCE #-} TyCoRep ( isRuntimeRepTy )
+import {-# SOURCE #-} Type ( isRuntimeRepTy )
import DynFlags
import TyCon hiding ( pprPromotionQuote )
@@ -964,7 +964,7 @@ defaultRuntimeRepVars ty = go False emptyFsEnv ty
go in_kind _ ty@(IfaceFreeTyVar tv)
-- See Note [Defaulting RuntimeRep variables], about free vars
- | in_kind && TyCoRep.isRuntimeRepTy (tyVarKind tv)
+ | in_kind && Type.isRuntimeRepTy (tyVarKind tv)
= IfaceTyConApp liftedRep IA_Nil
| otherwise
= ty