src/Pure/Isar/local_theory.ML
changeset 57924 a3360da1d2f0
parent 57194 d110b0d1bc12
child 57925 2bd92d3f92d7
equal deleted inserted replaced
57923:cdae2467311d 57924:a3360da1d2f0
   160 
   160 
   161 
   161 
   162 (* brittle context -- implicit for nested structures *)
   162 (* brittle context -- implicit for nested structures *)
   163 
   163 
   164 fun mark_brittle lthy =
   164 fun mark_brittle lthy =
   165   if level lthy = 1
   165   if level lthy = 1 then
   166   then map_bottom (fn (naming, operations, after_close, brittle, target) =>
   166     map_bottom (fn (naming, operations, after_close, brittle, target) =>
   167     (naming, operations, after_close, true, target)) lthy
   167       (naming, operations, after_close, true, target)) lthy
   168   else lthy;
   168   else lthy;
   169 
   169 
   170 fun assert_nonbrittle lthy =
   170 fun assert_nonbrittle lthy =
   171   if #brittle (top_of lthy)
   171   if #brittle (top_of lthy) then error "Brittle local theory context"
   172   then error "Brittle local theory context"
       
   173   else lthy;
   172   else lthy;
   174 
   173 
   175 
   174 
   176 (* naming *)
   175 (* naming *)
   177 
   176