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.17.3.tbz
sha256=01c4591b8213ad8c71b6e9f1d180eabd200d441936ee27fe9f99646b75f9865c
sha512=f167097b3254fbf400bb816275f84157a0a9c691ebc877861e80b1c32c7e2ebc553e0a6a0ef073ec89c2c20ce80c42959dc89811e49712edd0c1fe6dce4a90e9
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_value = 'types get_out_value
and type Ast.Outcometree.out_type = 'types get_out_type
and 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_sig_item = 'types get_out_sig_item
and type Ast.Outcometree.out_type_extension = 'types get_out_type_extension
and type Ast.Outcometree.out_phrase = 'types get_out_phrase)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