src/Pure/Isar/attrib.ML
changeset 11729 a7da2e8b5762
parent 10807 ae001d5119fc
child 11763 41ae2eb50bbf
equal deleted inserted replaced
11728:b5f6963b193c 11729:a7da2e8b5762
    31   val local_thms: Proof.context * Args.T list -> thm list * (Proof.context * Args.T list)
    31   val local_thms: Proof.context * Args.T list -> thm list * (Proof.context * Args.T list)
    32   val local_thmss: Proof.context * Args.T list -> thm list * (Proof.context * Args.T list)
    32   val local_thmss: Proof.context * Args.T list -> thm list * (Proof.context * Args.T list)
    33   val syntax: ('a * Args.T list -> 'a attribute * ('a * Args.T list)) -> Args.src -> 'a attribute
    33   val syntax: ('a * Args.T list -> 'a attribute * ('a * Args.T list)) -> Args.src -> 'a attribute
    34   val no_args: 'a attribute -> Args.src -> 'a attribute
    34   val no_args: 'a attribute -> Args.src -> 'a attribute
    35   val add_del_args: 'a attribute -> 'a attribute -> Args.src -> 'a attribute
    35   val add_del_args: 'a attribute -> 'a attribute -> Args.src -> 'a attribute
    36   val read_inst': string option list * string option list -> ProofContext.context -> thm -> thm
       
    37   val insts': Args.T list -> (string option list * string option list) * Args.T list
       
    38   val setup: (theory -> theory) list
    36   val setup: (theory -> theory) list
    39 end;
    37 end;
    40 
    38 
    41 structure Attrib: ATTRIB =
    39 structure Attrib: ATTRIB =
    42 struct
    40 struct
   248       in
   246       in
   249         thm
   247         thm
   250         |> read_instantiate context_of insts x
   248         |> read_instantiate context_of insts x
   251         |> RuleCases.save thm
   249         |> RuleCases.save thm
   252       end;
   250       end;
   253 
       
   254 val read_inst' = read_instantiate' I;
       
   255 
   251 
   256 val concl = Args.$$$ "concl" -- Args.colon;
   252 val concl = Args.$$$ "concl" -- Args.colon;
   257 val inst_arg = Scan.unless concl Args.name_dummy;
   253 val inst_arg = Scan.unless concl Args.name_dummy;
   258 val inst_args = Scan.repeat inst_arg;
   254 val inst_args = Scan.repeat inst_arg;
   259 fun insts' x = (inst_args -- Scan.optional (concl |-- Args.!!! inst_args) []) x;
   255 fun insts' x = (inst_args -- Scan.optional (concl |-- Args.!!! inst_args) []) x;