src/Pure/Isar/local_theory.ML
changeset 59886 e0dc738eb08c
parent 59880 30687c3f2b10
child 59887 43dc3c660f41
equal deleted inserted replaced
59885:3470a265d404 59886:e0dc738eb08c
   142     if b andalso not b' then error "Not at bottom of local theory nesting"
   142     if b andalso not b' then error "Not at bottom of local theory nesting"
   143     else if not b andalso b' then error "Already at bottom of local theory nesting"
   143     else if not b andalso b' then error "Already at bottom of local theory nesting"
   144     else lthy
   144     else lthy
   145   end;
   145   end;
   146 
   146 
   147 fun open_target background_naming operations after_close target =
   147 fun open_target background_naming operations after_close lthy =
   148   assert target
   148   let
   149   |> Data.map (cons (make_lthy (background_naming, operations, after_close, true, target)));
   149     val _ = assert lthy;
       
   150     val (_, target) = Proof_Context.new_scope lthy;
       
   151   in
       
   152     target |> Data.map (cons (make_lthy (background_naming, operations, after_close, true, target)))
       
   153   end;
   150 
   154 
   151 fun close_target lthy =
   155 fun close_target lthy =
   152   let
   156   let
   153     val _ = assert_bottom false lthy;
   157     val _ = assert_bottom false lthy;
   154     val ({after_close, ...} :: rest) = Data.get lthy;
   158     val ({after_close, ...} :: rest) = Data.get lthy;