package orsetto

  1. Overview
  2. Docs
On This Page
  1. Interface
Legend:
Library
Module
Module type
Parameter
Class
Class type

Runtime type indications for CBOR encoded values.

Interface
type Cf_type.nym +=
  1. | Tag : 'a Cf_type.nym -> (int64 * 'a) Cf_type.nym

The runtime type indicator for a pair comprising a CBOR tag number and its tagged value.

type Cf_type.nym +=
  1. | Reserved : int Cf_type.nym

The runtime type indicator for unrecognized simple values, to be registered with IANA, and reserved for future specifications or by standards action.

The runtime type indicator for a CBOR event.

The type relations for all CBOR encoded values.

Include the form.

include Cf_type.Form
val req : 'a Cf_type.nym -> Cf_type.opaque -> 'a

Use opt n v to extract v' if n is equivalent to the encapsulated runtime type, otherwise raises an exception (conventionally Type_error).

val opt : 'a Cf_type.nym -> Cf_type.opaque -> 'a option

Use opt n v to extract Some v' if n is equivalent to the encapsulated runtime type, otherwise returns None.

val eq : 'a Cf_type.nym -> 'b Cf_type.nym -> ('a, 'b) Cf_type.eq

Use eq a b to produce the equivalence constraint for the types associated with nyms a and b under the horizon. Returns Eq if a and b are nyms for equivalent types, otherwise raises Type_error.

val ck : 'a Cf_type.nym -> Cf_type.opaque -> bool

Use ck n v to test whether n is equivalent to the encapsulated runtime type.