Source file UnitWeightIterator.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
(******************************************************************************)
(*                                                                            *)
(*                                    Sek                                     *)
(*                                                                            *)
(*          Arthur Charguéraud, Émilie Guermeur and François Pottier          *)
(*                                                                            *)
(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
(*  terms of the GNU Lesser General Public License as published by the Free   *)
(*  Software Foundation, either version 3 of the License, or (at your         *)
(*  option) any later version, as described in the file LICENSE.              *)
(*                                                                            *)
(******************************************************************************)

open PrivateSignatures

module[@inline] Make
  (SChunk : SCHUNK)
  (I : WITER with type 'a measure = 'a SChunk.measure)
= struct

open SChunk

type 'a t =
  'a I.t

type 'a iter =
  (* An iterator on the underlying sequence. *)
  'a I.iter

let[@inline] create side s =
  I.create side s MUnit

let[@inline] reset side it =
  I.reset side it MUnit

let copy =
  I.copy

let sequence =
  I.sequence

let length =
  I.weight

let[@inline] index it =
  I.windex it MUnit

let[@inline] finished it =
  I.finished it MUnit

let[@inline] get it =
  I.get it MUnit

let[@inline] move pov it =
  I.move pov it MUnit

let[@inline] jump pov it k =
  I.jump pov it k MUnit

let[@inline] get_segment pov it =
  I.get_segment pov it MUnit

let[@inline] get_writable_segment pov it =
  I.get_writable_segment pov it MUnit

let[@inline] reach it i =
  I.reach it i MUnit

let[@inline] set it x =
  I.set it MUnit x

let is_valid =
  I.is_valid

let[@inline] check it =
  I.check it MUnit

let print element it =
  I.print element it MUnit

end (* Make *)