jon.recoil.org

Module Subst.Unsafe

Unsafe substitutions introduced by with constraints, local substitutions (type t := int * int) or recursive module check.

Replacing a module type name S by a non-path signature is unsafe as the packed module type (module S) becomes ill-formed.

Deep editing inside a module type require to retypecheck the module, for applicative functors in path and module aliases.

type error =
  1. | Fcm_type_substituted_away of Ocaml_typing.Path.t * Ocaml_typing.Types.module_type

Composition of substitutions is eager and fails when the two substitution are incompatible, for example module type t := sig end is not compatible with module type s := sig type t=(module t) end