package smtml

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

Module Adt.ConsSource

This module defines the interface for creating ADT constructors.

Sourcetype t

The abstract type for an ADT constructor definition.

Sourceval make : string -> fields:(string * ty option) list -> t

make name ~fields constructs an ADT constructor definition with the given name and a list of fields. Each field in the list is a tuple of its name (string) and its type (ty option). A None type for a field indicates a recursive reference to the ADT being defined.