equal
deleted
inserted
replaced
629 |
629 |
630 (** a datatype antiquotation **) |
630 (** a datatype antiquotation **) |
631 |
631 |
632 local |
632 local |
633 |
633 |
634 val sym_datatype = Pretty.str "\\isacommand{datatype}"; |
634 val sym_datatype = Pretty.command "datatype"; |
635 val sym_binder = Pretty.str "\\ {\\isacharequal}"; |
635 val sym_binder = Pretty.str "\\ {\\isacharequal}"; (*FIXME use proper symbol*) |
636 val sym_sep = Pretty.str "{\\isacharbar}\\ "; |
636 val sym_sep = Pretty.str "{\\isacharbar}\\ "; |
637 |
637 |
638 in |
638 in |
639 |
639 |
640 fun args_datatype (ctxt, args) = |
640 fun args_datatype (ctxt, args) = |
657 fun pretty_constr (co, []) = |
657 fun pretty_constr (co, []) = |
658 Syntax.pretty_term ctxt (Const (co, ty)) |
658 Syntax.pretty_term ctxt (Const (co, ty)) |
659 | pretty_constr (co, [ty']) = |
659 | pretty_constr (co, [ty']) = |
660 (Pretty.block o Pretty.breaks) |
660 (Pretty.block o Pretty.breaks) |
661 [Syntax.pretty_term ctxt (Const (co, ty' --> ty)), |
661 [Syntax.pretty_term ctxt (Const (co, ty' --> ty)), |
662 Syntax.pretty_typ ctxt ty'] |
662 pretty_typ_br ty'] |
663 | pretty_constr (co, tys) = |
663 | pretty_constr (co, tys) = |
664 (Pretty.block o Pretty.breaks) |
664 (Pretty.block o Pretty.breaks) |
665 (Syntax.pretty_term ctxt (Const (co, tys ---> ty)) :: |
665 (Syntax.pretty_term ctxt (Const (co, tys ---> ty)) :: |
666 map pretty_typ_br tys); |
666 map pretty_typ_br tys); |
667 in |
667 in |