sequence.mli 1.32 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
val string_latin1: Types.t
9
val char_latin1: Types.t
10
val any_xtransformable: Types.t
11

12
13
14
val concat: Types.t -> Types.t -> Types.t
val flatten: Types.t -> Types.t
val map: (Types.t -> Types.t) -> Types.t -> Types.t
15

16

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

21
val map_mono: Types.t -> Types.t list * (Types.t list -> Types.t)
22
val map_tree_mono: Types.t -> Types.t -> Types.t * Types.t list * (Types.t list -> Types.t)
23

24
val star: Types.t -> Types.t
25
  (* For a type t, returns [t*] *)
26
val plus: Types.t -> Types.t
27
28
val option: Types.Node.t -> Types.t
  (* returns [t?] *)
29

30
31
32
val repet: int -> int option -> Types.t -> Types.t
  (* min, max *)

33
val approx: Types.t -> Types.t
34
35
36
37
38
39
  (*  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))
  *)
40

41
42
43
(* Added this interface needed in cdo2cmo -- Julien *)
val star_node : Types.Node.t -> Types.Node.t

44
  (** given a list of descrs create the sequence type from them *)
45
val seq_of_list: Types.t list -> Types.t
46