jon.recoil.org

Module Type_shape

module Uid = Shape.Uid
module Layout = Jkind_types.Sort.Const
type base_layout = Jkind_types.Sort.base
type path_lookup = Path.t -> args:Shape.t list -> Shape.t option
module Type_shape : sig ... end
module Type_decl_shape : sig ... end
module Evaluation_diagnostics : sig ... end
module Evaluated_shape : sig ... end

Evaluated_shape.unfold_and_evaluate performs call-by-value evaluation of shapes. It should be applied after reduce (from shape_reduce.ml) has already been used. More specifically, when producing a type shape with of_type_expr, the resulting shape is not a normal form. A normal form---at least for the emission into DWARF debug information---should no longer contain structures (from modules), lambdas (from functors and parametric types), application (from functor instantiation and type application), mutually recursive declarations and their projections (Constr and Proj_decl). (Due to missing information, it might still contain compilation units Comp_unit and projections Proj from them.)

type shape_with_layout = private {
  1. type_shape : Shape.t;
  2. type_layout : Layout.t;
  3. type_name : string;
}
val all_type_decls : Shape.t Uid.Tbl.t
val all_type_shapes : shape_with_layout Uid.Tbl.t
val add_to_type_decls : (Ident.t * Types.type_declaration) list -> path_lookup -> unit
val add_to_type_shapes : Uid.t -> Types.type_expr -> Layout.t -> name:string -> path_lookup -> unit
val print_table_all_type_decls : Format.formatter -> unit
val print_table_all_type_shapes : Format.formatter -> unit
val print_debug_uid_tables : Format.formatter -> unit