Querying descendants

It is often useful to find out the descendants of a package, i.e. all direct or indirect users of the package. There is another "ocamlfind" subcommand that allows us to query descendants. For example, to get the direct and indirect users of p, type in

ocamlfind query -descendants -recursive p

Note that -descendants has no effect without -recursive. The output is again sorted topologically.

The set of packages that are possible descendants is determined as follows:

After this set has been determined, the complete dependency graph is constructed on it. As the descendants are queried, the dependencies are read in the inverse way compared with queries of the ancestors.