package saltoIL

  1. Overview
  2. Docs

Module SaltoIL.Transpose

  • author

: Pierre LERMUSIAUX <pierre.lermusiaux@inria.fr> Copyright © Inria 2022-2023

val typing_data : ?extras:('b * Location.t * Typedtree.attributes) list -> ?attrs:Typedtree.attributes -> Types.type_expr -> Env.t -> ('a, 'b) Ast.typing

Helper function to create values of type typing_data

val transpose_pattern_data : Typedtree.pattern -> Ast.pattern_data

Transpose OCaml typed value patterns in the Salto AST

val transpose_general_pattern : Typedtree.computation Typedtree.general_pattern -> Ast.general_pattern

Transpose OCaml typed computation patterns in the Salto AST, by splitting value patterns and exception patterns into 2 lists of patterns

val transpose_expression_data : ?is_rec:bool -> scopes:Debuginfo.Scoped_location.scopes -> ?in_new_scope:bool -> Typedtree.expression -> Ast.expression_data

Transpose OCaml typed expressions in the Salto AST, encoding try_with expressions, and match_with expressions containing exceptions cases, through a dispatch construction

val transpose_class_expr_data : scopes:Debuginfo.Scoped_location.scopes -> Typedtree.class_expr -> Ast.class_expr_data

Transpose OCaml typed class expressions in the Salto AST

val transpose_structure : scopes:Debuginfo.Scoped_location.scopes -> Typedtree.structure -> Ast.structure

Transpose OCaml typed module structures in the Salto AST

val transpose_structure_item_data : scopes:Debuginfo.Scoped_location.scopes -> Typedtree.structure_item -> Ast.structure_item_data list

Transpose OCaml typed module structure items in the Salto AST

val transpose_module_type_data : scopes:Debuginfo.Scoped_location.scopes -> Typedtree.module_type -> Ast.module_type_data

Transpose OCaml typed module types in the Salto AST

val transpose_signature : scopes:Debuginfo.Scoped_location.scopes -> Typedtree.signature -> Ast.signature

Transpose OCaml typed module signatures in the Salto AST

val transpose_signature_item_data : scopes:Debuginfo.Scoped_location.scopes -> Typedtree.signature_item -> Ast.signature_item_data

Transpose OCaml typed module signature items in the Salto AST

type transposed_annots =
  1. | Packed of Types.signature * string list
  2. | Implementation of Ast.structure
  3. | Interface of Ast.signature
  4. | Partial_implementation of transposed_part list
  5. | Partial_interface of transposed_part list

Type for cmt binnary annots transposed into the Salto AST

and transposed_part =
  1. | Partial_structure of Ast.structure
  2. | Partial_structure_item of Ast.structure_item_data
  3. | Partial_expression of Ast.expression_data
  4. | Partial_value_pattern of Ast.pattern_data
  5. | Partial_general_pattern of Ast.general_pattern
  6. | Partial_class_expr of Ast.class_expr_data
  7. | Partial_signature of Ast.signature
  8. | Partial_signature_item of Ast.signature_item_data
  9. | Partial_module_type of Ast.module_type_data

Type for cmt binnary parts transposed into the Salto AST

val transpose_annots : scopes:Debuginfo.Scoped_location.scopes -> Cmt_format.binary_annots -> transposed_annots

transpose_annots annots translates annots from a cmt file into the Salto AST

OCaml

Innovation. Community. Security.