Equal? recursively compares the contents of pairs, vectors, and strings, applying eqv? on other objects such as numbers and symbols. A rule of thumb is that objects are generally equal? if they print the same. Equal? may fail to terminate if its arguments are circular data structures.
There is a silver lining though. In R6RS the following was added:
Note: The equal? procedure must always terminate, even if its arguments contain cycles.
That is, there is a good chance that the behaviour of equal? changes, when the PLT Scheme team begins implementing the R6RS language.
I submitted a bug report to PLT Scheme about that. Here's their answer :
"The process for generating an `equal?' hash key is defined to not
terminate on circular objects, such as a hash table that contains
itself. So `(hash-table-get <any-table> t)' loops trying to generate a
key for `t'.
The specification of hashing has changed for the next release to deal
gracefully with cyclic data, just as `equal?' has changed so that it
can compare cyclic data. In the current pre-release version,
v3.99.0.10, your example returns immediately.
(It returns with a "key not found" error. That's because the process of installing a hash table into itself changes the table's own `equal?'
hash key.)"