aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-api/src/Haddock')
-rw-r--r--haddock-api/src/Haddock/Convert.hs7
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs4
2 files changed, 6 insertions, 5 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index b59602b6..f01a54bf 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -45,7 +45,7 @@ import GHC.Builtin.Types.Prim ( alphaTyVars )
import GHC.Builtin.Types ( eqTyConName, listTyConName, liftedTypeKindTyConName
, unitTy, promotedNilDataCon, promotedConsDataCon )
import GHC.Builtin.Names ( hasKey, eqTyConKey, ipClassKey, tYPETyConKey
- , liftedRepDataConKey )
+ , liftedDataConKey, boxedRepDataConKey )
import GHC.Types.Unique ( getUnique )
import GHC.Utils.Misc ( chkAppend, debugIsOn, dropList, equalLength
, filterByList, filterOut )
@@ -568,8 +568,9 @@ synifyType _ vs (TyConApp tc tys)
res_ty
-- Use */# instead of TYPE 'Lifted/TYPE 'Unlifted (#473)
| tc `hasKey` tYPETyConKey
- , [TyConApp lev []] <- tys
- , lev `hasKey` liftedRepDataConKey
+ , [TyConApp rep [TyConApp lev []]] <- tys
+ , rep `hasKey` boxedRepDataConKey
+ , lev `hasKey` liftedDataConKey
= noLoc (HsTyVar noExtField NotPromoted (noLoc liftedTypeKindTyConName))
-- Use non-prefix tuple syntax where possible, because it looks nicer.
| Just sort <- tyConTuple_maybe tc
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 42dc7f4f..1f63b2a7 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -43,8 +43,8 @@ import GHC.Types.Var.Set ( VarSet, emptyVarSet )
import GHC.Types.Var.Env ( TyVarEnv, extendVarEnv, elemVarEnv, emptyVarEnv )
import GHC.Core.TyCo.Rep ( Type(..) )
import GHC.Core.Type ( isRuntimeRepVar )
-import GHC.Builtin.Types( liftedRepDataConTyCon )
import GHC.Parser.Annotation (IsUnicodeSyntax(..))
+import GHC.Builtin.Types( liftedRepTy )
import GHC.Data.StringBuffer ( StringBuffer )
import qualified GHC.Data.StringBuffer as S
@@ -656,7 +656,7 @@ defaultRuntimeRepVars = go emptyVarEnv
go subs (TyVarTy tv)
| tv `elemVarEnv` subs
- = TyConApp liftedRepDataConTyCon []
+ = liftedRepTy
| otherwise
= TyVarTy (updateTyVarKind (go subs) tv)