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
type unary_op =
| Not
| Shift of Timedesc.Span.t
| Lengthen of Timedesc.Span.t
| With_tz of Timedesc.Time_zone.t
type chunking =
[ `Disjoint_intervals
| `By_duration of Timedesc.Span.t
| `By_duration_drop_partial of Timedesc.Span.t
| `At_year_boundary
| `At_month_boundary
]
type chunked_unary_op_on_t =
| Chunk_disjoint_interval
| Chunk_at_year_boundary
| Chunk_at_month_boundary
| Chunk_by_duration of {
chunk_size : Timedesc.Span.t;
drop_partial : bool;
}
type chunked_unary_op_on_chunked =
| Drop of int
| Take of int
| Take_nth of int
| Nth of int
| Chunk_again of chunked_unary_op_on_t
type t =
| Empty
| All
| Intervals of (Timedesc.Span.t * Timedesc.Span.t) Seq.t
| Pattern of Pattern.t
| Unary_op of unary_op * t
| Inter_seq of t Seq.t
| Union_seq of t Seq.t
| Bounded_intervals of {
pick : [ `Whole | `Snd ];
bound : Timedesc.Span.t;
start : Points.t;
end_exc : Points.t;
}
| Unchunk of chunked
and chunked =
| Unary_op_on_t of chunked_unary_op_on_t * t
| Unary_op_on_chunked of chunked_unary_op_on_chunked * chunked