[m-dev.] :- type map(K,V) == tree234(K,V).
Fergus Henderson
fjh at cs.mu.oz.au
Fri Nov 14 02:43:32 AEDT 1997
David Glen JEFFERY, you wrote:
>
> I notice that the type declaration of map:
>
> :- type map(K,V) == tree234(K,V).
>
> appears in the interface of the module.
>
> This seems to be because at various spots in the compiler, the map is treated
> as a 234 tree when spitting out some stats (to make sure it is balanced etc.)
>
> Is this still needed, and is so, would someone like to add an appropriate
> comment to map.m?
The ideal solution, IMHO, would be to add a predicate to map.m called say
map__print_stats; that would be independent of the representation.
Then the code in various parts of the compiler would need to be
modified to use that predicate rather than tree__depth, etc.
Then you could move that equivalence type definition from the interface to
the implementation.
This is about #423 on my priority list; volunteers appreciated ;-)
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list