Module Genr_unary

module Genr_unary: sig .. end

Generation of construction function for unary generators.

val genr_function : Otype.constructor_definition -> Genr_base.generated_functions
genr_function g generates a unary function that normalizes terms that are built with g as their head constructor.

We perform here the generation of code for the construction function only in the case of a ``true'' unary generator.

A true unary generator has one argument and this argument is not of type list. Hence, this argument should not be treated as the variable length list of arguments of an associative binary operation.

The case of an associative binary operator is handled in the module Genr_listary; we branch to this case when encountering an associative operator, since a variable length list of argument cannot exist for a true unary operator.