src/Tools/Code/code_thingol.ML
changeset 42361 23f352990944
parent 42359 6ca5407863ed
child 42383 0ae4ad40d7b5
equal deleted inserted replaced
42360:da8817d01e7c 42361:23f352990944
   488         else []
   488         else []
   489       end
   489       end
   490   | _ => [];
   490   | _ => [];
   491 
   491 
   492 fun labelled_name thy program name =
   492 fun labelled_name thy program name =
   493   let val ctxt = ProofContext.init_global thy in
   493   let val ctxt = Proof_Context.init_global thy in
   494     case Graph.get_node program name of
   494     case Graph.get_node program name of
   495       Fun (c, _) => quote (Code.string_of_const thy c)
   495       Fun (c, _) => quote (Code.string_of_const thy c)
   496     | Datatype (tyco, _) => "type " ^ quote (ProofContext.extern_type ctxt tyco)
   496     | Datatype (tyco, _) => "type " ^ quote (Proof_Context.extern_type ctxt tyco)
   497     | Datatypecons (c, _) => quote (Code.string_of_const thy c)
   497     | Datatypecons (c, _) => quote (Code.string_of_const thy c)
   498     | Class (class, _) => "class " ^ quote (ProofContext.extern_class ctxt class)
   498     | Class (class, _) => "class " ^ quote (Proof_Context.extern_class ctxt class)
   499     | Classrel (sub, super) =>
   499     | Classrel (sub, super) =>
   500         let
   500         let
   501           val Class (sub, _) = Graph.get_node program sub;
   501           val Class (sub, _) = Graph.get_node program sub;
   502           val Class (super, _) = Graph.get_node program super;
   502           val Class (super, _) = Graph.get_node program super;
   503         in
   503         in
   504           quote (ProofContext.extern_class ctxt sub ^ " < " ^ ProofContext.extern_class ctxt super)
   504           quote (Proof_Context.extern_class ctxt sub ^ " < " ^ Proof_Context.extern_class ctxt super)
   505         end
   505         end
   506     | Classparam (c, _) => quote (Code.string_of_const thy c)
   506     | Classparam (c, _) => quote (Code.string_of_const thy c)
   507     | Classinst ((class, (tyco, _)), _) =>
   507     | Classinst ((class, (tyco, _)), _) =>
   508         let
   508         let
   509           val Class (class, _) = Graph.get_node program class;
   509           val Class (class, _) = Graph.get_node program class;
   510           val Datatype (tyco, _) = Graph.get_node program tyco;
   510           val Datatype (tyco, _) = Graph.get_node program tyco;
   511         in
   511         in
   512           quote (ProofContext.extern_type ctxt tyco ^ " :: " ^ ProofContext.extern_class ctxt class)
   512           quote (Proof_Context.extern_type ctxt tyco ^ " :: " ^ Proof_Context.extern_class ctxt class)
   513         end
   513         end
   514   end;
   514   end;
   515 
   515 
   516 fun linear_stmts program =
   516 fun linear_stmts program =
   517   rev (Graph.strong_conn program)
   517   rev (Graph.strong_conn program)