This file is indexed.

/usr/lib/ocaml/zed/zed_input.mli is in libzed-ocaml-dev 1.4-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(*
 * zed_input.mli
 * -------------
 * Copyright : (c) 2011, Jeremie Dimino <jeremie@dimino.org>
 * Licence   : BSD3
 *
 * This file is a part of Zed, an editor engine.
 *)

(** Helpers for writing key bindings *)

(** Signature for binders. *)
module type S = sig

  type event
    (** Type of events. *)

  type +'a t
    (** Type of set of bindings mapping input sequence to values of
        type ['a]. *)

  val empty : 'a t
    (** The empty set of bindings. *)

  val add : event list -> 'a -> 'a t -> 'a t
    (** [add events x bindings] binds [events] to [x]. It raises
        [Invalid_argument] if [events] is empty. *)

  val remove : event list -> 'a t -> 'a t
    (** [remove events bindings] unbinds [events]. It raises
        [Invalid_argument] if [events] is empty. *)

  val fold : (event list -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    (** [fold f set acc] executes [f] on all sequence of [set],
        accumulating a value. *)

  val bindings : 'a t -> (event list * 'a) list
    (** [bindings set] returns all bindings of [set]. *)

  type 'a resolver
    (** Type of a resolver. A resolver is used to resolve an input
        sequence, i.e. to find the value associated to one. It returns
        a value of type ['a] when a matching sequence is found. *)

  type 'a pack
    (** A pack is a pair of a set of bindings and a mapping
        function. *)

  val pack : ('a -> 'b) -> 'a t -> 'b pack
    (** [pack f set] creates a pack. *)

  val resolver : 'a pack list -> 'a resolver
    (** [resolver packs] creates a resolver from a list of pack. *)

  (** Result of a resolving operation. *)
  type 'a result =
    | Accepted of 'a
        (** The sequence is terminated and associated to the given
            value. *)
    | Continue of 'a resolver
        (** The sequence is not terminated. *)
    | Rejected
        (** None of the sequences is prefixed by the one. *)

  val resolve : event -> 'a resolver -> 'a result
    (** [resolve event resolver] tries to resolve [event] using
        [resolver]. *)
end

module Make (Event : Map.OrderedType) : S with type event = Event.t
  (** [Make (Event)] makes a a new binder. *)