mltypes.mli 818 Bytes
Newer Older
1
open Caml_cduce
2
3
4
open Asttypes
open Types

5
6
exception Error of string

7
8
9
type t = { uid : int; mutable recurs : int; mutable def : def }
and def =
  | Link of t
10
  | Arrow of string * t * t
11
12
  | Tuple of t list
  | PVariant of (string * t option) list  (* Polymorphic variant *)
13
14
  | Variant of string * (string * t list) list * bool
  | Record of string * (string * t) list * bool
15
16
  | Builtin of string * t list
  | Abstract of string
17
  | Var of int
18
19


20
21
22
23
24
(* Load an external .cmi *)
val has_cmi: string -> bool
val load_cmi: string -> (string * t) list

(* Load the .cmi corresponding to a CDuce compilation unit *)
25
val read_cmi: string -> string * (string * Types.type_expr * t) list
26
27

val print : Format.formatter -> t -> unit
28
val print_ocaml : Format.formatter -> Types.type_expr -> unit
29
30


31
val find_value: string -> t * int
32