Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit 4ffb30d

Browse files
andrewthadbgamari
authored andcommitted
Update for boxed rep
1 parent 7936692 commit 4ffb30d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

haddock-api/src/Haddock/Convert.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import GHC.Builtin.Types.Prim ( alphaTyVars )
4545
import GHC.Builtin.Types ( eqTyConName, listTyConName, liftedTypeKindTyConName
4646
, unitTy, promotedNilDataCon, promotedConsDataCon )
4747
import GHC.Builtin.Names ( hasKey, eqTyConKey, ipClassKey, tYPETyConKey
48-
, liftedRepDataConKey )
48+
, liftedDataConKey, boxedRepDataConKey )
4949
import GHC.Types.Unique ( getUnique )
5050
import GHC.Utils.Misc ( chkAppend, debugIsOn, dropList, equalLength
5151
, filterByList, filterOut )
@@ -568,8 +568,9 @@ synifyType _ vs (TyConApp tc tys)
568568
res_ty
569569
-- Use */# instead of TYPE 'Lifted/TYPE 'Unlifted (#473)
570570
| tc `hasKey` tYPETyConKey
571-
, [TyConApp lev []] <- tys
572-
, lev `hasKey` liftedRepDataConKey
571+
, [TyConApp rep [TyConApp lev []]] <- tys
572+
, rep `hasKey` boxedRepDataConKey
573+
, lev `hasKey` liftedDataConKey
573574
= noLoc (HsTyVar noExtField NotPromoted (noLoc liftedTypeKindTyConName))
574575
-- Use non-prefix tuple syntax where possible, because it looks nicer.
575576
| Just sort <- tyConTuple_maybe tc

haddock-api/src/Haddock/GhcUtils.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import GHC.Types.Var.Set ( VarSet, emptyVarSet )
4343
import GHC.Types.Var.Env ( TyVarEnv, extendVarEnv, elemVarEnv, emptyVarEnv )
4444
import GHC.Core.TyCo.Rep ( Type(..) )
4545
import GHC.Core.Type ( isRuntimeRepVar )
46-
import GHC.Builtin.Types( liftedRepDataConTyCon )
4746
import GHC.Parser.Annotation (IsUnicodeSyntax(..))
47+
import GHC.Builtin.Types( liftedRepTy )
4848

4949
import GHC.Data.StringBuffer ( StringBuffer )
5050
import qualified GHC.Data.StringBuffer as S
@@ -656,7 +656,7 @@ defaultRuntimeRepVars = go emptyVarEnv
656656

657657
go subs (TyVarTy tv)
658658
| tv `elemVarEnv` subs
659-
= TyConApp liftedRepDataConTyCon []
659+
= liftedRepTy
660660
| otherwise
661661
= TyVarTy (updateTyVarKind (go subs) tv)
662662

0 commit comments

Comments
 (0)