package ciao_lwt

  1. Overview
  2. Docs

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.