equal
deleted
inserted
replaced
19 type P = T * Position.T |
19 type P = T * Position.T |
20 val none: P |
20 val none: P |
21 val list: string * Position.T -> 'a list -> (P * 'a) list |
21 val list: string * Position.T -> 'a list -> (P * 'a) list |
22 val expr: string * Position.T -> ('a list * 'b) list -> ((P * 'a) list * 'b) list |
22 val expr: string * Position.T -> ('a list * 'b) list -> ((P * 'a) list * 'b) list |
23 |
23 |
|
24 val print_prefix: Context.generic -> Name_Space.T -> T -> Markup.T * string |
|
25 val print_suffix: T -> string |
24 val print: T -> string |
26 val print: T -> string |
25 val short: T -> string |
27 val short: T -> string |
26 end; |
28 end; |
27 |
29 |
28 structure Thm_Name: THM_NAME = |
30 structure Thm_Name: THM_NAME = |
53 fun expr name = burrow_fst (burrow (list name)); |
55 fun expr name = burrow_fst (burrow (list name)); |
54 |
56 |
55 |
57 |
56 (* output *) |
58 (* output *) |
57 |
59 |
58 fun print (name, index) = |
60 fun print_prefix context space ((name, _): T) = |
59 if name = "" orelse index = 0 then name |
61 if name = "" then (Markup.empty, "") |
60 else name ^ enclose "(" ")" (string_of_int index); |
62 else (Name_Space.markup space name, Name_Space.extern_generic context space name); |
|
63 |
|
64 fun print_suffix (name, index) = |
|
65 if name = "" orelse index = 0 then "" |
|
66 else enclose "(" ")" (string_of_int index); |
|
67 |
|
68 fun print (name, index) = name ^ print_suffix (name, index); |
61 |
69 |
62 fun short (name, index) = |
70 fun short (name, index) = |
63 if name = "" orelse index = 0 then name |
71 if name = "" orelse index = 0 then name |
64 else name ^ "_" ^ string_of_int index; |
72 else name ^ "_" ^ string_of_int index; |
65 |
73 |