equal
deleted
inserted
replaced
678 |
678 |
679 fun del_datatype tyco thy = |
679 fun del_datatype tyco thy = |
680 case Symtab.lookup ((the_dtyps o get_exec) thy) tyco |
680 case Symtab.lookup ((the_dtyps o get_exec) thy) tyco |
681 of SOME (vs, cos) => let |
681 of SOME (vs, cos) => let |
682 val consts = CodegenConsts.consts_of_cos thy tyco vs cos; |
682 val consts = CodegenConsts.consts_of_cos thy tyco vs cos; |
683 in map_exec_purge (SOME consts) (map_dtyps (Symtab.delete tyco)) thy end |
683 in map_exec_purge (if null consts then NONE else SOME consts) |
|
684 (map_dtyps (Symtab.delete tyco)) thy end |
684 | NONE => thy; |
685 | NONE => thy; |
685 |
686 |
686 in |
687 in |
687 |
688 |
688 fun add_datatype (tyco, (vs_cos as (vs, cos))) thy = |
689 fun add_datatype (tyco, (vs_cos as (vs, cos))) thy = |