-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathtranslcore.mli
73 lines (61 loc) · 2.98 KB
/
translcore.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* en Automatique. *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(* Translation from typed abstract syntax to lambda terms,
for the core language *)
open Asttypes
open Typedtree
open Lambda
open Debuginfo.Scoped_location
val pure_module : module_expr -> let_kind
(* Used for translating Alloc_heap values in classes and modules. *)
val transl_exp: scopes:scopes -> Jkind.Sort.Const.t -> expression -> lambda
val transl_apply: scopes:scopes
-> ?tailcall:tailcall_attribute
-> ?inlined:inlined_attribute
-> ?specialised:specialise_attribute
-> ?position:region_close
-> ?mode:locality_mode
-> result_layout:Lambda.layout
-> lambda
-> (arg_label * apply_arg) list
-> scoped_location -> lambda
val transl_let: scopes:scopes -> return_layout:layout -> ?in_structure:bool
-> rec_flag -> value_binding list -> lambda -> lambda
val transl_extension_constructor: scopes:scopes ->
Env.t -> Longident.t option ->
extension_constructor -> lambda
val transl_scoped_exp : scopes:scopes -> Jkind.Sort.Const.t -> expression -> lambda
type error =
Free_super_var
| Unreachable_reached
| Bad_probe_layout of Ident.t
| Illegal_void_record_field
| Illegal_product_record_field of Jkind.Sort.Const.t
| Void_sort of Types.type_expr
| Unboxed_vector_in_array_comprehension
| Unboxed_product_in_array_comprehension
exception Error of Location.t * error
open Format
val report_error: formatter -> error -> unit
(* Forward declaration -- to be filled in by Translmod.transl_module *)
val transl_module :
(scopes:scopes -> module_coercion -> Longident.t option ->
module_expr -> lambda) ref
val transl_object :
(scopes:scopes -> Ident.t -> string list ->
class_expr -> lambda) ref
(* Declarations to be wrapped around the entire body *)
val clear_probe_handlers : unit -> unit
val declare_probe_handlers : lambda -> lambda