From 9b4927d7fdbbafa7ed372e152e7106b3055dfb99 Mon Sep 17 00:00:00 2001 From: herbelin Date: Thu, 22 Jul 2010 21:06:06 +0000 Subject: Constrintern: unified push_name_env and push_loc_name_env; made location dumping for binders uniformly treated in constrintern.ml (and renamed the optional arg of interp_context from fail_anonymous to global_level since the flag now also decides whether to dump binders as global or local ones); added locations for the variables occurring in the "as in" clauses; git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13314 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/util.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/util.ml') diff --git a/lib/util.ml b/lib/util.ml index 20481adf3a..16e00a0899 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -42,6 +42,7 @@ let invalid_arg_loc (loc,s) = Loc.raise loc (Invalid_argument s) let located_fold_left f x (_,a) = f x a let located_iter2 f (_,a) (_,b) = f a b +let down_located f (_,a) = f a (* Like Exc_located, but specifies the outermost file read, the filename associated to the location of the error, and the error itself. *) @@ -65,6 +66,11 @@ let pi1 (a,_,_) = a let pi2 (_,a,_) = a let pi3 (_,_,a) = a +(* Projection operator *) + +let down_fst f x = f (fst x) +let down_snd f x = f (snd x) + (* Characters *) let is_letter c = (c >= 'a' && c <= 'z') or (c >= 'A' && c <= 'Z') -- cgit v1.2.3