package merlin-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ocaml_typing.Type_immediacySource

Immediacy status of a type

Sourcetype 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.

    *)
Sourcemodule Violation : sig ... end
Sourceval 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.

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