jon.recoil.org

Module Mixed_block_shape

type 'a t

A mixed block shape is essentially the runtime representation of a block (i.e.) value prefix and flat suffix), and the permutation from the type definition in the surface language to that representation.

type path
module Singleton_mixed_block_element : sig ... end
val of_mixed_block_elements : print_locality:(Stdlib.Format.formatter -> 'a -> unit) -> 'a Lambda.mixed_block_element array -> 'a Mixed_block_shape.t
val value_prefix_len : 'a Mixed_block_shape.t -> int
val flat_suffix_len : 'a Mixed_block_shape.t -> int
val flattened_reordered_shape : 'a Mixed_block_shape.t -> 'a Mixed_block_shape.Singleton_mixed_block_element.t array

Access to the shape, as flattened and following the runtime restriction.

val lookup_path_producing_new_indexes : 'a Mixed_block_shape.t -> int list -> int list
val new_indexes_to_old_indexes : 'a Mixed_block_shape.t -> int array
val new_block_length : 'a Mixed_block_shape.t -> int
val new_index_to_old_path : 'a Mixed_block_shape.t -> int -> int list