Debian Codegraph @

lib/dAst.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 (** Lazy AST node wrapper. Only used for [glob_constr] as of today. *)
12
13 type ('a, _) thunk =
14 | Value : 'a -> ('a, 'b) thunk
15 | Thunk : 'a Lazy.t -> ('a, [ `thunk ]) thunk
16
17 type ('a, 'b) t = ('a, 'b) thunk CAst.t
18
19 val get : ('a, 'b) t -> 'a
20 val get_thunk : ('a, 'b) thunk -> 'a
21
22 val make : ?loc:Loc.t -> 'a -> ('a, 'b) t
23 val delay : ?loc:Loc.t -> (unit -> 'a) -> ('a, [ `thunk ]) t
24 val force : ('a, 'b) t -> ('a, 'b) t
25
26 val map : ('a -> 'b) -> ('a, 'c) t -> ('b, 'c) t
27 val map_with_loc : (?loc:Loc.t -> 'a -> 'b) -> ('a, 'c) t -> ('b, 'c) t
28 val map_from_loc : (?loc:Loc.t -> 'a -> 'b) -> 'a Loc.located -> ('b, 'c) t
29
30 val with_val : ('a -> 'b) -> ('a, 'c) t -> 'b
31 val with_loc_val : (?loc:Loc.t -> 'a -> 'b) -> ('a, 'c) t -> 'b