aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dAst.ml2
-rw-r--r--lib/dAst.mli1
-rw-r--r--lib/envars.ml4
-rw-r--r--lib/envars.mli2
-rw-r--r--lib/flags.ml4
-rw-r--r--lib/flags.mli4
6 files changed, 6 insertions, 11 deletions
diff --git a/lib/dAst.ml b/lib/dAst.ml
index f34ab956a3..803b2a0cff 100644
--- a/lib/dAst.ml
+++ b/lib/dAst.ml
@@ -30,6 +30,8 @@ let make ?loc v = CAst.make ?loc (Value v)
let delay ?loc v = CAst.make ?loc (Thunk (Lazy.from_fun v))
+let force x = CAst.make ?loc:x.CAst.loc (Value (get_thunk x.v))
+
let map f n = CAst.map (fun x -> map_thunk f x) n
let map_with_loc f n =
diff --git a/lib/dAst.mli b/lib/dAst.mli
index 28c78784e6..2f58cfc41f 100644
--- a/lib/dAst.mli
+++ b/lib/dAst.mli
@@ -21,6 +21,7 @@ val get_thunk : ('a, 'b) thunk -> 'a
val make : ?loc:Loc.t -> 'a -> ('a, 'b) t
val delay : ?loc:Loc.t -> (unit -> 'a) -> ('a, [ `thunk ]) t
+val force : ('a, 'b) t -> ('a, 'b) t
val map : ('a -> 'b) -> ('a, 'c) t -> ('b, 'c) t
val map_with_loc : (?loc:Loc.t -> 'a -> 'b) -> ('a, 'c) t -> ('b, 'c) t
diff --git a/lib/envars.ml b/lib/envars.ml
index 8a75d9a552..0f4670688b 100644
--- a/lib/envars.ml
+++ b/lib/envars.ml
@@ -110,11 +110,11 @@ let set_user_coqlib path = coqlib := Some path
(** coqlib is now computed once during coqtop initialization *)
-let set_coqlib ~boot ~fail =
+let set_coqlib ~fail =
match !coqlib with
| Some _ -> ()
| None ->
- let lib = if boot then coqroot else guess_coqlib fail in
+ let lib = guess_coqlib fail in
coqlib := Some lib
let coqlib () = Option.default "" !coqlib
diff --git a/lib/envars.mli b/lib/envars.mli
index 21365c48f6..ebf86d0650 100644
--- a/lib/envars.mli
+++ b/lib/envars.mli
@@ -39,7 +39,7 @@ val datadir : unit -> string
val configdir : unit -> string
(** [set_coqlib] must be runned once before any access to [coqlib] *)
-val set_coqlib : boot:bool -> fail:(string -> string) -> unit
+val set_coqlib : fail:(string -> string) -> unit
(** [set_user_coqlib path] sets the coqlib directory explicitedly. *)
val set_user_coqlib : string -> unit
diff --git a/lib/flags.ml b/lib/flags.ml
index 768d359cce..1195b8caf1 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -101,10 +101,6 @@ let verbosely f x = without_option quiet f x
let if_silent f x = if !quiet then f x
let if_verbose f x = if not !quiet then f x
-let polymorphic_inductive_cumulativity = ref false
-let make_polymorphic_inductive_cumulativity b = polymorphic_inductive_cumulativity := b
-let is_polymorphic_inductive_cumulativity () = !polymorphic_inductive_cumulativity
-
let warn = ref true
let make_warn flag = warn := flag; ()
let if_warn f x = if !warn then f x
diff --git a/lib/flags.mli b/lib/flags.mli
index 4ef5fb4445..2b4446a1db 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -75,10 +75,6 @@ val verbosely : ('a -> 'b) -> 'a -> 'b
val if_silent : ('a -> unit) -> 'a -> unit
val if_verbose : ('a -> unit) -> 'a -> unit
-(** Global polymorphic inductive cumulativity flag. *)
-val make_polymorphic_inductive_cumulativity : bool -> unit
-val is_polymorphic_inductive_cumulativity : unit -> bool
-
val warn : bool ref
val make_warn : bool -> unit
val if_warn : ('a -> unit) -> 'a -> unit