package reason
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
On This Page
  
  
  Reason: Syntax & Toolchain for OCaml
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
  
    
      reason-3.15.0.tbz
    
    
        
    
  
  
  
    
  
  
    
  
        sha256=ec3d2025f4391f0d2b88d2053e627a85aa1addd9c51320e9e72c690e05fb66a6
    
    
  sha512=2bc7681a0e7649f619a8e93e961690531f697fadb1ae5d3f2c5913b0fce6995780394f2ce5b3e1920902ca7a2f4e188f62696f58f20ae3dd81c3658528bd0a33
    
    
  doc/reason.ocaml-migrate-parsetree/Reason_omp/Versions/index.html
Module Reason_omp.VersionsSource
Abstracting an OCaml frontend
Source
type 'a _types = 'a
  constraint
    'a =
    < out_value : _
    ; out_type : _
    ; out_class_type : _
    ; out_module_type : _
    ; out_sig_item : _
    ; out_type_extension : _
    ; out_phrase : _ >A version of the OCaml frontend packs the ast with type witnesses so that equalities can be recovered dynamically.
migration_info is an opaque type that is used to generate migration functions.
An OCaml frontend versions an Ast, version number and some witnesses for conversion.
Source
type 'types ocaml_version =
  (module OCaml_version
  with type Ast.Outcometree.out_class_type = 'types get_out_class_type
   and type Ast.Outcometree.out_module_type = 'types get_out_module_type
   and type Ast.Outcometree.out_phrase = 'types get_out_phrase
   and type Ast.Outcometree.out_sig_item = 'types get_out_sig_item
   and type Ast.Outcometree.out_type = 'types get_out_type
   and type Ast.Outcometree.out_type_extension = 'types get_out_type_extension
   and type Ast.Outcometree.out_value = 'types get_out_value)Representing an ocaml version in type language
Concrete frontend instances
Migrating between different versions
Source
type ('a, 'b) type_comparison = | Lt : ('a, 'b) type_comparison| Eq : ('a, 'a) type_comparison| Gt : ('a, 'b) type_comparison
Source
type ('from, 'to_) migration_functions = {copy_out_value : 'from get_out_value -> 'to_ get_out_value;copy_out_type : 'from get_out_type -> 'to_ get_out_type;copy_out_class_type : 'from get_out_class_type -> 'to_ get_out_class_type;copy_out_module_type : 'from get_out_module_type -> 'to_ get_out_module_type;copy_out_sig_item : 'from get_out_sig_item -> 'to_ get_out_sig_item;copy_out_type_extension : 'from get_out_type_extension -> 'to_ get_out_type_extension;copy_out_phrase : 'from get_out_phrase -> 'to_ get_out_phrase;
}A record for migrating each AST construct between two known versions
Migrating to the same version is no-op
Source
val migration_compose : 
  ('a, 'b) migration_functions ->
  ('b, 'c) migration_functions ->
  ('a, 'c) migration_functionsMigrations can be composed
Represent the next or previous version of an Ast
Source
type 'from immediate_migration = | No_migration : 'from immediate_migration(*Cannot migrate earliest or latest supported version
*)| Immediate_migration : ('from, 'to_) migration_functions * 'to_ ocaml_version -> 'from immediate_migration(*Pack the migration functions and the new version
*)
Source
val immediate_migration : 
  'types ocaml_version ->
  [< `Next | `Previous ] ->
  'types immediate_migrationConvenience definitions
Module level migration
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
  On This Page