package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 5.2.1

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-5.2.1.tar.gz
sha256=2d0f8090951a97a2c0e5b8a11e90096c0e1791d2e471e4a67f87e3b974044cd0

doc/compiler-libs.common/Typedecl_variance/index.html

Module Typedecl_variance

type surface_variance = bool * bool * bool
val variance_of_params : (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> surface_variance list
val variance_of_sdecl : Parsetree.type_declaration -> surface_variance list
type prop = Types.Variance.t list
type req = surface_variance list
type variance_variable_context =
  1. | Type_declaration of Ident.t * Types.type_declaration
  2. | Gadt_constructor of Types.constructor_declaration
  3. | Extension_constructor of Ident.t * Types.extension_constructor
type variance_variable_error =
  1. | No_variable
  2. | Variance_not_reflected
  3. | Variance_not_deducible
type variance_error =
  1. | Variance_not_satisfied of int
  2. | Variance_variable_error of {
    1. error : variance_variable_error;
    2. context : variance_variable_context;
    3. variable : Types.type_expr;
    }
type error =
  1. | Bad_variance of variance_error * surface_variance * surface_variance
  2. | Varying_anonymous
exception Error of Location.t * error
val check_variance_extension : Env.t -> Types.type_declaration -> Typedtree.extension_constructor -> (req * Location.t) -> unit
val compute_decl : Env.t -> check:Ident.t option -> Types.type_declaration -> req -> prop
OCaml

Innovation. Community. Security.