(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
(* An 'a document is a structure to hold and manipulate list of sentences. Sentencesareequippedwithanid=Stateid.tandcancarryarbitrary data('a).
(* Functions that work on the focused part of the document ******************* *)
(** The last sentence. @raiseInvalid_argumentiftiphasnoid.
@raise Empty *) val tip : 'a document -> id
(** The last sentence.
@raise Empty *) val tip_data : 'a document -> 'a
(** Add a sentence on the top (with no state_id) *) val push : 'a document -> 'a -> unit
(** Remove the tip setence.
@raise Empty *) val pop : 'a document -> 'a
(** preserve the last error(s) (tooltip fix) *) val set_errors : 'a document -> string list -> unit
(** get the last error(s) (tooltip fix) *) val get_errors : 'a document -> string list
(** Assign the state_id of the tip.
@raise Empty *) val assign_tip_id : 'a document -> id -> unit
(** [cut_at d id] cuts the document at [id] that is the new tip. Returnsthelistofsentencesthatwerecut.
@raise Not_found *) val cut_at : 'a document -> id -> 'a list
(* Functions that work on the whole document ********************************* *)
(** returns the id of the topmost sentence validating the predicate and abooleanthatistrueifoneneedstounfocusthedocumenttoaccess suchsentence.
@raise Not_found *) val find_id : 'a document -> (id -> 'a -> bool) -> id * bool
(** look for a sentence validating the predicate. The boolean is true ifthesentenceisinthezonecurrentlyfocused.
@raise Not_found *) valfind : 'a document -> (bool -> id option -> 'a -> bool) -> 'a val find_map : 'a document -> (bool -> id option -> 'a -> 'b option) -> 'b
(** After [focus s c1 c2] the top of [s] is the topmost element [x] such that [c1x]is[true]andthebottomisthefirstelement[y]following[x] suchthat[c2y]is[true].
@raise Invalid_argument if there is no such [x] and [y] or already focused *) val focus : 'a document ->
cond_top:(id -> 'a -> bool) -> cond_bot:(id -> 'a -> bool) -> unit
(** Undoes a [focus].
@raise Invalid_argument "CStack.unfocus" if the stack is not focused *) val unfocus : 'a document -> unit
(** Is the document focused *) val focused : 'a document -> bool
(** No sentences at all *) val is_empty : 'a document -> bool
(** returns the 1 to-last sentence, and true if we need to unfocus to reach it.
@raise Not_found *) val before_tip : 'a document -> id * bool
(** Is the id in the focused zone? *) val is_in_focus : 'a document -> id -> bool
(** Folds over the whole document starting from the topmost (maybe unfocused)
sentence. *) val fold_all : 'a document -> 'c -> ('c -> bool -> id option -> 'a -> 'c) -> 'c
(** Returns (top,bot) such that the document is morally [top @ s @ bot] where sisthefocusedpart.
@raise Invalid_argument *) val context : 'a document -> (id * 'a) list * (id * 'a) list
(** debug print *) valprint : 'a document -> (bool -> id option -> 'a -> Pp.t) -> Pp.t
(** Callbacks on documents *)
class type ['a] signals =
object
method popped : callback:('a -> ('a list * 'a list) option -> unit) -> unit
method pushed : callback:('a -> ('a list * 'a list) option -> unit) -> unit end
val connect : 'a document -> 'a signals
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.