src/HOL/Tools/primrec.ML
changeset 31737 b3f63611784e
parent 31723 f5cafe803b55
child 31784 bd3486c57ba3
equal deleted inserted replaced
31736:926ebca5a145 31737:b3f63611784e
   201   in (var, ((Binding.name def_name, []), rhs)) end;
   201   in (var, ((Binding.name def_name, []), rhs)) end;
   202 
   202 
   203 
   203 
   204 (* find datatypes which contain all datatypes in tnames' *)
   204 (* find datatypes which contain all datatypes in tnames' *)
   205 
   205 
   206 fun find_dts (dt_info : datatype_info Symtab.table) _ [] = []
   206 fun find_dts (dt_info : info Symtab.table) _ [] = []
   207   | find_dts dt_info tnames' (tname::tnames) =
   207   | find_dts dt_info tnames' (tname::tnames) =
   208       (case Symtab.lookup dt_info tname of
   208       (case Symtab.lookup dt_info tname of
   209           NONE => primrec_error (quote tname ^ " is not a datatype")
   209           NONE => primrec_error (quote tname ^ " is not a datatype")
   210         | SOME dt =>
   210         | SOME dt =>
   211             if tnames' subset (map (#1 o snd) (#descr dt)) then
   211             if tnames' subset (map (#1 o snd) (#descr dt)) then