sequence.mli 1.3 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 any_xtransformable: Types.t
10

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

15

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

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

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

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

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

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

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