diff options
| author | herbelin | 2002-04-10 16:07:52 +0000 |
|---|---|---|
| committer | herbelin | 2002-04-10 16:07:52 +0000 |
| commit | 9b8e006e0c84408992f42bd9d713eacf2936a6d3 (patch) | |
| tree | 890f9572f385abe4dd80506ee2bb0c0ac81392b9 /lib | |
| parent | d69ce3d0733a7e306514734a2b56d7e112f84f1d (diff) | |
Amélioration des messages d'erreurs concernant l'inférence des implicites
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2630 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/util.ml | 4 | ||||
| -rw-r--r-- | lib/util.mli | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml index 6632beaf29..cd575bf08a 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -523,6 +523,10 @@ let pr_coma () = str "," ++ spc () let pr_semicolon () = str ";" ++ spc () let pr_bar () = str "|" ++ spc () +let pr_ord n = + let suff = match n mod 10 with 1 -> "st" | 2 -> "nd" | _ -> "th" in + int n ++ str suff + let rec prlist elem l = match l with | [] -> mt () | h::t -> Stream.lapp (fun () -> elem h) (prlist elem t) diff --git a/lib/util.mli b/lib/util.mli index aa7042903d..6bbe609cbd 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -172,6 +172,7 @@ val pr_str : string -> std_ppcmds val pr_coma : unit -> std_ppcmds val pr_semicolon : unit -> std_ppcmds val pr_bar : unit -> std_ppcmds +val pr_ord : int -> std_ppcmds val prlist : ('a -> std_ppcmds) -> 'a list -> std_ppcmds val prvecti : (int -> 'a -> std_ppcmds) -> 'a array -> std_ppcmds |
