prbnmcn-basic-structures

Base package for prbnmcn-* packages
Library prbnmcn-basic-structures
Module type Basic_structures . Basic_intf . Lang . Enum
type 'a m
type t

The type of enumerations.

val all : t array

All cases in the enumeration.

val enum : t -> int

enum x is the index of x in all.

val const : t -> t m

Injects a case of the enumeration from the meta to the object language.

val dispatch : t m -> ( t -> 'a m ) -> 'a m

Dispatch on a value of the enumeration.