| 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 | open Declarations |
| 12 | |
| 13 | let set_local_flags flags env = |
| 14 | (* Explicitly ignored flags are set to not change *) |
| 15 | let envflags = Environ.typing_flags env in |
| 16 | let flags = { |
| 17 | (* These flags may be overridden *) |
| 18 | check_guarded = flags.check_guarded; |
| 19 | check_positive = flags.check_positive; |
| 20 | check_universes = flags.check_universes; |
| 21 | conv_oracle = flags.conv_oracle; |
| 22 | share_reduction = flags.share_reduction; |
| 23 | allow_uip = flags.allow_uip; |
| 24 | (* These flags may not *) |
| 25 | enable_VM = envflags.enable_VM; |
| 26 | enable_native_compiler = envflags.enable_native_compiler; |
| 27 | indices_matter = envflags.indices_matter; |
| 28 | impredicative_set = envflags.impredicative_set; |
| 29 | sprop_allowed = envflags.sprop_allowed; |
| 30 | } |
| 31 | in |
| 32 | Environ.set_typing_flags flags env |