src/Pure/Isar/code.ML
changeset 27675 cb0021d56e11
parent 27609 b23c9ad0fe7d
child 27983 00e005cdceb0
equal deleted inserted replaced
27674:2736967f27fd 27675:cb0021d56e11
    28   val type_interpretation:
    28   val type_interpretation:
    29     (string * ((string * sort) list * (string * typ list) list)
    29     (string * ((string * sort) list * (string * typ list) list)
    30       -> theory -> theory) -> theory -> theory
    30       -> theory -> theory) -> theory -> theory
    31   val add_case: thm -> theory -> theory
    31   val add_case: thm -> theory -> theory
    32   val add_undefined: string -> theory -> theory
    32   val add_undefined: string -> theory -> theory
       
    33   val purge_data: theory -> theory
    33 
    34 
    34   val coregular_algebra: theory -> Sorts.algebra
    35   val coregular_algebra: theory -> Sorts.algebra
    35   val operational_algebra: theory -> (sort -> sort) * Sorts.algebra
    36   val operational_algebra: theory -> (sort -> sort) * Sorts.algebra
    36   val these_funcs: theory -> string -> thm list
    37   val these_funcs: theory -> string -> thm list
    37   val get_datatype: theory -> string -> ((string * sort) list * (string * typ list) list)
    38   val get_datatype: theory -> string -> ((string * sort) list * (string * typ list) list)
   355 
   356 
   356 fun map_exec_purge touched f thy =
   357 fun map_exec_purge touched f thy =
   357   CodeData.map (fn (exec, data) => (f exec, ref (case touched
   358   CodeData.map (fn (exec, data) => (f exec, ref (case touched
   358    of SOME cs => invoke_purge_all thy cs (! data)
   359    of SOME cs => invoke_purge_all thy cs (! data)
   359     | NONE => empty_data))) thy;
   360     | NONE => empty_data))) thy;
       
   361 
       
   362 val purge_data = (CodeData.map o apsnd) (K (ref empty_data));
   360 
   363 
   361 
   364 
   362 (* access to data dependent on abstract executable content *)
   365 (* access to data dependent on abstract executable content *)
   363 
   366 
   364 fun get_data (kind, _, dest) = thy_data (get_ensure_init kind #> dest);
   367 fun get_data (kind, _, dest) = thy_data (get_ensure_init kind #> dest);