package reason

  1. Overview
  2. Docs
Reason: Syntax & Toolchain for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

reason-3.8.0.tbz
sha256=9478724b01767320064ba950ddea24c5df0eefdcdd8ff1324ba9ccd646258979
sha512=c5dcec810a1981b78b19271a8a255f4087628514725d6818419b141be6346a62b28fe8d0f10855efe420ede2839bfe562aa5abf21f29d66250e5c0d02323d6d8

doc/reason.ocaml-migrate-parsetree/Reason_migrate_parsetree/Ast_io/index.html

Module Reason_migrate_parsetree.Ast_ioSource

Sourcetype ast =
  1. | Impl : (module Reason_migrate_parsetree__.Migrate_parsetree_versions.OCaml_version with type Ast.Parsetree.structure = 'concrete) * 'concrete -> ast
  2. | Intf : (module Reason_migrate_parsetree__.Migrate_parsetree_versions.OCaml_version with type Ast.Parsetree.signature = 'concrete) * 'concrete -> ast

A marshalled ast packs the ast with the corresponding version of the frontend

Sourcetype filename = string

A simple alias used for the filename of the source that produced an AST

Sourcetype read_error =
  1. | Not_a_binary_ast of string
    (*

    The input doesn't contain a binary AST. The argument corresponds to the bytes from the input that were consumed.

    *)
  2. | Unknown_version of string
    (*

    The input contains a binary AST for an unknown version of OCaml. The argument is the unknown magic number.

    *)

Load a marshalled AST from a channel

Any exception raised during unmarshalling (see Marshal) can escape.

Sourceval from_bytes : bytes -> int -> (filename * ast, read_error) Result.result

Load a marshalled AST from a byte string.

See from_channel description for exception that can be raised.

Sourceval to_channel : out_channel -> filename -> ast -> unit

Marshal an AST to a channel

Sourceval to_bytes : filename -> ast -> bytes

Marshal an AST to a byte string

OCaml

Innovation. Community. Security.