sequence.mli 1.23 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_tree: 
15
  (Types.t -> Types.t * Types.t) -> Types.t -> Types.t
16
 (* input type -> (result, residual) *)         (* sequence type *)
17

18
19
20
val map_mono: Types.t -> Types.t list * (Types.t list -> Types.t)
val map_tree_mono: Types.t -> Types.t -> Types.t list * (Types.t list -> Types.t)

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

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

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

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

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