package ppx_derive_at_runtime

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

Defines how to derive a size function using ppx_derive_at_runtime.

type 'a t = 'a -> Base.int

The type of size operations.

val unmap : 'a t -> f:('b -> 'a) -> 'b t

Transforms an 'a t to a 'b t. Because t is contravariant -- that is, 'a is an input rather than an output -- we must "unmap" inputs of type 'b to type 'a to pass to the original 'a t.

module Export : sig ... end

Size operations for builtin types. When deriving size, open this module.

module Ignore : sig ... end

Used as an attribute when deriving size. Types annotated with [@size Ignore] are not included in the total.

Derives t. Per the definition of S_with_basic_attribute, the [@size] attribute may be used the same way on types, record labels, variant constructors, and polymorphic variant rows.

include Ppx_derive_at_runtime_lib.S_with_basic_attribute with type 'a t := 'a t and type _ attribute := Ignore.t
module Derive : sig ... end
OCaml

Innovation. Community. Security.