fun long_name_of (b as Binding {prefix, qualifier, name, ...}) = if is_empty b then"" else Long_Name.implode (map #1 (prefix @ qualifier) @ [name]);
fun pretty b = if is_empty b then Pretty.str "\"\"" else
Pretty.mark_str (Position.markup_properties (pos_of b) Markup.binding, long_name_of b)
|> Pretty.quote;
valprint = Pretty.unformatted_string_of o pretty;
val _ = ML_system_pp (fn _ => fn _ => Pretty.to_ML o pretty o reset_pos);
(* check *)
fun bad binding = "Bad name binding: " ^ print binding ^ Position.here (pos_of binding);
fun check binding = if Symbol_Pos.is_identifier (name_of binding) then () else legacy_feature (bad binding);
fun name_spec scopes path binding : name_spec = let val Binding {restricted, concealed, prefix, qualifier, name, ...} = binding; val _ = Long_Name.is_qualified name andalso error (bad binding);
val restriction =
(case restricted of
NONE => NONE
| SOME (strict, scope) => if member (op =) scopes scope then NONE else SOME strict);
val spec1 =
maps (fn (a, b) => map (rpair b) (Long_Name.explode a)) (path @ prefix @ qualifier); val spec2 = if name = ""then [] else [(name, true)]; val spec = spec1 @ spec2; val _ = exists (fn (a, _) => member (op =) bad_specs a orelse member_string a "\"") spec
andalso error (bad binding);
val spec' = if null spec2 then [] else spec; val suppress = map (not o #2) spec'; val full_name = Long_Name.implode (map #1 spec'); in
{restriction = restriction, concealed = concealed, suppress = suppress, full_name = full_name} end;
end;
type binding = Binding.binding;
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.