equal
deleted
inserted
replaced
575 |
575 |
576 |
576 |
577 (* theory init and exit *) |
577 (* theory init and exit *) |
578 |
578 |
579 fun gen_begin_theory upd name parents files = |
579 fun gen_begin_theory upd name parents files = |
580 ThyInfo.begin_theory Present.begin_theory upd name parents (map (apfst Path.unpack) files); |
580 let val ml_filename = Path.pack (ThyLoad.ml_path name); |
|
581 val () = if exists (equal ml_filename o #1) files |
|
582 then error ((quote ml_filename) ^ " not allowed in files section for theory " ^ name) |
|
583 else () |
|
584 in ThyInfo.begin_theory Present.begin_theory upd name parents (map (apfst Path.unpack) files) end; |
581 |
585 |
582 val begin_theory = gen_begin_theory false; |
586 val begin_theory = gen_begin_theory false; |
583 |
587 |
584 fun end_theory thy = |
588 fun end_theory thy = |
585 if ThyInfo.check_known_thy (PureThy.get_name thy) then ThyInfo.end_theory thy |
589 if ThyInfo.check_known_thy (PureThy.get_name thy) then ThyInfo.end_theory thy |