mltypes.mli 655 Bytes
Newer Older
1
2
3
4
open OCaml_all
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
val read_cmi: string -> string * (string * Types.type_expr * t) list
21
22

val print : Format.formatter -> t -> unit
23
val print_ocaml : Format.formatter -> Types.type_expr -> unit
24
25


26
val find_value: string -> t * int