sig
type candidate =
< completion : string; display : string; doc : string;
matching_function : string -> Matching.result option; real :
string >
val mk_candidate :
display:string ->
real:string ->
completion:string ->
doc:string ->
matching_function:(string -> Matching.result option) ->
Completion.candidate
type 'a source = {
delay : bool;
default : 'a;
compute : 'a -> string -> 'a * Completion.candidate list;
}
type ex_source = S : 'a Completion.source -> Completion.ex_source
type source_state =
ST : 'a * 'a Completion.source -> Completion.source_state
type state_machine = {
ex_sources : Completion.ex_source Lazy.t list;
transition :
< display : string; real : string > -> Completion.state_machine;
}
val empty : Completion.state_machine
val singleton : Completion.ex_source Lazy.t -> Completion.state_machine
val singleton' : Completion.ex_source -> Completion.state_machine
val iterate : Completion.ex_source Lazy.t list -> Completion.state_machine
val concat :
Completion.state_machine ->
Completion.state_machine -> Completion.state_machine
val sum :
Completion.ex_source ->
(< display : string; real : string > -> Completion.state_machine) ->
Completion.state_machine
type state = {
before_cursor : string;
after_cursor : string;
sources : (Completion.candidate list * Completion.source_state) list;
before_matches : (Completion.candidate * Matching.result) list;
after_matches : (Completion.candidate * Matching.result) list;
entries : (Completion.state_machine * string * string) list;
separator : string;
program : Completion.state_machine;
}
val make_state :
?sep:string -> Completion.state_machine -> Completion.state
val add_string : string -> Completion.state -> Completion.state
val cursor_left : Completion.state -> Completion.state
val cursor_right : Completion.state -> Completion.state
val left : Completion.state -> Completion.state
val right : Completion.state -> Completion.state
val pageup :
((Completion.candidate * Matching.result) list ->
(Completion.candidate * Matching.result) list *
(Completion.candidate * Matching.result) list) ->
Completion.state -> Completion.state
val pagedown :
((Completion.candidate * Matching.result) list ->
(Completion.candidate * Matching.result) list *
(Completion.candidate * Matching.result) list) ->
Completion.state -> Completion.state
val remove : Completion.state -> Completion.state
val complete : Completion.state -> Completion.state
end