src/Pure/sign.ML
changeset 9031 8f75b9ce2f06
parent 8927 1cf815412d78
child 9504 8168600e88a5
equal deleted inserted replaced
9030:bb7622789bf2 9031:8f75b9ce2f06
    32   val stamp_names_of: sg -> string list
    32   val stamp_names_of: sg -> string list
    33   val tsig_of: sg -> Type.type_sig
    33   val tsig_of: sg -> Type.type_sig
    34   val deref: sg_ref -> sg
    34   val deref: sg_ref -> sg
    35   val self_ref: sg -> sg_ref
    35   val self_ref: sg -> sg_ref
    36   val subsig: sg * sg -> bool
    36   val subsig: sg * sg -> bool
       
    37   val joinable: sg * sg -> bool
    37   val eq_sg: sg * sg -> bool
    38   val eq_sg: sg * sg -> bool
    38   val same_sg: sg * sg -> bool
    39   val same_sg: sg * sg -> bool
    39   val is_draft: sg -> bool
    40   val is_draft: sg -> bool
    40   val is_stale: sg -> bool
    41   val is_stale: sg -> bool
    41   val const_type: sg -> string -> typ option
    42   val const_type: sg -> string -> typ option
   252   fun fast_subsig (sg1 as Sg ({stamps = s1, ...}, _), sg2 as Sg ({stamps = s2, ...}, _)) =
   253   fun fast_subsig (sg1 as Sg ({stamps = s1, ...}, _), sg2 as Sg ({stamps = s2, ...}, _)) =
   253     eq_sg (sg1, sg2) orelse fast_sub (s1, s2);
   254     eq_sg (sg1, sg2) orelse fast_sub (s1, s2);
   254 end;
   255 end;
   255 
   256 
   256 
   257 
       
   258 fun joinable (sg1, sg2) = subsig (sg1, sg2) orelse subsig (sg2, sg1);
       
   259 
   257 (*test if same theory names are contained in signatures' stamps,
   260 (*test if same theory names are contained in signatures' stamps,
   258   i.e. if signatures belong to same theory but not necessarily to the
   261   i.e. if signatures belong to same theory but not necessarily to the
   259   same version of it*)
   262   same version of it*)
   260 fun same_sg (sg1 as Sg ({stamps = s1, ...}, _), sg2 as Sg ({stamps = s2, ...}, _)) =
   263 fun same_sg (sg1 as Sg ({stamps = s1, ...}, _), sg2 as Sg ({stamps = s2, ...}, _)) =
   261   eq_sg (sg1, sg2) orelse eq_set_string (pairself (map (op !)) (s1, s2));
   264   eq_sg (sg1, sg2) orelse eq_set_string (pairself (map (op !)) (s1, s2));