Module Bin_shape_lib.Bin_shape
- type t
- Shape.tare constructed by the- bin_shapesyntax extension from Ocaml type definitions & expressions.- There is a direct mapping from ocaml type definition syntax to the corresponding - Shape.groupand from ocaml type expression syntax to the corresponding- Shape.t.
- val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
module Tid : sig ... endmodule Vid : sig ... end- module Location : sig ... end
- Location.tis required when constructing shapes for which evaluation might fail.
- module Uuid : sig ... end
- Uuid.tis used by- basetypeand- annotate.
- val group : Location.t -> (Tid.t * Vid.t list * t) list -> group
- This function is generative; repeated calls create distinct groups 
- val constr : string -> t option -> poly_variant_row
- val inherit_ : Location.t -> t -> poly_variant_row
- val poly_variant : Location.t -> poly_variant_row list -> t
- val rec_app : Tid.t -> t list -> t
- recursive apps within the current group 
- val var : Location.t -> Vid.t -> t
- val basetype : Uuid.t -> t list -> t
- Built-in types and types with custom serialization: i.e. int,list,... To avoid accidental protocol compatibility, pass a UUID as the - stringargument
module Digest : sig ... endmodule Canonical : sig ... end- val eval : t -> Canonical.t
- eval treturns the canonical-shape for a shape-expression- Shape.t. Type aliases are expanded, so that no- Tid.tor- Vid.thave significance in the resulting canonical-shape. Type-recursion, including non-regular recursion, is translated to the de-bruijn representation used in canonical-shapes.
- val eval_to_digest : t -> Digest.t
- eval_to_digest treturns a hash-value direct from the- Shape.t, potentially avoiding the intermediate- Canonical.tfrom being constructed. This is important as the size of a canonical-shape might be exponential in terms of the size of the shape expression. The following holds:- Digest.(eval_to_digest exp = Canonical.to_digest (eval exp))
- val eval_to_digest_string : t -> string
- eval_to_digest_string t==- Digest.to_hex (eval_to_digest t)Convenience function useful for writing unit tests.
module For_typerep : sig ... end