1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Translation from typed abstract syntax to lambda terms,
|
|
|
|
for the core language *)
|
|
|
|
|
|
|
|
open Asttypes
|
1996-09-23 04:30:27 -07:00
|
|
|
open Types
|
1995-05-04 03:15:53 -07:00
|
|
|
open Typedtree
|
|
|
|
open Lambda
|
|
|
|
|
1996-09-23 04:30:27 -07:00
|
|
|
val name_pattern: string -> (pattern * 'a) list -> Ident.t
|
1996-04-22 04:15:41 -07:00
|
|
|
|
1995-12-15 02:18:29 -08:00
|
|
|
val transl_exp: expression -> lambda
|
2007-05-16 01:21:41 -07:00
|
|
|
val transl_apply: lambda -> (expression option * optional) list
|
|
|
|
-> Location.t -> lambda
|
1995-05-04 03:15:53 -07:00
|
|
|
val transl_let:
|
1995-12-15 02:18:29 -08:00
|
|
|
rec_flag -> (pattern * expression) list -> lambda -> lambda
|
1995-10-23 09:56:52 -07:00
|
|
|
val transl_primitive: Primitive.description -> lambda
|
1998-06-23 03:06:50 -07:00
|
|
|
val transl_exception:
|
|
|
|
Ident.t -> Path.t option -> exception_declaration -> lambda
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1998-11-30 10:25:12 -08:00
|
|
|
val check_recursive_lambda: Ident.t list -> lambda -> bool
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
type error =
|
|
|
|
Illegal_letrec_pat
|
|
|
|
| Illegal_letrec_expr
|
1996-04-22 04:15:41 -07:00
|
|
|
| Free_super_var
|
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 :
|
|
|
|
(module_coercion -> Path.t option -> module_expr -> lambda) ref
|
2003-11-25 01:20:45 -08:00
|
|
|
val transl_object :
|
|
|
|
(Ident.t -> string list -> class_expr -> lambda) ref
|