Add a variant to a given type in a given module. As in
the ReviewConfig item below, you specify the module name, the type
name, and the type of the new variant.
Install.TypeVariant.makeRule "Types" "ToBackend" [ "ResetCounter" "SetCounter Int" ]Then you will have
type ToBackend
= CounterIncremented
| CounterDecremented
| ResetCounter
| SetCounter Intwhere the last two variants are the ones added.
Create a rule that adds variants to a type in a specified module: