src/Pure/thm_name.ML
changeset 80286 00d68f324056
parent 79377 c5282516e2d5
child 80289 40a6a6ac1669
equal deleted inserted replaced
80276:360e6217cda6 80286:00d68f324056
     9 
     9 
    10 signature THM_NAME =
    10 signature THM_NAME =
    11 sig
    11 sig
    12   type T = string * int
    12   type T = string * int
    13   val ord: T ord
    13   val ord: T ord
       
    14   val none: T * Position.T
    14   val print: T -> string
    15   val print: T -> string
    15   val short: T * Position.T -> string * Position.T
    16   val short: T * Position.T -> string * Position.T
    16   val list: string * Position.T -> 'a list -> ((T * Position.T) * 'a) list
    17   val list: string * Position.T -> 'a list -> ((T * Position.T) * 'a) list
    17   val expr: string * Position.T -> ('a list * 'b) list -> (((T * Position.T) * 'a) list * 'b) list
    18   val expr: string * Position.T -> ('a list * 'b) list -> (((T * Position.T) * 'a) list * 'b) list
    18 end;
    19 end;
    20 structure Thm_Name: THM_NAME =
    21 structure Thm_Name: THM_NAME =
    21 struct
    22 struct
    22 
    23 
    23 type T = string * int;
    24 type T = string * int;
    24 val ord = prod_ord string_ord int_ord;
    25 val ord = prod_ord string_ord int_ord;
       
    26 
       
    27 val none = (("", 0), Position.none);
    25 
    28 
    26 fun print (name, index) =
    29 fun print (name, index) =
    27   if name = "" orelse index = 0 then name
    30   if name = "" orelse index = 0 then name
    28   else name ^ enclose "(" ")" (string_of_int index);
    31   else name ^ enclose "(" ")" (string_of_int index);
    29 
    32