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
|
|
|
val maybe_pointer: expression -> bool
|
|
|
|
|
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
|
1995-05-04 03:15:53 -07:00
|
|
|
val transl_exception: Ident.t -> exception_declaration -> lambda
|
|
|
|
|
|
|
|
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 *)
|
|
|
|
val transl_module : (module_coercion -> module_expr -> lambda) ref
|