aboutsummaryrefslogtreecommitdiff
path: root/interp/notation.mli
diff options
context:
space:
mode:
authorPierre Roux2020-09-03 13:22:00 +0200
committerPierre Roux2020-11-05 00:20:19 +0100
commit9082af80f5bb70ff2b75117f9e5cc3165b1c8b42 (patch)
treed5ac5601c174fec7eecb0f926823fcf5e9ede076 /interp/notation.mli
parentb51a8a0257aa18a503f59decc729e1d59650fce2 (diff)
[numeral notation] Allow to put/ignore holes during pre/postprocessing
This will enable to handle implicit arguments by ignoring them during preprocessing (before uninterpreting (i.e., printing)) and remplace them with holes `_` during postprocessing (after interpreting (i.e., parsing)).
Diffstat (limited to 'interp/notation.mli')
-rw-r--r--interp/notation.mli4
1 files changed, 3 insertions, 1 deletions
diff --git a/interp/notation.mli b/interp/notation.mli
index 44143e392f..012aaac8f0 100644
--- a/interp/notation.mli
+++ b/interp/notation.mli
@@ -164,8 +164,10 @@ type 'target conversion_kind = 'target * option_kind
are translated acording to [args] where [ToPostCopy] means that the
argument is kept unchanged and [ToPostAs k] means that the
argument is recursively translated according to [l_k].
+ [ToPostHole] introduces an additional implicit argument hole
+ (in the reverse translation, the corresponding argument is removed).
When [n] is null, no translation is performed. *)
-type to_post_arg = ToPostCopy | ToPostAs of int
+type to_post_arg = ToPostCopy | ToPostAs of int | ToPostHole
type ('target, 'warning) prim_token_notation_obj =
{ to_kind : 'target conversion_kind;
to_ty : GlobRef.t;