Fields.Direct.set_all_mutable_fields, a function intended to guarantee when pooling records that one cannot forget to reinitialize some fields.
Obviously one could achieve this through something like
Fields.Direct.iter, but we want a more efficient version that doesn't force the call side to create closures.
with fieldsgenerate the same functions in the
Fields_of_*modules whether the type is called
with fieldsexpose first-class fields for private types while preserving privacy.
There is now an additional phantom type in a first-class field that prevents building or modifying elements of a private type.
One consequence of this change is that the
Field.ttype is now an abstract type -- it used to be exposed as a record type. So, one must, e.g., change
We had removed
privatetypes, but this caused some pain. So we're putting it back. At some point, we'll patch
with fieldsto prevent setting mutable fields on private types via the fields provided by
with fields, for a type
uthat isn't named
t, creates module
Fields_of_urather than module
Fields. This allows one to us
with fieldson several types in the same structure.
privatetypes to not expose mutators or creators.