pub fn to_doc(&self) -> Doc<'_, BoxDoc<'_, ()>> {
        match self {
            IntroParam::Explicit(pattern) => pattern.to_doc(),
            IntroParam::Implicit(_, param_label, None) => Doc::nil()
                .append("{")
                .append(param_label.to_doc())
                .append("}"),
            IntroParam::Implicit(_, param_label, Some(pattern)) => Doc::nil()
                .append("{")
                .append(param_label.to_doc())
                .append(Doc::space())
                .append("=")
                .append(Doc::space())
                .append(pattern.to_doc())
                .append("}"),
            IntroParam::Instance(_, param_label, None) => Doc::nil()
                .append("{{")
                .append(param_label.to_doc())
                .append("}}"),
            IntroParam::Instance(_, param_label, Some(pattern)) => Doc::nil()
                .append("{{")
                .append(param_label.to_doc())
                .append(Doc::space())
                .append("=")
                .append(Doc::space())
                .append(pattern.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 {
            IntroParam::Explicit(pattern) => pattern.to_doc(),
            IntroParam::Implicit(_, param_label, None) => Doc::nil()
                .append("{")
                .append(param_label.to_doc())
                .append("}"),
            IntroParam::Implicit(_, param_label, Some(pattern)) => Doc::nil()
                .append("{")
                .append(param_label.to_doc())
                .append(Doc::space())
                .append("=")
                .append(Doc::space())
                .append(pattern.to_doc())
                .append("}"),
            IntroParam::Instance(_, param_label, None) => Doc::nil()
                .append("{{")
                .append(param_label.to_doc())
                .append("}}"),
            IntroParam::Instance(_, param_label, Some(pattern)) => Doc::nil()
                .append("{{")
                .append(param_label.to_doc())
                .append(Doc::space())
                .append("=")
                .append(Doc::space())
                .append(pattern.to_doc())
                .append("}}"),
        }
    }
pub fn to_doc ( & self ) -> Doc < ' _ , BoxDoc < ' _ , ( ) > > { match self { IntroParam :: Explicit ( pattern ) => pattern . to_doc ( ) , IntroParam :: Implicit ( _ , param_label , None ) => Doc :: nil ( ) . append ( " " ) . append ( param_label . to_doc ( ) ) . append ( " " ) , IntroParam :: Implicit ( _ , param_label , Some ( pattern ) ) => Doc :: nil ( ) . append ( " " ) . append ( param_label . to_doc ( ) ) . append ( Doc :: space ( ) ) . append ( " " ) . append ( Doc :: space ( ) ) . append ( pattern . to_doc ( ) ) . append ( " " ) , IntroParam :: Instance ( _ , param_label , None ) => Doc :: nil ( ) . append ( " " ) . append ( param_label . to_doc ( ) ) . append ( " " ) , IntroParam :: Instance ( _ , param_label , Some ( pattern ) ) => Doc :: nil ( ) . append ( " " ) . append ( param_label . to_doc ( ) ) . append ( Doc :: space ( ) ) . append ( " " ) . append ( Doc :: space ( ) ) . append ( pattern . to_doc ( ) ) . append ( " " ) , } }
Convert the parameter into a pretty-printable document
Convert the parameter into a pretty - printable document
&self