~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to contrib/interface/paths.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
let int_list_to_string s l =
 
2
    List.fold_left 
 
3
       (fun s -> (fun v -> s ^ " " ^ (string_of_int v)))
 
4
       s
 
5
       l;;
 
6
 
 
7
(* Given two paths, this function returns the longest common prefix and the
 
8
   two suffixes. *)
 
9
let rec decompose_path
 
10
     : (int list * int list) -> (int list * int list * int list) =
 
11
   function
 
12
       (a::l,b::m) when a = b ->
 
13
         let (c,p1,p2) = decompose_path (l,m) in
 
14
         (a::c,p1,p2)
 
15
     |  p1,p2 -> [], p1, p2;;
 
16
 
 
17
let rec is_prefix p1 p2 = match p1,p2 with
 
18
  [], _ -> true
 
19
| a::tl1, b::tl2 when a = b -> is_prefix tl1 tl2
 
20
| _ -> false;;
 
21
 
 
22
let rec lex_smaller p1 p2 = match p1,p2 with
 
23
  [], _ -> true
 
24
| a::tl1, b::tl2 when a < b -> true
 
25
| a::tl1, b::tl2 when a = b -> lex_smaller tl1 tl2
 
26
| _ -> false;;