package ocp-index

  1. Overview
  2. Docs
Lightweight completion and documentation browsing for OCaml libraries

Install

Dune Dependency

Authors

Maintainers

Sources

ocp-index-1.2.tbz
sha256=b93ed30df9ca321ff5758cdf43976034bcc5b3a23f83fcebbd524ea505e090d1
sha512=40d585edde42048d03b7672f29a0e4d0b92903d7b65f6d34f0c59d7ce29606bfc85a937b4967aea267eeb4f398990ec7ba8ec844858e433ce080a7f195a709b8

doc/ocp-index.lib/IndexScope/index.html

Module IndexScope

type t
val empty : t

The empty scope

type env =
  1. | Alias of string * string list
  2. | Open of string list

The type of gathered information within a scope

val read : ?line:int -> ?column:int -> in_channel -> t

Compute the environment from an input channel, at an optional position or at EOF

val read_string : string -> t

Compute the environment from a string

val fold : ('a -> t -> Approx_lexer.token -> (int * int * int) -> 'a) -> 'a -> ?init:env list -> ?stop:(Lexing.position -> bool) -> in_channel -> 'a

Lower-level function for processing on the environment at every token. The position is given in the form (line, column, length)

val fold_string : ('a -> t -> Approx_lexer.token -> (int * int * int) -> 'a) -> 'a -> ?init:env list -> ?stop:(Lexing.position -> bool) -> string -> 'a

The same from a string

val to_list : t -> env list

Returns the env declarations in scope t, in source file order

OCaml

Innovation. Community. Security.