src/Pure/Isar/attrib.ML
changeset 56140 ed92ce2ac88e
parent 56052 4873054cd1fc
child 56265 785569927666
equal deleted inserted replaced
56139:b7add947a6ef 56140:ed92ce2ac88e
   211 
   211 
   212 val fact_name = Args.internal_fact >> K "<fact>" || Args.name;
   212 val fact_name = Args.internal_fact >> K "<fact>" || Args.name;
   213 
   213 
   214 fun gen_thm pick = Scan.depend (fn context =>
   214 fun gen_thm pick = Scan.depend (fn context =>
   215   let
   215   let
   216     val get = Context.cases (Global_Theory.get_fact context) Proof_Context.get_fact context;
   216     val get = Proof_Context.get_fact_generic context;
   217     val get_fact = get o Facts.Fact;
   217     val get_fact = get o Facts.Fact;
   218     fun get_named pos name = get (Facts.Named ((name, pos), NONE));
   218     fun get_named pos name = get (Facts.Named ((name, pos), NONE));
   219   in
   219   in
   220     Parse.$$$ "[" |-- Args.attribs (check_name_generic context) --| Parse.$$$ "]" >> (fn srcs =>
   220     Parse.$$$ "[" |-- Args.attribs (check_name_generic context) --| Parse.$$$ "]" >> (fn srcs =>
   221       let
   221       let
   246 end;
   246 end;
   247 
   247 
   248 
   248 
   249 
   249 
   250 (** partial evaluation -- observing rule/declaration/mixed attributes **)
   250 (** partial evaluation -- observing rule/declaration/mixed attributes **)
       
   251 
       
   252 (*NB: result length may change due to rearrangement of symbolic expression*)
   251 
   253 
   252 local
   254 local
   253 
   255 
   254 fun apply_att src (context, th) =
   256 fun apply_att src (context, th) =
   255   let
   257   let