1 (**************************************************************************)
2 (* *)
3 (* OCaml *)
4 (* *)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. *)
9 (* *)
10 (* All rights reserved. This file is distributed under the terms of *)
11 (* the GNU Lesser General Public License version 2.1, with the *)
12 (* special exception on linking described in the file LICENSE. *)
13 (* *)
14 (**************************************************************************)
15
16 (* Translation from typed abstract syntax to lambda terms,
17 for the core language *)
18
19 open Asttypes
20 open Typedtree
21 open Lambda
22
23 val pure_module : module_expr -> let_kind
24
25 val transl_exp: expression -> lambda
26 val transl_apply: ?should_be_tailcall:bool
27 -> ?inlined:inline_attribute
28 -> ?specialised:specialise_attribute
29 -> lambda -> (arg_label * expression option) list
30 -> Location.t -> lambda
31 val transl_let: rec_flag -> value_binding list -> lambda -> lambda
32
33 val transl_extension_constructor: Env.t -> Path.t option ->
34 extension_constructor -> lambda
35
36 type error =
37 Free_super_var
38 | Unreachable_reached
39
40 exception Error of Location.t * error
41
42 open Format
43
44 val report_error: formatter -> error -> unit
45
46 (* Forward declaration -- to be filled in by Translmod.transl_module *)
47 val transl_module :
48 (module_coercion -> Path.t option -> module_expr -> lambda) ref
49 val transl_object :
50 (Ident.t -> string list -> class_expr -> lambda) ref
51