src/Pure/Isar/generic_target.ML
changeset 45353 68f3e073ee21
parent 45352 0b4038361a3a
child 45390 e29521ef9059
equal deleted inserted replaced
45352:0b4038361a3a 45353:68f3e073ee21
    24   val theory_foundation: ((binding * typ) * mixfix) * (binding * term) ->
    24   val theory_foundation: ((binding * typ) * mixfix) * (binding * term) ->
    25     term list * term list -> local_theory -> (term * thm) * local_theory
    25     term list * term list -> local_theory -> (term * thm) * local_theory
    26   val theory_notes: string -> (Attrib.binding * (thm list * Args.src list) list) list ->
    26   val theory_notes: string -> (Attrib.binding * (thm list * Args.src list) list) list ->
    27     local_theory -> local_theory
    27     local_theory -> local_theory
    28   val theory_abbrev: Syntax.mode -> (binding * mixfix) * term -> local_theory -> local_theory
    28   val theory_abbrev: Syntax.mode -> (binding * mixfix) * term -> local_theory -> local_theory
    29 end;
    29 end
    30 
    30 
    31 structure Generic_Target: GENERIC_TARGET =
    31 structure Generic_Target: GENERIC_TARGET =
    32 struct
    32 struct
    33 
    33 
    34 (** lifting primitive to target operations **)
    34 (** lifting primitive to target operations **)
    75     val params = type_params @ term_params;
    75     val params = type_params @ term_params;
    76 
    76 
    77     val U = map Term.fastype_of params ---> T;
    77     val U = map Term.fastype_of params ---> T;
    78 
    78 
    79     (*foundation*)
    79     (*foundation*)
    80     val ((lhs', global_def), lthy2) = foundation
    80     val ((lhs', global_def), lthy2) = lthy
    81       (((b, U), mx'), (b_def, rhs')) (type_params, term_params) lthy;
    81       |> foundation (((b, U), mx'), (b_def, rhs')) (type_params, term_params);
    82 
    82 
    83     (*local definition*)
    83     (*local definition*)
    84     val ((lhs, local_def), lthy3) = lthy2
    84     val ((lhs, local_def), lthy3) = lthy2
    85       |> Local_Defs.add_def ((b, NoSyn), lhs');
    85       |> Local_Defs.add_def ((b, NoSyn), lhs');
    86     val def = Local_Defs.trans_terms lthy3
    86     val def = Local_Defs.trans_terms lthy3