package lsp

  1. Overview
  2. Docs
LSP protocol implementation in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

jsonrpc-1.3.0.tbz
sha256=598e27258e4749b6e2511e2c5efe00d16f0965806296e808d202cd614d655fba
sha512=febe80f8a88fac7683cafbd045dceee4869beda1f250b78a1d94d3ad19e746388d24869e805abcb2f33f93687508d65db19a38424c1059670915c050b4f6dbb9

doc/lsp.fiber/Fiber/Var/index.html

Module Fiber.VarSource

Variables local to a fiber

Sourcetype 'a t
Sourceval create : unit -> 'a t

Create a new variable

Sourceval get : 'a t -> 'a option

get var reads the value of var.

Sourceval get_exn : 'a t -> 'a

Same as get but raises if var is unset.

Sourceval set : 'a t -> 'a -> (unit -> 'b t) -> 'b t

set var value fiber sets var to value during the execution of fiber.

For instance, the following fiber always evaluate to true:

 set v x (get_exn v >>| fun y -> x = y) 
Sourceval set_sync : 'a t -> 'a -> (unit -> 'b) -> 'b
Sourceval unset : 'a t -> (unit -> 'b t) -> 'b t
Sourceval unset_sync : 'a t -> (unit -> 'b) -> 'b
OCaml

Innovation. Community. Security.