ProtocolSourceCMIs are provided either statically or as URLs to be downloaded on demand
Dynamic cmis are loaded from beneath the given url. In addition the top-level modules are specified, and prefixes for other modules. For example, for the OCaml standard library, a user might pass:
{
dcs_url = "/static/stdlib";
dcs_toplevel_modules = [ "Stdlib" ];
dcs_file_prefixes = [ "stdlib__" ];
}In which case, merlin will expect to be able to download a valid file from the url "/static/stdlib/stdlib.cmi" corresponding to the specified toplevel module, and it will also attempt to download any module with the prefix "Stdlib__" from the same base url, so for example if an attempt is made to look up the module "Stdlib__Foo" then merlin-js will attempt to download a file from the url "/static/stdlib/stdlib__Foo.cmi".
type action = | Complete_prefix of source * Merlin_kernel.Msource.position| Type_enclosing of source * Merlin_kernel.Msource.position| All_errors of source| Add_cmis of cmistype error = {kind : Location.report_kind;loc : Location.t;main : string;sub : string list;source : Location.error_source;}type answer = | Errors of error list| Completions of completions| Typed_enclosings of (Location.t
* [ `Index of int | `String of string ]
* is_tail_position)
list| Added_cmis