package ocp-index

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

Install

Dune Dependency

Authors

Maintainers

Sources

1.3.7.tar.gz
md5=8ba7ad0ff42d98e82c1359f97b98a692
sha512=54a5aad2b99126fe14e7e9c98184e58b497cbc0e5e4ac064ebaca2bec750fc5800d97edbff4cde0a323d63cd7a5e5d9942cf05467d3149fe6e3bbf03f5fe3025

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

Module LibIndexSource

Main types

Sourcetype t

Lazy trie structure holding the info on all identifiers

Sourcetype orig_file = private IndexTypes.orig_file =
  1. | Cmt of string
  2. | Cmti of string
  3. | Cmi of string

The type of files we get our data from

Sourceexception Bad_format of string
Sourcetype info = private IndexTypes.info = {
  1. path : string list;
  2. orig_path : string list;
  3. kind : kind;
  4. name : string;
  5. ty : IndexTypes.ty option;
  6. loc_sig : Location.t Lazy.t;
  7. loc_impl : Location.t Lazy.t;
  8. doc : string option Lazy.t;
  9. file : orig_file;
}

Contains the information on a given identifier

Sourceand kind = private IndexTypes.kind =
  1. | Type
  2. | Value
  3. | Exception
  4. | OpenType
  5. | Field of info
  6. | Variant of info
  7. | Method of info
  8. | Module
  9. | ModuleType
  10. | Class
  11. | ClassType
  12. | Keyword

The kind of elements that can be stored in the trie

Utility functions

Sourcemodule Misc : sig ... end

Building

Sourceval load : qualify:bool -> string list -> t
Sourceval add_file : qualify:bool -> t -> string -> t

Load a single file into a trie

Sourceval open_module : ?cleanup_path:bool -> t -> string list -> t
Sourceval fully_open_module : ?cleanup_path:bool -> qualify:bool -> t -> string list -> t
Sourceval alias : ?cleanup_path:bool -> t -> string list -> string list -> t

Querying

Sourceval all : t -> info list

Returns all bindings in the trie

Sourceval get : t -> string -> info

Lookup an identifier in a trie (eg. option or List.map)

Sourceval get_all : t -> string -> info list
Sourceval complete : t -> ?filter:(info -> bool) -> string -> info list

Output

include module type of IndexOut
Sourcemodule Format : sig ... end
Sourcemodule Print : sig ... end
OCaml

Innovation. Community. Security.