package ocaml-solo5

  1. Overview
  2. Docs
OCaml cross-compiler to the freestanding Solo5 backend

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v1.3.3.tar.gz
md5=47876167068345542f49279e8fd28896
sha512=272081ec51a6ed69c08e4e8fa64fee3df53fd84c66c0c07a653891c88b342cf74553e1c95711e4fbc18922c899a3448a649f3bd9858f8d89cae834ad2b67fffb

doc/compiler-libs.common/Subst/Unsafe/index.html

Module Subst.Unsafe

type t = unsafe subst

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

val add_modtype : Ident.t -> Types.module_type -> 'any subst -> t

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

val add_modtype_path : Path.t -> Types.module_type -> 'any subst -> t
val add_type_path : Path.t -> Path.t -> t -> t

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

val add_type_function : Path.t -> params:Types.type_expr list -> body:Types.type_expr -> t -> t
val add_module_path : Path.t -> Path.t -> t -> t
type error =
  1. | Fcm_type_substituted_away of Path.t * Types.module_type
type 'a res := ('a, error) result
val type_declaration : t -> Types.type_declaration -> Types.type_declaration res
val signature_item : scoping -> t -> Types.signature_item -> Types.signature_item res
val signature : scoping -> t -> Types.signature -> Types.signature res
val compose : t -> t -> t res

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