My working unpac repository
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
19open Asttypes
20open Typedtree
21open Lambda
22open Debuginfo.Scoped_location
23
24val pure_module : module_expr -> let_kind
25
26val transl_exp: scopes:scopes -> expression -> lambda
27val transl_apply: scopes:scopes
28 -> ?tailcall:tailcall_attribute
29 -> ?inlined:inline_attribute
30 -> ?specialised:specialise_attribute
31 -> lambda -> (arg_label * apply_arg) list
32 -> scoped_location -> lambda
33val transl_let: scopes:scopes -> ?in_structure:bool -> rec_flag
34 -> value_binding list -> lambda -> lambda
35
36val transl_extension_constructor: scopes:scopes ->
37 Env.t -> Path.t option ->
38 extension_constructor -> lambda
39
40val transl_scoped_exp : scopes:scopes -> expression -> lambda
41
42type error =
43 Free_super_var
44 | Unreachable_reached
45
46exception Error of Location.t * error
47
48val report_error: error Format_doc.format_printer
49val report_error_doc: error Format_doc.printer
50
51(* Forward declaration -- to be filled in by Translmod.transl_module *)
52val transl_module :
53 (scopes:scopes -> module_coercion -> Path.t option ->
54 module_expr -> lambda) ref
55val transl_struct_item :
56 (scopes:scopes -> Ident.t list -> Path.t option ->
57 structure_item -> (Ident.t list -> lambda) -> lambda) ref
58val transl_object :
59 (scopes:scopes -> Ident.t -> string list ->
60 class_expr -> lambda) ref