1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
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
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Operations on module types *)
|
|
|
|
|
1996-09-23 04:33:27 -07:00
|
|
|
open Types
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
val scrape: Env.t -> module_type -> module_type
|
|
|
|
(* Expand toplevel module type abbreviations
|
|
|
|
till hitting a "hard" module type (signature, functor,
|
|
|
|
or abstract module type ident. *)
|
2004-02-14 09:38:02 -08:00
|
|
|
val freshen: module_type -> module_type
|
|
|
|
(* Return an alpha-equivalent copy of the given module type
|
|
|
|
where bound identifiers are fresh. *)
|
1995-05-04 03:15:53 -07:00
|
|
|
val strengthen: Env.t -> module_type -> Path.t -> module_type
|
|
|
|
(* Strengthen abstract type components relative to the
|
|
|
|
given path. *)
|
2013-09-27 10:05:39 -07:00
|
|
|
val strengthen_decl: Env.t -> module_declaration -> Path.t -> module_declaration
|
1995-05-04 03:15:53 -07:00
|
|
|
val nondep_supertype: Env.t -> Ident.t -> module_type -> module_type
|
|
|
|
(* Return the smallest supertype of the given type
|
|
|
|
in which the given ident does not appear.
|
1999-03-01 13:00:56 -08:00
|
|
|
Raise [Not_found] if no such type exists. *)
|
2004-04-09 06:32:28 -07:00
|
|
|
val no_code_needed: Env.t -> module_type -> bool
|
|
|
|
val no_code_needed_sig: Env.t -> signature -> bool
|
|
|
|
(* Determine whether a module needs no implementation code,
|
|
|
|
i.e. consists only of type definitions. *)
|
2003-06-19 08:53:53 -07:00
|
|
|
val enrich_modtype: Env.t -> Path.t -> module_type -> module_type
|
|
|
|
val enrich_typedecl: Env.t -> Path.t -> type_declaration -> type_declaration
|
2003-07-01 06:05:43 -07:00
|
|
|
val type_paths: Env.t -> Path.t -> module_type -> Path.t list
|
2013-12-16 19:52:50 -08:00
|
|
|
val contains_type: Env.t -> module_type -> bool
|
2014-03-09 19:54:02 -07:00
|
|
|
val remove_aliases: Env.t -> module_type -> module_type
|