From: Swaroop Sridhar <swaroop@cs.jhu.edu>
> How are arbitrary recursive types implemented in caml? Is it done using
> an explicit fix point combinator "type" so that the unifier itself does
> not go into an infinite loop?
No, types are just implemented as (cyclic) graphs.
All functions in the type checker have to be careful about not going
into infinite loops. There are various techniques for that, either
keeping a list/set of visited nodes, or using some mutable fields.
A few years ago, infinite loops were a commonly reported bug :-)
Jacques Garrigue