Ppxlib.type_is_recursive
(new type_is_recursive rec_flag tds)#go ()
returns whether rec_flag, tds
is really a recursive type. We disregard recursive occurrences appearing in arrow types. You can override the search for certain type expressions by inheriting from this class.
Note that this is an approximation due to global and/or local openings of modules.
module M = struct
type t = Foo
end
type t = M.(t)
The outer t
will return Recursive
even though it is not.