-let string_of_sort_kind = function
- | `Prop -> "Prop"
- | `Set -> "Set"
- | `CProp _ -> "CProp"
- | `Type _ -> "Type"
- | `NType s -> "Type[" ^ s ^ "]"
- | `NCProp s -> "CProp[" ^ s ^ "]"
+let xml_of_sort x =
+ let to_string x = Ast.Ident (x, None) in
+ let identify x =
+ add_xml_attrs (RenderingAttrs.keyword_attributes `MathML) (to_string x)
+ in
+ let lvl t = Ast.AttributedTerm (`Level 90,t) in
+ match x with
+ | `Prop -> identify "Prop"
+ | `Set -> identify "Set"
+ | `CProp _ -> identify "CProp"
+ | `Type _ -> identify "Type"
+ | `NType s -> lvl(Ast.Layout (Ast.Sub (identify "Type",to_string s)))
+ | `NCProp s -> lvl(Ast.Layout (Ast.Sub (identify "CProp",to_string s)))
+;;
+