2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* 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. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
1995-08-09 08:06:35 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Translation from typed abstract syntax to lambda terms,
|
|
|
|
for the core language *)
|
|
|
|
|
|
|
|
open Asttypes
|
|
|
|
open Typedtree
|
|
|
|
open Lambda
|
2020-03-17 07:59:42 -07:00
|
|
|
open Debuginfo.Scoped_location
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2018-04-08 01:51:15 -07:00
|
|
|
val pure_module : module_expr -> let_kind
|
|
|
|
|
2020-03-17 07:59:42 -07:00
|
|
|
val transl_exp: scopes:scopes -> expression -> lambda
|
|
|
|
val transl_apply: scopes:scopes
|
2020-04-12 06:28:13 -07:00
|
|
|
-> ?tailcall:tailcall_attribute
|
2015-04-18 15:23:33 -07:00
|
|
|
-> ?inlined:inline_attribute
|
2016-02-10 04:03:40 -08:00
|
|
|
-> ?specialised:specialise_attribute
|
2015-11-24 15:37:46 -08:00
|
|
|
-> lambda -> (arg_label * expression option) list
|
2020-03-17 07:59:42 -07:00
|
|
|
-> scoped_location -> lambda
|
|
|
|
val transl_let: scopes:scopes -> ?in_structure:bool -> rec_flag
|
|
|
|
-> value_binding list -> lambda -> lambda
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2020-03-17 07:59:42 -07:00
|
|
|
val transl_extension_constructor: scopes:scopes ->
|
|
|
|
Env.t -> Path.t option ->
|
2015-11-20 01:18:49 -08:00
|
|
|
extension_constructor -> lambda
|
|
|
|
|
2020-03-17 07:59:42 -07:00
|
|
|
val transl_scoped_exp : scopes:scopes -> expression -> lambda
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
type error =
|
2017-09-21 16:04:41 -07:00
|
|
|
Free_super_var
|
2015-10-15 17:13:40 -07:00
|
|
|
| Unreachable_reached
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
exception Error of Location.t * error
|
|
|
|
|
2000-03-06 14:12:09 -08:00
|
|
|
open Format
|
|
|
|
|
|
|
|
val report_error: formatter -> error -> unit
|
1998-02-26 04:54:44 -08:00
|
|
|
|
|
|
|
(* Forward declaration -- to be filled in by Translmod.transl_module *)
|
1998-06-23 03:06:50 -07:00
|
|
|
val transl_module :
|
2020-03-17 07:59:42 -07:00
|
|
|
(scopes:scopes -> module_coercion -> Path.t option ->
|
|
|
|
module_expr -> lambda) ref
|
2003-11-25 01:20:45 -08:00
|
|
|
val transl_object :
|
2020-03-17 07:59:42 -07:00
|
|
|
(scopes:scopes -> Ident.t -> string list ->
|
|
|
|
class_expr -> lambda) ref
|