diff options
Diffstat (limited to 'compiler/iface')
-rw-r--r-- | compiler/iface/IfaceType.hs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs index db3157f39b..d649be701b 100644 --- a/compiler/iface/IfaceType.hs +++ b/compiler/iface/IfaceType.hs @@ -1315,7 +1315,7 @@ pprTyTcApp' ctxt_prec tc tys dflags style | tc `ifaceTyConHasKey` tYPETyConKey , IA_Arg (IfaceTyConApp rep IA_Nil) Required IA_Nil <- tys , rep `ifaceTyConHasKey` liftedRepDataConKey - = kindType + = ppr_kind_type ctxt_prec | otherwise = getPprDebug $ \dbg -> @@ -1332,6 +1332,14 @@ pprTyTcApp' ctxt_prec tc tys dflags style info = ifaceTyConInfo tc tys_wo_kinds = appArgsIfaceTypesArgFlags $ stripInvisArgs dflags tys +ppr_kind_type :: PprPrec -> SDoc +ppr_kind_type ctxt_prec = + sdocWithDynFlags $ \dflags -> + if useStarIsType dflags + then maybeParen ctxt_prec starPrec $ + unicodeSyntax (char '★') (char '*') + else text "Type" + -- | Pretty-print a type-level equality. -- Returns (Just doc) if the argument is a /saturated/ application -- of eqTyCon (~) @@ -1440,7 +1448,7 @@ ppr_iface_tc_app pp _ tc [ty] ppr_iface_tc_app pp ctxt_prec tc tys | tc `ifaceTyConHasKey` liftedTypeKindTyConKey - = kindType + = ppr_kind_type ctxt_prec | not (isSymOcc (nameOccName (ifaceTyConName tc))) = pprIfacePrefixApp ctxt_prec (ppr tc) (map (pp appPrec) tys) |