Error: Cannot safely evaluate the definition of the recursively-defined module
问题 I'm curious to understand why this error happens and which is the best way to get around it. I have a couple of files types.ml and types.mli which define a variant type value that can be of many different builtin OCaml types (float, int, list, map, set, etc..). Since I have to use the std-lib over this variant type I needed to concretize the Set module through the functor to be able to use sets of value type by defining the ValueSet module. The final .ml file is something like: module rec I :