39 lines
1.3 KiB
OCaml
39 lines
1.3 KiB
OCaml
(***********************************************************************)
|
|
(* *)
|
|
(* Objective Caml *)
|
|
(* *)
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
(* *)
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
|
(* Automatique. Distributed only by permission. *)
|
|
(* *)
|
|
(***********************************************************************)
|
|
|
|
(* $Id$ *)
|
|
|
|
(* Translation from typed abstract syntax to lambda terms,
|
|
for the core language *)
|
|
|
|
open Asttypes
|
|
open Types
|
|
open Typedtree
|
|
open Lambda
|
|
|
|
val name_pattern: string -> (pattern * 'a) list -> Ident.t
|
|
val maybe_pointer: expression -> bool
|
|
|
|
val transl_exp: expression -> lambda
|
|
val transl_let:
|
|
rec_flag -> (pattern * expression) list -> lambda -> lambda
|
|
val transl_primitive: Primitive.description -> lambda
|
|
val transl_exception: Ident.t -> exception_declaration -> lambda
|
|
|
|
type error =
|
|
Illegal_letrec_pat
|
|
| Illegal_letrec_expr
|
|
| Free_super_var
|
|
|
|
exception Error of Location.t * error
|
|
|
|
val report_error: error -> unit
|