\DOC remove_ovl_mapping \TYPE {remove_ovl_mapping: string -> {Name:string,Thy:string} -> unit} \SYNOPSIS

advertisement
\DOC remove_ovl_mapping
\TYPE {remove_ovl_mapping: string -> {Name:string,Thy:string} -> unit}
\SYNOPSIS
Removes an overloading mapping between the string and constant specified.
\KEYWORDS
Parsing, pretty-printing, overloading.
\LIBRARY
Parse
\DESCRIBE
Each grammar maintains two maps internally. One is from strings to
non-empty sets of {Thy}-{Name} pairs, and the other is from
{Thy}-{Name} pairs to strings. (Each {Thy}-{Name} pair serves to
specify a constant without needing to worry about different type
instantiations of that constant.) The first map is used to resolve
overloading when parsing. A string will eventually be turned into one
of the constants in the set that it maps to. When printing a
constant, the map in the opposite direction is used to turn a constant
into a string.
A call to {remove_ovl_mapping s {Name,Thy}} removes the given pair
from both maps.
\FAILURE
Never fails. If the given pair is not in either map, the function
silently does nothing.
\USES
To prune the overloading maps of unwanted possibilities.
\COMMENTS
Note that removing a print-mapping for a constant will result in that
constant always printing fully qualified as {thy$name}. This
situation will persist until that constant is given a name to map to
(either with {overload_on} or {update_overload_maps}).
As with other parsing functions, there is a sister function,
{temp_remove_ovl_mapping} that does the same thing, but whose effect
is not saved to a theory file.
\SEEALSO
Parse.clear_overloads_on, Parse.overload_on, Parse.update_overload_maps.
\ENDDOC
Download