src/Tools/Code/code_thingol.ML
changeset 55828 42ac3cfb89f6
parent 55757 9fc71814b8c1
child 56025 d74fed45fa8b
equal deleted inserted replaced
55827:8a881f83e206 55828:42ac3cfb89f6
   880       ((snd o #constants o Consts.dest o Sign.consts_of) thy') [];
   880       ((snd o #constants o Consts.dest o Sign.consts_of) thy') [];
   881     fun belongs_here thy' c = forall
   881     fun belongs_here thy' c = forall
   882       (fn thy'' => not (Sign.declared_const thy'' c)) (Theory.parents_of thy');
   882       (fn thy'' => not (Sign.declared_const thy'' c)) (Theory.parents_of thy');
   883     fun consts_of_select thy' = filter (belongs_here thy') (consts_of thy');
   883     fun consts_of_select thy' = filter (belongs_here thy') (consts_of thy');
   884     fun read_const_expr str =
   884     fun read_const_expr str =
   885       (case Syntax.parse_token ctxt (K NONE) Markup.empty (SOME o Symbol_Pos.implode o #1) str of
   885       (case Syntax.parse_token ctxt (K NONE) (K Markup.empty) (SOME o Symbol_Pos.implode o #1) str of
   886         SOME "_" => ([], consts_of thy)
   886         SOME "_" => ([], consts_of thy)
   887       | SOME s =>
   887       | SOME s =>
   888           if String.isSuffix "._" s
   888           if String.isSuffix "._" s
   889           then ([], consts_of_select (Context.this_theory thy (unsuffix "._" s)))
   889           then ([], consts_of_select (Context.this_theory thy (unsuffix "._" s)))
   890           else ([Code.read_const thy str], [])
   890           else ([Code.read_const thy str], [])