[m-dev.] Foreign type compare and unification

Peter Schachte schachte at cs.mu.OZ.AU
Tue May 14 12:33:32 AEST 2002


On Mon, May 13, 2002 at 05:34:12PM +1000, Fergus Henderson wrote:
> User-defined comparison is still not a complete solution to the problem.
> You also need user-defined io__print, for example.
> It would be nicer to devise a solution that doesn't single out
> comparison, but would work equally well for hashing, printing, etc.

That would be nice, but I don't think it's practical.

People are going to want to print out terms in fancy ways (eg, sets
with curley braces, maps as a comma-separated list of Key=>Value
pairs, etc).  When hashing some types of terms, they may use the fact
that some information is redundant, and not consider it in computing
the hash.  However, they may still want to write that redeundant info
when pickling the term, so it loads quickly.

I think you really need to let users define these predicates any way
they like.


-- 
Peter Schachte              In any great organization it is far, far safer
schachte at cs.mu.OZ.AU        to be wrong with the majority than to be right
www.cs.mu.oz.au/~schachte/  alone.
Phone: +61 3 8344 9166          -- John Kenneth Galbraith 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list