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 *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $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
|
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
|
|
|
|
|
|
|
|
val report_error: 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
|