src/Pure/thm_name.ML
changeset 80296 a1162cbda70c
parent 80295 8a9588ffc133
child 80297 f38771b2df1c
equal deleted inserted replaced
80295:8a9588ffc133 80296:a1162cbda70c
    46 
    46 
    47 type P = T * Position.T;
    47 type P = T * Position.T;
    48 
    48 
    49 val none: P = (empty, Position.none);
    49 val none: P = (empty, Position.none);
    50 
    50 
    51 fun list (name, pos) [thm] = [(((name, 0), pos): P, thm)]
    51 fun list (name, pos) [x] = [(((name, 0), pos): P, x)]
    52   | list ("", pos) thms = map (fn thm => ((empty, pos), thm)) thms
    52   | list ("", pos) xs = map (fn thm => ((empty, pos), thm)) xs
    53   | list (name, pos) thms = map_index (fn (i, thm) => (((name, i + 1), pos), thm)) thms;
    53   | list (name, pos) xs = map_index (fn (i, thm) => (((name, i + 1), pos), thm)) xs;
    54 
    54 
    55 fun expr name = burrow_fst (burrow (list name));
    55 fun expr name = burrow_fst (burrow (list name));
    56 
    56 
    57 end;
    57 end;