Module Hardcaml.Enum

The Enum contains functors that can be used to create special interface modules to represent an enumeration type (ie: a variant with no arguments).

module type S_enum = sig ... end
module type S_enums = sig ... end
module Make_binary (Cases : sig ... end) : S_enum with module Cases := Cases

Constructs a hardcaml interface which represents hardware for the given Enum as an abstract Interface, using a Binary internal representation.

module Make_one_hot (Cases : sig ... end) : S_enum with module Cases := Cases

Similar to Make_binary, but using a one hot representation internally.

module Make_enums (Cases : sig ... end) : S_enums with module Cases := Cases

Make_enums is semantically similar to: