X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FhsSyn%2FHsTypes.lhs;h=ad7facb11eca767f365fe2725ab1c85fe681875e;hp=2693a101d23c7c3edf7ca81344f5b95c915e94a8;hb=190f24892156953d73b55401d0467a6f1a88ce5d;hpb=aa8e9422469f1ccb3c52444fa56aae34de799334 diff --git a/compiler/hsSyn/HsTypes.lhs b/compiler/hsSyn/HsTypes.lhs index 2693a10..ad7facb 100644 --- a/compiler/hsSyn/HsTypes.lhs +++ b/compiler/hsSyn/HsTypes.lhs @@ -34,6 +34,7 @@ import Type ( Type ) import {- Kind parts of -} Type ( {- instance Outputable Kind -} Kind, pprParendKind, pprKind, isLiftedTypeKind ) +import HsDoc ( LHsDoc, HsDoc ) import BasicTypes ( IPName, Boxity, tupleParens ) import SrcLoc ( Located(..), unLoc, noSrcSpan ) import StaticFlags ( opt_PprStyle_Debug ) @@ -157,6 +158,8 @@ data HsType name | HsSpliceTy (HsSplice name) + | HsDocTy (LHsType name) (LHsDoc name) -- A documented type + data HsExplicitForAll = Explicit | Implicit ----------------------- @@ -363,6 +366,9 @@ ppr_mono_ty ctxt_prec (HsParTy ty) -- But we still use the precedence stuff to add parens because -- toHsType doesn't put in any HsParTys, so we may still need them +ppr_mono_ty ctxt_prec (HsDocTy ty doc) + = ppr ty <+> ppr (unLoc doc) + -------------------------- ppr_fun_ty ctxt_prec ty1 ty2 = let p1 = ppr_mono_lty pREC_FUN ty1