You mean between classes and types here, of course.
> leave me with much confidence that I can figure out whether a particular
> kind of mutual recursion is possible.:-|
> I've seen various statements about recursion between modules being
> impossible, but I'm not sure exactly how severe a limitation this is
> in practice, especially given the possibility of hacks like the one
That hack, which I've seen called the "parameterization trick" (we really
need a better, sexier sounding name for it) is the way you currently
create a recursion between a type definition and a functor instantiation.
> In particular, I'm curious whether it's possible to define
> a record type Foo which contains a functor-defined data structure which
> refer to objects of type Foo. E.g., in OCaml is there any way
> to define a record type Foo one of whose fields is a Set of Foo?
You use that same trick. It also means that you must make a polymorphic
version of Set to participate in the recursion; the library Set won't do.
Check this out
It's my guess that every frequent user of OCaml or SML bangs into this
within their first 9 months of serious ML programming, and most likely
long before that.
> In general, I'd be interested in any pointers to treatments of this
> problem and the theoretical limits involved.
as he is the one working on it and he has pointers to related work there.