Commit faa7a61b authored by POTTIER Francois's avatar POTTIER Francois

The classes [VisitorsRuntime.fold] and [VisitorsRuntime.fold2] are empty.

parent d0afb84f
......@@ -4,10 +4,6 @@ TODO (REALLY)
Add [opaque] as an option, carrying a list of types?
Decide what to put in the class VisitorsRuntime.fold.
Provide no methods at all, so we do not fix the types of these methods?
Let the user provide their own methods via [ancestors].
Include an option [except] to omit the definition of certain methods.
That would allow the user to provide their own implementation,
(possibly inherited / polymorphic),
......@@ -47,6 +43,8 @@ Announce.
TODO (PERHAPS)
Detect and reject existential types and GADTs.
Could define a fold visitor where the methods receive the names of the types,
data constructors, and record fields that are being visited. (As in
ppx_tools/genlifter.)
......
......@@ -500,6 +500,11 @@ end
class ['self] fold = object (_self)
(* No methods are provided, as we do not wish to fix the types of these
methods. It is up to the user to inherit from a class that defines
appropriate methods. Note that [RuntimeVisitors.map] is likely to be
appropriate in many situations. *)
end
(* -------------------------------------------------------------------------- *)
......@@ -831,4 +836,6 @@ end
class ['self] fold2 = object (_self)
(* See the comment in the class [fold] above. *)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment