1234567891011121314151617181920212223242526272829303132333435363738(************************************************************************)(* The λΠ-modulo Interactive Proof Assistant *)(************************************************************************)(************************************************************************)(* λΠ-modulo serialization Toplevel *)(* Copyright Inria -- Dual License LGPL 2.1 / GPL3+ *)(* Written by: F. Blanqui, E. J. Gallego Arias, F. Lefoulon *)(************************************************************************)(* Status: Experimental *)(************************************************************************)moduletypeS=sig(** Maps a position of the cursor (point) to the corresponding token of type
'a in a given text editor with a .lp file open. *)type'atmoduleRange:Range_intf.S(** The empty range map.*)valempty:'at(** [find pt map] returns the only (token, range) couple in map such that
[pt] is a point within the mapped interval range. Requires [map] to be
well-defined (see add). *)valfind:Range.point->'at->(Range.t*'a)option(** [add range token map] adds a mapping (key : [range], value : [token]) to
[map].
Requires all added keys to be non overlapping intervals to be
well-defined. /!\ Does not ensure proper functionning if the added keys
are overlapping intervals, e.g might change a previously added (key,
element) couple or throw an error. *)valadd:Range.t->'a->'at->'atvalto_string:('a->string)->'at->stringend