sequence.mli 1.09 KB
Newer Older
1
2
val nil_type: Types.t
val nil_node: Types.Node.t
3
val nil_atom: Atoms.V.t
4
val nil_cst:  Types.Const.t
5
6
7
val any: Types.t
val seqseq: Types.t
val string: Types.t
8

9
10
11
val concat: Types.t -> Types.t -> Types.t
val flatten: Types.t -> Types.t
val map: (Types.t -> Types.t) -> Types.t -> Types.t
12

13
14
val map_mono: Types.t -> Types.t list * (Types.t list -> Types.t)

15
val map_tree: 
16
  (Types.t -> Types.t * Types.t) -> Types.t -> Types.t
17
 (* input type -> (result, residual) *)         (* sequence type *)
18

19
val star: Types.t -> Types.t
20
  (* For a type t, returns [t*] *)
21
val plus: Types.t -> Types.t
22

23
24
25
val repet: int -> int option -> Types.t -> Types.t
  (* min, max *)

26
val approx: Types.t -> Types.t
27
28
29
30
31
32
  (*  For a type t <= [Any*], returns the least type s such that:
      t <= [s*]
      
      In general, for an arbitrary type, returns the least type s such that:
      t <= (X where X = (s, X) |  Any \ (Any,Any))
  *)
33

34
35
36
(* Added this interface needed in cdo2cmo -- Julien *)
val star_node : Types.Node.t -> Types.Node.t

37
  (** given a list of descrs create the sequence type from them *)
38
val seq_of_list: Types.t list -> Types.t
39