package ppx_derive_at_runtime

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

Module types re-exported below.

module type Basic = sig ... end

A simple set of definitions that can be used to derive values for a new type. Values derived using this interface are based on the contents of a type, but not other details of its structure. For example, variant constructor names and record label names are not taken into account.

module type Value = sig ... end

Types of values provided by each type to be derived.

module type Type_without_fold = sig ... end

Specifies a product or sum type using a GADT binary tree representation. We use a single representation with several parameters so that tuples, records, variants, and polymorphic variants may all be understood with one set of types.

module type Fold = sig ... end

Signature of a fold over a binary tree from Type_without_fold, above.

module type Type = sig ... end

Extends Type_without_fold with a functor providing Fold.

module type Types = sig ... end
module type Derive = sig ... end

Module type of the Derive submodule that each module for a derived value must provide.

module type S = sig ... end

Module type that a runtime module must satisfy for ppx_derive_at_runtime.

module type S_with_basic_attribute = sig ... end

Specialization of S for Of_basic, where all attributes share a single type.

module Of_basic (Basic : Basic) : S_with_basic_attribute with type 'a t := 'a Basic.t and type 'a attribute := 'a Basic.attribute

Simple interface for deriving values from types. Does not provide access to constructor names, record labels, or other syntactic details; see Basic above. Does not require the caller to interface with GADTs defined above.

module Types (Value : Value) : Types with module Value := Value

Defines GADT types and fold helpers for given derived value and attribute types.

OCaml

Innovation. Community. Security.