mathlib documentation

<unknown> / src.export_json

Used to generate a json file for html docs.

The json file is a list of maps, where each map has the structure

interface DeclInfo {
  name: string;
  args: efmt[];
  type: efmt;
  doc_string: string;
  filename: string;
  line: int;
  attributes: string[];
  equations: efmt[];
  kind: string;
  structure_fields: [string, efmt][];
  constructors: [string, efmt][];
}

Where efmt is defined as follows ('c' is a concatenation, 'n' is nesting):

type efmt = ['c', efmt, efmt] | ['n', efmt] | string;

Include this file somewhere in mathlib, e.g. in the scripts directory. Make sure mathlib is precompiled, with all.lean generated by mk_all.sh.

Usage: lean entrypoint.lean prints the generated JSON to stdout. entrypoint.lean imports this file.

meta inductive efmt  :
Type
@[protected, instance]
@[protected, instance]
@[protected, instance]
meta def efmt.to_json  :
meta def efmt.compose'  :
efmtefmtefmt
meta def efmt.of_eformat  :
meta def efmt.sink_parens (e : efmt) :
meta def efmt.simplify  :
meta def efmt.pp (e : expr) :
meta def expr.instantiate_pis  :
list exprexprexpr
meta structure decl_info  :
Type

The information collected from each declaration

structure module_doc_info  :
Type
structure ext_tactic_doc_entry  :
Type
meta def format_binders (ns : list name) (bi : binder_info) (t : expr) :
meta def count_named_intros  :
expr
meta def attribute_list  :

The attributes we check for

meta def attributes_of (n : name) :
meta def get_proj_type (struct_name proj_name : name) :
meta def get_constructor_type (type_name constructor_name : name) :
meta def mk_constructors (decl : name) (e : environment) :
meta def get_equations (decl : name) :

extracts decl_info from d. Should return none instead of failing.

meta def name.imported_by_tactic_basic (decl_name : name) :
meta def name.imported_by_tactic_default (decl_name : name) :
meta def name.imported_always (decl_name : name) :
meta def open_all_locales (_x : interactive.parse (lean.parser.tk "open_all_locales")) :
meta def main  :