src/Pure/Isar/code.ML
changeset 58665 50b229a5a097
parent 58663 93d177cd03e2
child 58666 9e3426766267
equal deleted inserted replaced
58664:4e4a4c758f9c 58665:50b229a5a097
  1255     val constrs = map (unoverload_const_typ thy) proto_constrs;
  1255     val constrs = map (unoverload_const_typ thy) proto_constrs;
  1256     val (tyco, (vs, cos)) = constrset_of_consts thy constrs;
  1256     val (tyco, (vs, cos)) = constrset_of_consts thy constrs;
  1257   in
  1257   in
  1258     thy
  1258     thy
  1259     |> register_type (tyco, (vs, Constructors (cos, [])))
  1259     |> register_type (tyco, (vs, Constructors (cos, [])))
  1260     |> Named_Target.theory_init
  1260     |> Named_Target.theory_map (Datatype_Plugin.data Plugin_Name.default_filter tyco)
  1261     |> Datatype_Plugin.data Plugin_Name.default_filter tyco
       
  1262     |> Local_Theory.exit_global
       
  1263   end;
  1261   end;
  1264 
  1262 
  1265 fun add_datatype_cmd raw_constrs thy =
  1263 fun add_datatype_cmd raw_constrs thy =
  1266   add_datatype (map (read_bare_const thy) raw_constrs) thy;
  1264   add_datatype (map (read_bare_const thy) raw_constrs) thy;
  1267 
  1265 
  1281   in
  1279   in
  1282     thy
  1280     thy
  1283     |> register_type (tyco, (vs, Abstractor (abs_ty, (rep, cert))))
  1281     |> register_type (tyco, (vs, Abstractor (abs_ty, (rep, cert))))
  1284     |> change_fun_spec rep
  1282     |> change_fun_spec rep
  1285       (K (Proj (Logic.varify_types_global (mk_proj tyco vs ty abs rep), tyco)))
  1283       (K (Proj (Logic.varify_types_global (mk_proj tyco vs ty abs rep), tyco)))
  1286     |> Named_Target.theory_init
  1284     |> Named_Target.theory_map (Abstype_Plugin.data Plugin_Name.default_filter tyco)
  1287     |> Abstype_Plugin.data Plugin_Name.default_filter tyco
       
  1288     |> Local_Theory.exit_global
       
  1289   end;
  1285   end;
  1290 
  1286 
  1291 
  1287 
  1292 (* setup *)
  1288 (* setup *)
  1293 
  1289