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
|
|
|
(* Substitutions *)
|
|
|
|
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
type t
|
|
|
|
|
1997-03-14 07:16:30 -08:00
|
|
|
(*
|
|
|
|
Substitutions are used to translate a type from one context to
|
|
|
|
another. This requires substituing paths for identifiers, and
|
|
|
|
possibly also lowering the level of non-generic variables so that
|
|
|
|
it be inferior to the maximum level of the new context.
|
|
|
|
|
|
|
|
Substitutions can also be used to create a "clean" copy of a type.
|
|
|
|
Indeed, non-variable node of a type are duplicated, with their
|
|
|
|
levels set to generic level. That way, the resulting type is
|
|
|
|
well-formed (decreasing levels), even if the original one was not.
|
|
|
|
*)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
val identity: t
|
|
|
|
|
|
|
|
val add_type: Ident.t -> Path.t -> t -> t
|
|
|
|
val add_module: Ident.t -> Path.t -> t -> t
|
|
|
|
val add_modtype: Ident.t -> module_type -> t -> t
|
2002-04-03 19:49:58 -08:00
|
|
|
val for_saving: t -> t
|
2002-04-04 14:19:02 -08:00
|
|
|
val reset_for_saving: unit -> unit
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
val type_expr: t -> type_expr -> type_expr
|
1998-06-24 12:22:26 -07:00
|
|
|
val class_type: t -> class_type -> class_type
|
1995-05-04 03:15:53 -07:00
|
|
|
val value_description: t -> value_description -> value_description
|
|
|
|
val type_declaration: t -> type_declaration -> type_declaration
|
|
|
|
val exception_declaration:
|
|
|
|
t -> exception_declaration -> exception_declaration
|
1998-06-24 12:22:26 -07:00
|
|
|
val class_declaration: t -> class_declaration -> class_declaration
|
|
|
|
val cltype_declaration: t -> cltype_declaration -> cltype_declaration
|
1995-05-04 03:15:53 -07:00
|
|
|
val modtype: t -> module_type -> module_type
|
|
|
|
val signature: t -> signature -> signature
|
|
|
|
val modtype_declaration: t -> modtype_declaration -> modtype_declaration
|