Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / toplevel / genprintval.mli
blob898588b2ddbbcf3b90b1c663293b576d37171e5f
1 (***********************************************************************)
2 (* *)
3 (* Objective Caml *)
4 (* *)
5 (* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
10 (* *)
11 (***********************************************************************)
13 (* $Id$ *)
15 (* Printing of values *)
17 open Types
18 open Format
20 module type OBJ =
21 sig
22 type t
23 val obj : t -> 'a
24 val is_block : t -> bool
25 val tag : t -> int
26 val size : t -> int
27 val field : t -> int -> t
28 end
30 module type EVALPATH =
31 sig
32 type value
33 val eval_path: Path.t -> value
34 exception Error
35 val same_value: value -> value -> bool
36 end
38 module type S =
39 sig
40 type t
41 val install_printer :
42 Path.t -> Types.type_expr -> (formatter -> t -> unit) -> unit
43 val remove_printer : Path.t -> unit
44 val outval_of_untyped_exception : t -> Outcometree.out_value
45 val outval_of_value :
46 int -> int ->
47 (int -> t -> Types.type_expr -> Outcometree.out_value option) ->
48 Env.t -> t -> type_expr -> Outcometree.out_value
49 end
51 module Make(O : OBJ)(EVP : EVALPATH with type value = O.t) :
52 (S with type t = O.t)