package ciao_lwt

  1. Overview
  2. Docs
A tool for migrating from Lwt to direct-style concurrency libraries

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ciao_lwt-0.2.tbz
sha256=1ee830a5a6fec1adf4dc3fe3caae7cca769b49c1671fb0fcb4884778feb211c6
sha512=6ff296f22bfc254e96acf83465876843bbeabbfa11239528fd9a3d4f6cc1a7d0973a517b9dc0f5c1d7fe467c945ae686a4aa294788cda3d37035b4ab7928c5bf

doc/ciao_lwt.migrate_utils/Migrate_utils/Occ/index.html

Module Migrate_utils.OccSource

Manage occurrences of identifiers that should be migrated.

Sourceval pop : state -> Ocamlformat_utils.Parsing.Longident.t Ocamlformat_utils.Parsing.Location.loc -> bool

Whether the given longident is an occurrence of an Lwt function. This will change the internal table and any subsequent calls for the same longident will return false.

Sourceval get : state -> 'a Ocamlformat_utils.Parsing.Location.loc -> (string * string) option
Sourceval may_rewrite : state -> Ocamlformat_utils.Parsing.Longident.t Ocamlformat_utils.Parsing.Location.loc -> ((string * string) -> 'b option) -> 'b option

Calls f if lid should be rewritten. A rewrite happen if f (unit_name, ident) is Some ast where ident is the basename of the longident at lid. The occurrence is removed from the table if a rewrite happened.

Sourceval may_rewrite_s : state -> string Ocamlformat_utils.Parsing.Location.loc -> ((string * string) -> 'b option) -> 'b option

Like may_rewrite but work on strings.

Sourceval remove : state -> Ocamlformat_utils.Parsing.Longident.t Ocamlformat_utils.Parsing.Location.loc -> unit

Remove an occurrence from the table.

Sourceval remove_s : state -> string Ocamlformat_utils.Parsing.Location.loc -> unit

Like remove_s but work on strings.