From 6d9e008ffd81bbe927e3442fb0c37269ed25b21f Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sat, 14 Jan 2017 01:27:40 +0100 Subject: [location] Use Loc.located for constr_expr. This is the second patch, which is a bit more invasive. We reasoning is similar to the previous patch. Code is not as clean as it could as we would need to convert `glob_constr` to located too, then a few parts could just map the location. --- lib/loc.mli | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/loc.mli') diff --git a/lib/loc.mli b/lib/loc.mli index fef1d8938..7fc8efaa8 100644 --- a/lib/loc.mli +++ b/lib/loc.mli @@ -61,6 +61,11 @@ type 'a located = t * 'a val to_pair : 'a located -> t * 'a val tag : ?loc:t -> 'a -> 'a located +val with_loc : (loc:t -> 'a -> 'b) -> 'a located -> 'b + +val map : ('a -> 'b) -> 'a located -> 'b located +val map_with_loc : (loc:t -> 'a -> 'b) -> 'a located -> 'b located + val located_fold_left : ('a -> 'b -> 'a) -> 'a -> 'b located -> 'a val down_located : ('a -> 'b) -> 'a located -> 'b -- cgit v1.2.3