package lsp

  1. Overview
  2. Docs
LSP protocol implementation in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

jsonrpc-1.6.0.tbz
sha256=35e8c7341f8eb1fa39fb0f0e0701a7ed90b9a0bb89ccf84b7ed997cd258cbec3
sha512=c96a7a3ca845ec193e9edc4a74804a22d6e37efc852b54575011879bd2105e0df021408632219f542ca3ad85b36b5c8b72f2b417204d154d5f0dd0839535afa5

doc/lsp.fiber/Fiber/Stream/In/index.html

Module Stream.InSource

Sourcetype 'a t

Stream inputs.

A In.t value represents the side of a stream where values can be read from. A stream input can only be consumed by one fiber at a time. Trying to access a stream input concurrently will result in an exception.

When passing a stream input through one of the transformation functions such as filter_map or iteration function, the original stream input can no longer be used for another purpose.

Sourceval create : (unit -> 'a option t) -> 'a t

Create a stream that is fed from a generator function. Every time a value is requested, this function is called to produce a new value. If the function raises, the stream will no longer be usable.

Sourceval of_list : 'a list -> 'a t

Create a stream that yields elements from the given list in order.

Sourceval empty : unit -> 'a t

The empty stream.

Sourceval read : 'a t -> 'a option t

Consumes and returns the next element from the stream. Once the stream is exhausted, read always returns None.

Sourceval filter_map : 'a t -> f:('a -> 'b option) -> 'b t
Sourceval sequential_iter : 'a t -> f:('a -> unit t) -> unit t
Sourceval parallel_iter : 'a t -> f:('a -> unit t) -> unit t
Sourceval append : 'a t -> 'a t -> 'a t
OCaml

Innovation. Community. Security.