summaryrefslogtreecommitdiff
path: root/src/Values.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/Values.ml')
-rw-r--r--src/Values.ml16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Values.ml b/src/Values.ml
index 7b5e9537..9a932fc2 100644
--- a/src/Values.ml
+++ b/src/Values.ml
@@ -346,7 +346,21 @@ type abs = {
which are a special kind of value.
*)
-class virtual ['self] map_g_value =
+(** Monomorphic version of the map visitor for [g_typed_value].
+
+ The type variables are quantified at the level of the class (not at the
+ level of each method). As a consequence, the visit methods don't need to
+ take closures as parameters.
+
+ The polymorphic visitor generated by the visitors macro caused some
+ trouble: it was in some cases not possible to override a function
+ to refine the behaviour of a visitor. With this version, it is
+ possible. Note that this works only because the polymorphism of
+ [g_value], [g_adt_value], etc. is "uniform": the type instantiation
+ is always the same.
+
+*)
+class virtual ['self] map_g_typed_value =
object (self : 'self)
inherit [_] VisitorsRuntime.map