aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
Diffstat (limited to 'interp')
-rw-r--r--interp/smartlocate.ml4
-rw-r--r--interp/smartlocate.mli2
2 files changed, 6 insertions, 0 deletions
diff --git a/interp/smartlocate.ml b/interp/smartlocate.ml
index 7ad5561e3..422497ab3 100644
--- a/interp/smartlocate.ml
+++ b/interp/smartlocate.ml
@@ -75,3 +75,7 @@ let smart_global_inductive = function
| ByNotation (loc,ntn,sc) ->
destIndRef
(Notation.interp_notation_as_global_reference loc isIndRef ntn sc)
+
+let loc_of_smart_reference = function
+ | AN r -> loc_of_reference r
+ | ByNotation (loc,_,_) -> loc
diff --git a/interp/smartlocate.mli b/interp/smartlocate.mli
index 9006e3687..f8840ca0e 100644
--- a/interp/smartlocate.mli
+++ b/interp/smartlocate.mli
@@ -37,3 +37,5 @@ val smart_global : ?head:bool -> reference or_by_notation -> global_reference
(** The same for inductive types *)
val smart_global_inductive : reference or_by_notation -> inductive
+(** Return the loc of a smart reference *)
+val loc_of_smart_reference : reference or_by_notation -> Loc.t