After long and frustrating attempts to solve value problem using GADT and first-class modules I realized that all value types are already defined in state type and Formality doesn't really need particular value type to do its thing. Type data stored in state type is enough and all value management is in userland now. value escaped the abstraction. Phew.
Updated config module type:
module type Form = {
type field;
type state;
type message;
let validators: list(validator);
};
After long and frustrating attempts to solve
value
problem using GADT and first-class modules I realized that all value types are already defined instate
type andFormality
doesn't really need particularvalue
type to do its thing. Type data stored instate
type is enough and all value management is in userland now.value
escaped the abstraction. Phew.Updated config module type: