Module Record.Unsafe

module Unsafe: sig .. end

Unsafe interface




The Unsafe.declare function returns a 's layout, which is only safe when 's is only instanciated once in this context.
val declare : string -> 's Record.layout
Create a new layout with the given name.
val field : 's Record.layout -> string -> 'a Record.Type.t -> ('a, 's) Record.Field.t
Add a field to a layout. This modifies the layout and returns the field.
val seal : 's Record.layout -> unit
Make the layout unmodifiable. It is necessary before constructing values.
val make : 's Record.layout -> 's Record.t
Allocate a record of a given layout, with all fields initially unset.
val layout_name : 's Record.layout -> string
Get the name that was given to a layout.
val layout_id : 's Record.layout -> 's Record.Polid.t
Get the unique identifier given to a layout.