diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-10-13 16:42:12 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-10-13 16:42:12 +0000 |
commit | 7f789e080d1b4b6ce6751ea024c82e0c84035bce (patch) | |
tree | 7095fab088dd0a71a0ab9eedeb9b78978c3ff204 /lib | |
parent | 891a2bbb018ef4ffba30f05de54f32b90dde68ec (diff) |
Ajout projections de triplet
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4625 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.ml | 6 | ||||
-rw-r--r-- | lib/util.mli | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml index 4d86f04f5..117eeef1f 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -31,6 +31,12 @@ let user_err_loc (loc,s,strm) = Stdpp.raise_with_loc loc (UserError (s,strm)) let invalid_arg_loc (loc,s) = Stdpp.raise_with_loc loc (Invalid_argument s) let join_loc (deb1,_) (_,fin2) = (deb1,fin2) +(* Projections from triplets *) + +let pi1 (a,_,_) = a +let pi2 (_,a,_) = a +let pi3 (_,_,a) = a + (* Characters *) let is_letter c = diff --git a/lib/util.mli b/lib/util.mli index 85c828abf..23791fecb 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -41,6 +41,12 @@ val user_err_loc : loc * string * std_ppcmds -> 'a val invalid_arg_loc : loc * string -> 'a val join_loc : loc -> loc -> loc +(*s Projections from triplets *) + +val pi1 : 'a * 'b * 'c -> 'a +val pi2 : 'a * 'b * 'c -> 'b +val pi3 : 'a * 'b * 'c -> 'c + (*s Chars. *) val is_letter : char -> bool |