Instead of
function "=" (Left, Right : Short_String_Map.Map) return Boolean is
(Left = Right);
write
function "=" (Left, Right : Short_String_Map.Map) return Boolean is
(Short_String_Map."=" (Left, Right));
or, even better (I think):
function "=" (Left, Right : Short_String_Map.Map) return Boolean
renames Short_String_Map."=";
The problem is that the way you wrote it, the =
in Left = Right
refers to the "="
that you just defined on the line above, according to the visibility rules. Naturally this means you've just defined an infinitely recursive function. To use the "="
defined in Short_String_Map
instead, you have to use a syntax like Short_String_Map."="(Left,Right)
to make it explicit which "="
you're referring to.