package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 5.0.0

Install

Dune Dependency

Authors

Maintainers

Sources

5.0.0.tar.gz
sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b

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

Module Type_immediacy

Immediacy status of a type

type t =
  1. | Unknown
    (*

    We don't know anything

    *)
  2. | Always
    (*

    We know for sure that values of this type are always immediate

    *)
  3. | Always_on_64bits
    (*

    We know for sure that values of this type are always immediate on 64 bit platforms. For other platforms, we know nothing.

    *)
module Violation : sig ... end
val coerce : t -> as_:t -> (unit, Violation.t) result

coerce t ~as_ returns Ok () iff t can be seen as type immediacy as_. For instance, Always can be seen as Always_on_64bits but the opposite is not true. Return Error _ if the coercion is not possible.

val of_attributes : Parsetree.attributes -> t

Return the immediateness of a type as indicated by the user via attributes

OCaml

Innovation. Community. Security.