package reason

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

Install

Dune Dependency

Authors

Maintainers

Sources

reason-3.8.1.tbz
sha256=bfcdbb09f62b4c108f26e6dc380431613e4de4b065df8f14364efe4acea8e414
sha512=61cdf7844349b64190965782103e04eef303ca1f2a7cdc7e20d11189700796a18d2a9d9dbb3ad17eb1363bb1663113da6a22448c017820219757874601f207c3

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

Module Reason_omp.Ast_ioSource

Sourcetype ast =
  1. | Impl : (module Reason_omp__.Migrate_parsetree_versions.OCaml_version with type Ast.Parsetree.structure = 'concrete) * 'concrete -> ast
  2. | Intf : (module Reason_omp__.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.