pub fn to_doc(&self) -> Doc<'_, BoxDoc<'_, ()>> {
        match self {
            TypeParam::Explicit(_, param_names, param_ty) => Doc::nil()
                .append("(")
                .append(Doc::intersperse(
                    param_names.iter().map(SpannedString::to_doc),
                    Doc::space(),
                ))
                .append(Doc::space())
                .append(":")
                .append(Doc::space())
                .append(param_ty.to_doc())
                .append(")"),
            TypeParam::Implicit(_, param_labels, None) => Doc::nil()
                .append("{")
                .append(Doc::intersperse(
                    param_labels.iter().map(SpannedString::to_doc),
                    Doc::space(),
                ))
                .append("}"),
            TypeParam::Implicit(_, param_labels, Some(term)) => Doc::nil()
                .append("{")
                .append(Doc::intersperse(
                    param_labels.iter().map(SpannedString::to_doc),
                    Doc::space(),
                ))
                .append(Doc::space())
                .append(":")
                .append(Doc::space())
                .append(term.to_doc())
                .append("}"),
            TypeParam::Instance(_, param_label, term) => Doc::nil()
                .append("{{")
                .append(param_label.to_doc())
                .append(Doc::space())
                .append(":")
                .append(Doc::space())
                .append(term.to_doc())
                .append("}}"),
        }
    }
/// Convert the parameter into a pretty-printable document
Convert the parameter into a pretty-printable document
Convert the parameter into a pretty - printable document
pub fn to_doc(&self) -> Doc<'_, BoxDoc<'_, ()>> {
        match self {
            TypeParam::Explicit(_, param_names, param_ty) => Doc::nil()
                .append("(")
                .append(Doc::intersperse(
                    param_names.iter().map(SpannedString::to_doc),
                    Doc::space(),
                ))
                .append(Doc::space())
                .append(":")
                .append(Doc::space())
                .append(param_ty.to_doc())
                .append(")"),
            TypeParam::Implicit(_, param_labels, None) => Doc::nil()
                .append("{")
                .append(Doc::intersperse(
                    param_labels.iter().map(SpannedString::to_doc),
                    Doc::space(),
                ))
                .append("}"),
            TypeParam::Implicit(_, param_labels, Some(term)) => Doc::nil()
                .append("{")
                .append(Doc::intersperse(
                    param_labels.iter().map(SpannedString::to_doc),
                    Doc::space(),
                ))
                .append(Doc::space())
                .append(":")
                .append(Doc::space())
                .append(term.to_doc())
                .append("}"),
            TypeParam::Instance(_, param_label, term) => Doc::nil()
                .append("{{")
                .append(param_label.to_doc())
                .append(Doc::space())
                .append(":")
                .append(Doc::space())
                .append(term.to_doc())
                .append("}}"),
        }
    }
pub fn to_doc ( & self ) -> Doc < ' _ , BoxDoc < ' _ , ( ) > > { match self { TypeParam :: Explicit ( _ , param_names , param_ty ) => Doc :: nil ( ) . append ( " " ) . append ( Doc :: intersperse ( param_names . iter ( ) . map ( SpannedString :: to_doc ) , Doc :: space ( ) , ) ) . append ( Doc :: space ( ) ) . append ( " " ) . append ( Doc :: space ( ) ) . append ( param_ty . to_doc ( ) ) . append ( " " ) , TypeParam :: Implicit ( _ , param_labels , None ) => Doc :: nil ( ) . append ( " " ) . append ( Doc :: intersperse ( param_labels . iter ( ) . map ( SpannedString :: to_doc ) , Doc :: space ( ) , ) ) . append ( " " ) , TypeParam :: Implicit ( _ , param_labels , Some ( term ) ) => Doc :: nil ( ) . append ( " " ) . append ( Doc :: intersperse ( param_labels . iter ( ) . map ( SpannedString :: to_doc ) , Doc :: space ( ) , ) ) . append ( Doc :: space ( ) ) . append ( " " ) . append ( Doc :: space ( ) ) . append ( term . to_doc ( ) ) . append ( " " ) , TypeParam :: Instance ( _ , param_label , term ) => Doc :: nil ( ) . append ( " " ) . append ( param_label . to_doc ( ) ) . append ( Doc :: space ( ) ) . append ( " " ) . append ( Doc :: space ( ) ) . append ( term . to_doc ( ) ) . append ( " " ) , } }
Convert the parameter into a pretty-printable document
Convert the parameter into a pretty - printable document
&self