src/HOL/Tools/Datatype/datatype_realizer.ML
changeset 32727 9072201cd69d
parent 32712 ec5976f4d3d8
child 32952 aeb1e44fbc19
equal deleted inserted replaced
32723:866cebde3fca 32727:9072201cd69d
    36 fun tname_of (Type (s, _)) = s
    36 fun tname_of (Type (s, _)) = s
    37   | tname_of _ = "";
    37   | tname_of _ = "";
    38 
    38 
    39 fun mk_realizes T = Const ("realizes", T --> HOLogic.boolT --> HOLogic.boolT);
    39 fun mk_realizes T = Const ("realizes", T --> HOLogic.boolT --> HOLogic.boolT);
    40 
    40 
    41 fun make_ind sorts ({descr, rec_names, rec_rewrites, inducts = (_, induct), ...} : info) is thy =
    41 fun make_ind sorts ({descr, rec_names, rec_rewrites, induct, ...} : info) is thy =
    42   let
    42   let
    43     val recTs = get_rec_types descr sorts;
    43     val recTs = get_rec_types descr sorts;
    44     val pnames = if length descr = 1 then ["P"]
    44     val pnames = if length descr = 1 then ["P"]
    45       else map (fn i => "P" ^ string_of_int i) (1 upto length descr);
    45       else map (fn i => "P" ^ string_of_int i) (1 upto length descr);
    46 
    46