| 1 | ## Changes between Coq 8.17 and Coq 8.18 |
| 2 | |
| 3 | ### XML protocol |
| 4 | |
| 5 | Version 20230413, see xml-protocol.md for details. |
| 6 | |
| 7 | - Coq locations are now fully transmitted, including line and column |
| 8 | information vs the previous start/end offset. |
| 9 | |
| 10 | ## Changes between Coq 8.15 and Coq 8.16 |
| 11 | |
| 12 | ### Plugin Interface |
| 13 | |
| 14 | Plugins are now identified by a findlib library name of the form |
| 15 | `pkg.lib`. This way, plugins can depend on other libraries and Coq can |
| 16 | properly load the required dependencies. |
| 17 | |
| 18 | It is necessary to adjust plugin code: |
| 19 | |
| 20 | - `.mlg` files must now use `DECLARE PLUGIN "pkg.lib"` instead of |
| 21 | `DECLARE PLUGIN "library_name"`. |
| 22 | |
| 23 | - `.v` files should use `Declare ML Module "pkg.lib"`, or, if using |
| 24 | Dune, `Declare ML Module "library_name:pkg.lib"` until Dune is |
| 25 | adapted. |
| 26 | |
| 27 | You must also provide the corresponding `META` file if your build |
| 28 | system doesn't generate it automatically (see the documentation of |
| 29 | `-generate-meta-for-package` for how `coq_makefile` can generate it |
| 30 | automatically). |
| 31 | |
| 32 | ### XML protocol |
| 33 | |
| 34 | See xml-protocol.md for details. |
| 35 | |
| 36 | - Added a `Subgoals` command to give more fine-grained control over which of the |
| 37 | foreground, background, shelved and given up goals are returned. |
| 38 | |
| 39 | ## Changes between Coq 8.14 and Coq 8.15 |
| 40 | |
| 41 | ### XML protocol |
| 42 | |
| 43 | See xmlprotocol.md for details. |
| 44 | |
| 45 | - Added 4 new "db_*" messages to support the Ltac debugger |
| 46 | - Modified the "add" request (not backward compatible), adding 3 additional |
| 47 | parameters to the request giving the buffer offset of the added statement. |
| 48 | The parameters are Loc.bp, Loc.line_nb and Loc.bol_pos, which are needed so |
| 49 | the debugger gets back a buffer-relative Loc.t rather than a sentence-relative |
| 50 | Loc.t. For other use cases, these can be set to 0. |
| 51 | |
| 52 | ### Internal representation of the type of constructors |
| 53 | |
| 54 | The type of constructors in fields `mind_user_lc` and `mind_nf_lc` of |
| 55 | an inductive packet (see `declarations.ml`) now directly refer to the |
| 56 | inductive type rather than to a `Rel` poimting in a context made of the |
| 57 | declaration of the inductive types of the block. Thus, instead of `Rel |
| 58 | n`, one finds `Ind((mind,ntypes-n),u)` where `ntypes` is the number of |
| 59 | types in the block and `u` is the canonical instance of polymoprhic |
| 60 | universes (i.e. `Level.Var 0` ... `Level.Var (nbuniv-1)`). |
| 61 | |
| 62 | In general, code can be adapted by: |
| 63 | - either removing a substitution `Rel`->`Ind` if such substitution was applied |
| 64 | - or inserting a call to |
| 65 | `Inductive.abstract_constructor_type_relatively_to_inductive_types_context` |
| 66 | to restore `Rel`s in place of `Ind`s if `Rel`s were expected. |
| 67 | |
| 68 | ### Universes |
| 69 | |
| 70 | - Type `UVars.UContext` now embeds universe user names, generally |
| 71 | resulting in more concise code. |
| 72 | |
| 73 | - Renaming `Univ.Constraint` into `Univ.Constraints` |
| 74 | |
| 75 | - Renaming `LSet` into `Level.Set` and `LMap` into `Level.Map` |
| 76 | |
| 77 | ### Concrete syntax |
| 78 | |
| 79 | - Explicit nodes `CProj` and `GProj` have been added for the syntax of |
| 80 | projections `t.(f)` in `constr_expr` and `glob_constr`, while they |
| 81 | were previously encoded in the `CApp` and `GApp` nodes. There may be |
| 82 | a need for adding a new case in pattern-matching. The types of `CApp` |
| 83 | and `CAppExpl` have been simplified accordingly. |
| 84 | |
| 85 | ### Functions manipulating contexts |
| 86 | |
| 87 | A few functions in Vars, Context, Termops, EConstr have moved. The |
| 88 | deprecation warning tells what to do. |
| 89 | |
| 90 | ### Build system and infrastructure |
| 91 | |
| 92 | - The Windows installer CI build has been moved from the custom |
| 93 | workers based on Inria cloud to a standard Github Action, see |
| 94 | https://github.com/rocq-prover/rocq/pull/12425 . |
| 95 | |
| 96 | Fixes https://github.com/rocq-prover/rocq/issues/6807 |
| 97 | https://github.com/rocq-prover/rocq/issues/7428 |
| 98 | https://github.com/rocq-prover/rocq/issues/8046 |
| 99 | https://github.com/rocq-prover/rocq/issues/8622 |
| 100 | https://github.com/rocq-prover/rocq/issues/9401 |
| 101 | https://github.com/rocq-prover/rocq/issues/11073 . |
| 102 | |
| 103 | - Location of Coq's runtime environment and files is now handled by a |
| 104 | new library, `coq-core.boot`, which provides a more uniform and |
| 105 | centralized API to locate files. |
| 106 | |
| 107 | ## Changes between Coq 8.13 and Coq 8.14 |
| 108 | |
| 109 | ### Build system and library infrastructure |
| 110 | |
| 111 | - ocamlfind library names `coq.*` have been renamed to `coq-core.*`. |
| 112 | |
| 113 | - Dune is now used to build the OCaml parts of Coq, thus: |
| 114 | |
| 115 | + ML object files live now in `_build`, as standard in Dune world |
| 116 | + you can build object files using `make |
| 117 | _build/install/default/bin/coqc`, thanks to our implementation of |
| 118 | a make-Dune bridge |
| 119 | + .vo files live now in `_build_vo/` |
| 120 | + `_build_vo` follows a standard "Coq install layout", that is to say: |
| 121 | * `_build_vo/default/bin`: coq-core binaries |
| 122 | * `_build_vo/default/lib/coq-core`: coq-core libraries |
| 123 | * `_build_vo/default/lib/coq`: coq libraries, such as stdlib |
| 124 | This greatly simplifies layout as tooling can assume that |
| 125 | `_build_vo/default` has the structure of an installed Coq, thus |
| 126 | making the `-local` flag obsolete. |
| 127 | + Some developer targets have changed or have been removed in favor |
| 128 | of Dune's counterparts, for example `byte` and `install-byte` are |
| 129 | no longer needed. |
| 130 | |
| 131 | For the large majority of developers, we recommend using the full |
| 132 | dune build, which is accessible by `make -f Makefile.dune` or by |
| 133 | setting the `COQ_USE_DUNE` environment variable. |
| 134 | |
| 135 | - As a consequence of the above, the packing of plugins has changed. |
| 136 | Plugins are now packed using modules aliases which is in general safer |
| 137 | w.r.t. scoping, as the container module is just a regular OCaml module. |
| 138 | |
| 139 | ### Gramlib |
| 140 | |
| 141 | - A few functions change their interfaces to take benefit of a new |
| 142 | abstraction level `LStream` for streams with location function. |
| 143 | |
| 144 | - Grammar extensions now require specifying whether they create a level or they |
| 145 | reuse an existing one. In addition to the Gramlib API changes, GRAMMAR EXTEND |
| 146 | stanzas may need a few tweaks. Their grammar was changed so that level and |
| 147 | associativity arguments that would have been ignored are now forbidden. |
| 148 | Furthermore, extensions without an explicit position now expect the entry to |
| 149 | be empty. If it is not the case, the extension will fail at runtime with an |
| 150 | assertion failure located near the offending entry. To recover the old |
| 151 | behaviour, one needs to explicitly add the new TOP position to the extension. |
| 152 | This position expects the entry to be non-empty and populates the topmost |
| 153 | defined level with the provided rules. Note that this differs from FIRST, |
| 154 | which creates a new level and prepends it to the list of levels of the entry. |
| 155 | |
| 156 | ### Notations: |
| 157 | |
| 158 | - The type `notation_entry_level` has been split into two: the name |
| 159 | `notation_entry_level` still exists and is used to characterize the |
| 160 | level and custom entry name (if any) where a grammar rule lives; the |
| 161 | new `notation_subentry_level` is to characterize the level (possibly |
| 162 | none) and custom entry name associated to the variables (= |
| 163 | non-terminal subentries) of the grammar rule. |
| 164 | |
| 165 | ## Changes between Coq 8.12 and Coq 8.13 |
| 166 | |
| 167 | ### Code formatting |
| 168 | |
| 169 | - The automatic code formatting tool `ocamlformat` has been disabled and its |
| 170 | git hook removed. If desired, automatic formatting can be achieved by calling |
| 171 | the `fmt` target of the dune build system. |
| 172 | |
| 173 | ### ML API |
| 174 | |
| 175 | Abstract syntax of tactic: |
| 176 | |
| 177 | - TacGeneric now takes an argument to tell if it comes from a |
| 178 | notation. Use `None` if not and `Some foo` to tell to print such |
| 179 | TacGeneric surrounded with `foo:( )`. |
| 180 | |
| 181 | Printing functions: |
| 182 | |
| 183 | - `Pp.h` does not take a `int` argument anymore (the argument was |
| 184 | not used). In general, where `h n` for `n` non zero was used, `hv n` |
| 185 | was instead intended. If cancelling the breaking role of cuts in the |
| 186 | box was intended, turn `h n c` into `h c`. |
| 187 | |
| 188 | Grammar entries: |
| 189 | |
| 190 | - `Prim.pattern_identref` is deprecated, use `Prim.pattern_ident` |
| 191 | which now returns a located identifier. |
| 192 | |
| 193 | Generic arguments: |
| 194 | |
| 195 | - Generic arguments: `wit_var` is deprecated, use `wit_hyp`. |
| 196 | |
| 197 | Dumpglob: |
| 198 | |
| 199 | - The function `Dumpglob.pause` and `Dumpglob.continue` are replaced |
| 200 | by `Dumpglob.push_output` and `Dumpglob.pop_output`. This allows |
| 201 | plugins to temporarily change/pause the output of Dumpglob, and then |
| 202 | restore it to the original setting. |
| 203 | |
| 204 | Glob_term: |
| 205 | |
| 206 | - Removing useless `binding_kind` argument of `GLocalDef` in |
| 207 | `extended_glob_local_binder`. |
| 208 | |
| 209 | ## Changes between Coq 8.11 and Coq 8.12 |
| 210 | |
| 211 | ### Code formatting |
| 212 | |
| 213 | - The automatic code formatting tool `ocamlformat` is enabled now for |
| 214 | the micromega codebase. Version 0.13.0 is required. See |
| 215 | `ocalmformat`'s documentation for more details on integration with |
| 216 | your editor. |
| 217 | |
| 218 | ### ML API |
| 219 | |
| 220 | Proof state and constant declaration: |
| 221 | |
| 222 | - A large consolidation of the API handling interactive and |
| 223 | non-interactive constant has been performed; low-level APIs are no |
| 224 | longer available, and the functionality of the `Proof_global` module |
| 225 | has been merged into `Declare`. |
| 226 | |
| 227 | Notations: |
| 228 | |
| 229 | - Most operators on numerals have moved to file numTok.ml. |
| 230 | |
| 231 | - Types `precedence`, `parenRelation`, `tolerability` in |
| 232 | `notgram_ops.ml` have been reworked. See `entry_level` and |
| 233 | `entry_relative_level` in `constrexpr.ml`. |
| 234 | |
| 235 | Exception handling: |
| 236 | |
| 237 | - Coq's custom `Backtrace` module has been removed in favor of OCaml's |
| 238 | native backtrace implementation. Please use the functions in |
| 239 | `Exninfo.capture` and `iraise` when re-raising inside an exception |
| 240 | handler. |
| 241 | |
| 242 | - Registration of exception printers now follows more closely OCaml's |
| 243 | API, thus: |
| 244 | |
| 245 | + printers are of type `exn -> Pp.t option` [`None` == not handled] |
| 246 | + it is forbidden for exception printers to raise. |
| 247 | |
| 248 | - Refiner.catchable_exception is deprecated, use instead |
| 249 | CErrors.noncritical in try-with block. Note that nothing is needed in |
| 250 | tclORELSE block since the exceptions there are supposed to be |
| 251 | non-critical by construction. |
| 252 | |
| 253 | Printers: |
| 254 | |
| 255 | - Functions such as Printer.pr_lconstr_goal_style_env have been |
| 256 | removed, use instead functions such as pr_lconstr with label |
| 257 | `goal_concl_style:true`. Functions such as |
| 258 | Constrextern.extern_constr which were taking a boolean argument for |
| 259 | the goal style now take instead a label. |
| 260 | |
| 261 | Implicit arguments: |
| 262 | |
| 263 | - The type `Impargs.implicit_kind` was removed in favor of |
| 264 | `Glob_term.binding_kind`. |
| 265 | |
| 266 | ## Changes between Coq 8.10 and Coq 8.11 |
| 267 | |
| 268 | ### ML API |
| 269 | |
| 270 | - Function UnivGen.global_of_constr has been removed. |
| 271 | |
| 272 | - Functions and types deprecated in 8.10 have been removed in Coq |
| 273 | 8.11. |
| 274 | |
| 275 | - Type Decl_kinds.locality has been restructured, see commit |
| 276 | message. Main change to do generally is to change the flag "Global" |
| 277 | to "Global ImportDefaultBehavior". |
| 278 | |
| 279 | Proof state: |
| 280 | |
| 281 | Proofs that are attached to a top-level constant (such as lemmas) |
| 282 | are represented by `Lemmas.t`, as they do contain additional |
| 283 | information related to the constant declaration. Some functions have |
| 284 | been renamed from `start_proof` to `start_lemma` |
| 285 | |
| 286 | Plugins that require access to the information about currently |
| 287 | opened lemmas can add one of the `![proof]` attributes to their |
| 288 | `mlg` entry, which will refine the type accordingly. See |
| 289 | documentation in `vernacentries` for more information. |
| 290 | |
| 291 | Proof `terminators` have been removed in favor of a principled |
| 292 | proof-saving path. This should not affect the regular API user, but |
| 293 | if plugin writes need special handling of the proof term they should |
| 294 | now work with Coq upstream to unsure the provided API does work and |
| 295 | is principled. Closing `hooks` are still available for simple |
| 296 | registration on constant save path, and essentially they do provide |
| 297 | the same power as terminators, but don't encourage their use other |
| 298 | than for simple tasks [such as adding a constant to a database] |
| 299 | |
| 300 | Additionally, the API for proof/lemma handling has been refactored, |
| 301 | triples have been split into named arguments, and a few bits of |
| 302 | duplicated information among layers has been cleaned up. Most proof |
| 303 | information is now represented in a direct-style, as opposed to it |
| 304 | living inside closures in previous Coq versions; thus, proof |
| 305 | manipulation possibilities have been improved. |
| 306 | |
| 307 | ## Changes between Coq 8.9 and Coq 8.10 |
| 308 | |
| 309 | ### ML4 Pre Processing |
| 310 | |
| 311 | - Support for `.ml4` files, processed by camlp5 has been removed in |
| 312 | favor of `.mlg` files processed by `coqpp`. |
| 313 | |
| 314 | Porting is usually straightforward, and involves renaming the |
| 315 | `file.ml4` file to `file.mlg` and adding a few brackets. |
| 316 | |
| 317 | See "Transitioning away from Camlp5" below for update instructions. |
| 318 | |
| 319 | ### ML API |
| 320 | |
| 321 | SProp was added, see <SProp.md> |
| 322 | |
| 323 | General deprecation |
| 324 | |
| 325 | - All functions marked [@@ocaml.deprecated] in 8.8 have been |
| 326 | removed. Please, make sure your plugin is warning-free in 8.8 before |
| 327 | trying to port it over 8.9. |
| 328 | |
| 329 | Warnings |
| 330 | |
| 331 | - Coq now builds plugins with `-warn-error` enabled by default. The |
| 332 | amount of dangerous warnings in plugin code was very high, so we now |
| 333 | require plugins in the CI to adhere to the Coq warning policy. We |
| 334 | _strongly_ recommend against disabling the default set of warnings. |
| 335 | If you have special needs, see the documentation of your build |
| 336 | system and/or OCaml for further help. |
| 337 | |
| 338 | Names |
| 339 | |
| 340 | - Kernel names no longer contain a section path. They now have only two |
| 341 | components (module path and label), which led to some changes in the API: |
| 342 | |
| 343 | KerName.make takes only 2 components |
| 344 | KerName.repr returns only 2 components |
| 345 | KerName.make2 is now KerName.make |
| 346 | Constant.make3 has been removed, use Constant.make2 |
| 347 | Constant.repr3 has been removed, use Constant.repr2 |
| 348 | |
| 349 | - `Names.transparent_state` has been moved to its own module `TransparentState`. |
| 350 | This module gathers utility functions that used to be defined in several |
| 351 | places. |
| 352 | |
| 353 | Coqlib: |
| 354 | |
| 355 | - Most functions from the `Coqlib` module have been deprecated in favor of |
| 356 | `register_ref` and `lib_ref`. The first one is available through the |
| 357 | vernacular `Register` command; it binds a name to a constant. The second |
| 358 | command then enables to locate the registered constant through its name. The |
| 359 | name resolution is dynamic. |
| 360 | |
| 361 | Proof state: |
| 362 | |
| 363 | - Handling of proof state has been fully functionalized, thus it is |
| 364 | not possible to call global functions such as `get_current_context ()`. |
| 365 | |
| 366 | The main type for functions that need to handle proof state is |
| 367 | `Proof_global.t`. |
| 368 | |
| 369 | Unfortunately, this change was not possible to do in a |
| 370 | backwards-compatible way, but in most case the api changes are |
| 371 | straightforward, with functions taking and returning an extra |
| 372 | argument. |
| 373 | |
| 374 | Macros: |
| 375 | |
| 376 | - The RAW_TYPED AS and GLOB_TYPED AS stanzas of the ARGUMENT EXTEND macro are |
| 377 | deprecated. Use TYPED AS instead. |
| 378 | |
| 379 | - coqpp (.mlg) based VERNAC EXTEND accesses attributes through a `#[ x |
| 380 | = att ]` syntax, where `att : 'a Attributes.attribute` and `x` will |
| 381 | be bound with type `'a` in the expression, unlike the old system |
| 382 | where `atts : Vernacexpr.vernac_flags` was bound in the expression |
| 383 | and had to be manually parsed. |
| 384 | |
| 385 | - `PRINTED BY` now binds `env` and `sigma`, and expects printers which take |
| 386 | as parameters term printers parametrized by an environment and an `evar_map`. |
| 387 | |
| 388 | Printers |
| 389 | |
| 390 | - `Ppconstr.pr_constr_expr`, `Ppconstr.lconstr_expr`, |
| 391 | `Ppconstr.pr_constr_pattern_expr` and `Ppconstr.pr_lconstr_pattern_expr` |
| 392 | now all take an environment and an `evar_map`. |
| 393 | |
| 394 | Libobject |
| 395 | |
| 396 | - A Higher-level API for objects with fixed scope was introduced. It supports the following kinds of objects: |
| 397 | |
| 398 | * Local objects, meaning that objects cannot be imported from outside. |
| 399 | * Global objects, meaning that they can be imported (by importing the module that contains the object). |
| 400 | * Superglobal objects, meaning that objects survive to closing a module, and |
| 401 | are imported when the file which contains them is Required (even without |
| 402 | Import). |
| 403 | * Objects that survive section closing or don't (see `nodischarge` variants, |
| 404 | however we discourage defining such objects) |
| 405 | |
| 406 | This API is made of the following functions: |
| 407 | * `Libobject.local_object` |
| 408 | * `Libobject.local_object_nodischarge` |
| 409 | * `Libobject.global_object` |
| 410 | * `Libobject.global_object_nodischarge` |
| 411 | * `Libobject.superglobal_object` |
| 412 | * `Libobject.superglobal_object_nodischarge` |
| 413 | |
| 414 | AST |
| 415 | |
| 416 | - Minor changes in the AST have been performed, for example |
| 417 | https://github.com/rocq-prover/rocq/pull/9165 |
| 418 | |
| 419 | Implicit Arguments |
| 420 | |
| 421 | - `Impargs.declare_manual_implicits` is restricted to only support declaration |
| 422 | of implicit binders at constant declaration time. `Impargs.set_implicits` should |
| 423 | be used for redeclaration of implicit arguments. |
| 424 | |
| 425 | ## Changes between Coq 8.8 and Coq 8.9 |
| 426 | |
| 427 | ### ML API |
| 428 | |
| 429 | Names |
| 430 | |
| 431 | - In `Libnames`, the type `reference` and its two constructors `Qualid` and |
| 432 | `Ident` have been removed in favor of `qualid`. `Qualid` is now the identity, |
| 433 | `Ident` can be replaced by `qualid_of_ident`. Matching over `reference` can be |
| 434 | replaced by a test using `qualid_is_ident`. Extracting the `ident` part of a |
| 435 | `qualid` can be done using `qualid_basename`. |
| 436 | |
| 437 | Misctypes |
| 438 | |
| 439 | - Syntax for universe sorts and kinds has been moved from `Misctypes` |
| 440 | to `Glob_term`, as these are turned into kernel terms by |
| 441 | `Pretyping`. |
| 442 | |
| 443 | Proof engine |
| 444 | |
| 445 | - More functions have been changed to use `EConstr`, notably the |
| 446 | functions in `Evd`, and in particular `Evd.define`. |
| 447 | |
| 448 | Note that the core function `EConstr.to_constr` now _enforces_ by |
| 449 | default that the resulting term is ground, that is to say, free of |
| 450 | Evars. This is usually what you want, as open terms should be of |
| 451 | type `EConstr.t` to benefit from the invariants the `EConstr` API is |
| 452 | meant to guarantee. |
| 453 | |
| 454 | In case you'd like to violate this API invariant, you can use the |
| 455 | `abort_on_undefined_evars` flag to `EConstr.to_constr`, but note |
| 456 | that setting this flag to false is deprecated so it is only meant to |
| 457 | be used as to help port pre-EConstr code. |
| 458 | |
| 459 | - A few type alias have been deprecated, in all cases the message |
| 460 | should indicate what the canonical form is. An important change is |
| 461 | the move of `Globnames.global_reference` to `Names.GlobRef.t`. |
| 462 | |
| 463 | - Unification API returns `evar_map option` instead of `bool * evar_map` |
| 464 | with the guarantee that the `evar_map` was unchanged if the boolean |
| 465 | was false. |
| 466 | |
| 467 | ML Libraries used by Coq |
| 468 | |
| 469 | - Introduction of a `Smart` module for collecting `smart*` functions, e.g. |
| 470 | `Array.Smart.map`. |
| 471 | - Uniformization of some names, e.g. `Array.Smart.fold_left_map` instead |
| 472 | of `Array.smartfoldmap`. |
| 473 | |
| 474 | Printer.ml API |
| 475 | |
| 476 | - The mechanism in `Printer` that allowed dynamically overriding `pr_subgoals`, |
| 477 | `pr_subgoal` and `pr_goal` was removed to simplify the code. It was |
| 478 | earlier used by PCoq. |
| 479 | |
| 480 | Kernel |
| 481 | |
| 482 | - The following renamings happened: |
| 483 | - `Context.Rel.t` into `Constr.rel_context` |
| 484 | - `Context.Named.t` into `Constr.named_context` |
| 485 | - `Context.Compacted.t` into `Constr.compacted_context` |
| 486 | - `Context.Rel.Declaration.t` into `Constr.rel_declaration` |
| 487 | - `Context.Named.Declaration.t` into `Constr.named_declaration` |
| 488 | - `Context.Compacted.Declaration.t` into `Constr.compacted_declaration` |
| 489 | |
| 490 | Source code organization |
| 491 | |
| 492 | - We have eliminated / fused some redundant modules and relocated a |
| 493 | few interfaces files. The `intf` folder is gone, and now for example |
| 494 | `Constrexpr` is located in `interp/`, `Vernacexpr` in `vernac/` and |
| 495 | so on. Changes should be compatible, but in a few cases stricter |
| 496 | layering requirements may mean that functions have moved. In all |
| 497 | cases adapting is a matter of changing the module name. |
| 498 | |
| 499 | Vernacular commands |
| 500 | |
| 501 | - The implementation of vernacular commands has been refactored so it |
| 502 | is self-contained now, including the parsing and extension |
| 503 | mechanisms. This involves a couple of non-backward compatible |
| 504 | changes due to layering issues, where some functions have been moved |
| 505 | from `Pcoq` to `Pvernac` and from `Vernacexpr` to modules in |
| 506 | `tactics/`. In all cases adapting is a matter of changing the module |
| 507 | name. |
| 508 | |
| 509 | Primitive number parsers |
| 510 | |
| 511 | - For better modularity, the primitive parsers for `positive`, `N` and `Z` |
| 512 | have been split over three files (`plugins/syntax/positive_syntax.ml`, |
| 513 | `plugins/syntax/n_syntax.ml`, `plugins/syntax/z_syntax.ml`). |
| 514 | |
| 515 | Parsing |
| 516 | |
| 517 | - Manual uses of the `Pcoq.Gram` module have been deprecated. Wrapper modules |
| 518 | `Pcoq.Entry` and `Pcoq.Parsable` were introduced to replace it. |
| 519 | |
| 520 | Termops |
| 521 | |
| 522 | - Internal printing functions have been placed under the |
| 523 | `Termops.Internal` namespace. |
| 524 | |
| 525 | ### Unit testing |
| 526 | |
| 527 | The test suite now allows writing unit tests against OCaml code in the Coq |
| 528 | code base. Those unit tests create a dependency on the OUnit test framework. |
| 529 | |
| 530 | ### Transitioning away from Camlp5 |
| 531 | |
| 532 | In an effort to reduce dependency on camlp5, the use of several grammar macros |
| 533 | is discouraged. Coq is now shipped with its own preprocessor, called coqpp, |
| 534 | which serves the same purpose as camlp5. |
| 535 | |
| 536 | To perform the transition to coqpp macros, one first needs to change the |
| 537 | extension of a macro file from `.ml4` to `.mlg`. Not all camlp5 macros are |
| 538 | handled yet. |
| 539 | |
| 540 | Due to parsing constraints, the syntax of the macros is slightly different, but |
| 541 | updating the source code is mostly a matter of straightforward |
| 542 | search-and-replace. The main differences are summarized below. |
| 543 | |
| 544 | #### OCaml code |
| 545 | |
| 546 | Every piece of toplevel OCaml code needs to be wrapped into braces. |
| 547 | |
| 548 | For instance, code of the form |
| 549 | ``` |
| 550 | let myval = 0 |
| 551 | ``` |
| 552 | should be turned into |
| 553 | ``` |
| 554 | { |
| 555 | let myval = 0 |
| 556 | } |
| 557 | ``` |
| 558 | |
| 559 | #### TACTIC EXTEND |
| 560 | |
| 561 | Steps to perform: |
| 562 | - replace the brackets enclosing OCaml code in actions with braces |
| 563 | - if not there yet, add a leading `|` to the first rule |
| 564 | |
| 565 | For instance, code of the form: |
| 566 | ``` |
| 567 | TACTIC EXTEND my_tac |
| 568 | [ "tac1" int_or_var(i) tactic(t) ] -> [ mytac1 ist i t ] |
| 569 | | [ "tac2" tactic(t) ] -> [ mytac2 t ] |
| 570 | END |
| 571 | ``` |
| 572 | should be turned into |
| 573 | ``` |
| 574 | TACTIC EXTEND my_tac |
| 575 | | [ "tac1" int_or_var(i) tactic(t) ] -> { mytac1 ist i t } |
| 576 | | [ "tac2" tactic(t) ] -> { mytac2 t } |
| 577 | END |
| 578 | ``` |
| 579 | |
| 580 | #### VERNAC EXTEND |
| 581 | |
| 582 | Steps to perform: |
| 583 | - replace the brackets enclosing OCaml code in actions and rule classifiers with |
| 584 | braces |
| 585 | - if not there yet, add a leading `|Ì€ to the first rule |
| 586 | |
| 587 | Handwritten classifiers declared through the `CLASSIFIED BY` statement are |
| 588 | considered OCaml code, so they also need to be wrapped in braces. |
| 589 | |
| 590 | For instance, code of the form: |
| 591 | ``` |
| 592 | VERNAC COMMAND EXTEND my_command CLASSIFIED BY classifier |
| 593 | [ "foo" int(i) ] => [ classif' ] -> [ cmd1 i ] |
| 594 | | [ "bar" ] -> [ cmd2 ] |
| 595 | END |
| 596 | ``` |
| 597 | should be turned into |
| 598 | ``` |
| 599 | VERNAC COMMAND EXTEND my_command CLASSIFIED BY { classifier } |
| 600 | | [ "foo" int(i) ] => { classif' } -> { cmd1 i } |
| 601 | | [ "bar" ] -> { cmd2 } |
| 602 | END |
| 603 | ``` |
| 604 | |
| 605 | #### ARGUMENT EXTEND |
| 606 | |
| 607 | Steps to perform: |
| 608 | - replace the brackets enclosing OCaml code in actions with braces |
| 609 | - if not there yet, add a leading `|` to the first rule |
| 610 | - syntax of `TYPED AS` has been restricted not to accept compound generic |
| 611 | arguments as a literal, e.g. `foo_opt` should be rewritten into `foo option` |
| 612 | and similarly `foo_list` into `foo list`. |
| 613 | - parenthesis around pair types in `TYPED AS` are now mandatory |
| 614 | - `RAW_TYPED AS` and `GLOB_TYPED AS` clauses need to be removed |
| 615 | |
| 616 | `BY` clauses are considered OCaml code, and thus need to be wrapped in braces, |
| 617 | but not the `TYPED AS` clauses. |
| 618 | |
| 619 | For instance, code of the form: |
| 620 | ``` |
| 621 | ARGUMENT EXTEND my_arg |
| 622 | TYPED AS int_opt |
| 623 | PRINTED BY printer |
| 624 | INTERPRETED BY interp_f |
| 625 | GLOBALIZED BY glob_f |
| 626 | SUBSTITUTED BY subst_f |
| 627 | RAW_TYPED AS int_opt |
| 628 | RAW_PRINTED BY raw_printer |
| 629 | GLOB_TYPED AS int_opt |
| 630 | GLOB_PRINTED BY glob_printer |
| 631 | [ "foo" int(i) ] -> [ my_arg1 i ] |
| 632 | | [ "bar" ] -> [ my_arg2 ] |
| 633 | END |
| 634 | ``` |
| 635 | should be turned into |
| 636 | ``` |
| 637 | ARGUMENT EXTEND my_arg |
| 638 | TYPED AS { int_opt } |
| 639 | PRINTED BY { printer } |
| 640 | INTERPRETED BY { interp_f } |
| 641 | GLOBALIZED BY { glob_f } |
| 642 | SUBSTITUTED BY { subst_f } |
| 643 | RAW_PRINTED BY { raw_printer } |
| 644 | GLOB_PRINTED BY { glob_printer } |
| 645 | | [ "foo" int(i) ] -> { my_arg1 i } |
| 646 | | [ "bar" ] -> { my_arg2 } |
| 647 | END |
| 648 | ``` |
| 649 | |
| 650 | #### GEXTEND |
| 651 | |
| 652 | Most plugin writers do not need this low-level interface, but for the sake of |
| 653 | completeness we document it. |
| 654 | |
| 655 | Steps to perform are: |
| 656 | - replace `GEXTEND` with `GRAMMAR EXTEND` |
| 657 | - wrap every occurrence of OCaml code in actions into braces `{ }` |
| 658 | |
| 659 | For instance, code of the form |
| 660 | ``` |
| 661 | GEXTEND Gram |
| 662 | GLOBAL: my_entry; |
| 663 | |
| 664 | my_entry: |
| 665 | [ [ x = bar; y = qux -> do_something x y |
| 666 | | "("; z = LIST0 my_entry; ")" -> do_other_thing z |
| 667 | ] ]; |
| 668 | END |
| 669 | ``` |
| 670 | should be turned into |
| 671 | ``` |
| 672 | GRAMMAR EXTEND Gram |
| 673 | GLOBAL: my_entry; |
| 674 | |
| 675 | my_entry: |
| 676 | [ [ x = bar; y = qux -> { do_something x y } |
| 677 | | "("; z = LIST0 my_entry; ")" -> { do_other_thing z } |
| 678 | ] ]; |
| 679 | END |
| 680 | ``` |
| 681 | |
| 682 | Caveats: |
| 683 | - No `GLOBAL` entries mean that they are all local, while camlp5 special-cases |
| 684 | this as a shorthand for all global entries. Solution: always define a `GLOBAL` |
| 685 | section. |
| 686 | - No complex patterns allowed in token naming. Solution: match on it inside the |
| 687 | OCaml quotation. |
| 688 | |
| 689 | ## Changes between Coq 8.7 and Coq 8.8 |
| 690 | |
| 691 | ### Bug tracker |
| 692 | |
| 693 | As of 18/10/2017, Coq uses [GitHub issues](https://github.com/rocq-prover/rocq/issues) |
| 694 | as bug tracker. |
| 695 | Old bug reports were migrated from Bugzilla to GitHub issues using |
| 696 | [this migration script](https://gist.github.com/Zimmi48/d923e52f64fe17c72852d9c148bfcdc6#file-bugzilla2github) |
| 697 | as detailed in [this blog post](https://www.theozimmermann.net/2017/10/bugzilla-to-github/). |
| 698 | |
| 699 | All the bugs with a number below 1154 had to be renumbered, you can find |
| 700 | a correspondence table [here](/dev/bugzilla2github_stripped.csv). |
| 701 | All the other bugs kept their number. |
| 702 | |
| 703 | ### ML API |
| 704 | |
| 705 | General deprecation |
| 706 | |
| 707 | - All functions marked `[@@ocaml.deprecated]` in 8.7 have been |
| 708 | removed. Please, make sure your plugin is warning-free in 8.7 before |
| 709 | trying to port it over 8.8. |
| 710 | |
| 711 | Proof engine |
| 712 | |
| 713 | - Due to the introduction of `EConstr` in 8.7, it is not necessary to |
| 714 | track "goal evar normal form status" anymore, thus the type `'a |
| 715 | Proofview.Goal.t` loses its ghost argument. This may introduce some |
| 716 | minor incompatibilities at the typing level. Code-wise, things |
| 717 | should remain the same. |
| 718 | |
| 719 | We removed the following functions: |
| 720 | |
| 721 | - `Universes.unsafe_constr_of_global`: use `Global.constr_of_global_in_context` |
| 722 | instead. The returned term contains De Bruijn universe variables. If you don't |
| 723 | depend on universes being instantiated, simply drop the context. |
| 724 | |
| 725 | - `Universes.unsafe_type_of_global`: same as above with |
| 726 | `Global.type_of_global_in_context` |
| 727 | |
| 728 | We changed the type of the following functions: |
| 729 | |
| 730 | - `Global.body_of_constant_body`: now also returns the abstract universe context. |
| 731 | The returned term contains De Bruijn universe variables. |
| 732 | |
| 733 | - `Global.body_of_constant`: same as above. |
| 734 | |
| 735 | - `Constrinterp.*`: generally, many functions that used to take an |
| 736 | `evar_map ref` have now been switched to functions that will work in |
| 737 | a functional way. The old style of passing `evar_map`s as references |
| 738 | is not supported anymore. |
| 739 | |
| 740 | Changes in the abstract syntax tree: |
| 741 | |
| 742 | - The practical totality of the AST has been nodified using |
| 743 | `CAst.t`. This means that all objects coming from parsing will be |
| 744 | indeed wrapped in a `CAst.t`. `Loc.located` is on its way to |
| 745 | deprecation. Some minor interfaces changes have resulted from |
| 746 | this. |
| 747 | |
| 748 | We have changed the representation of the following types: |
| 749 | |
| 750 | - `Lib.object_prefix` is now a record instead of a nested tuple. |
| 751 | |
| 752 | Some tactics and related functions now support static configurability, e.g.: |
| 753 | |
| 754 | - `injectable`, `dEq`, etc. take an argument `~keep_proofs` which, |
| 755 | - if `None`, tells to behave as told with the flag `Keep Proof Equalities` |
| 756 | - if `Some b`, tells to keep proof equalities iff `b` is true |
| 757 | |
| 758 | Declaration of printers for arguments used only in vernac command |
| 759 | |
| 760 | - It should now use `declare_extra_vernac_genarg_pprule` rather than |
| 761 | `declare_extra_genarg_pprule`, otherwise, a failure at runtime might |
| 762 | happen. An alternative is to register the corresponding argument as |
| 763 | a value, using `Geninterp.register_val0 wit None`. |
| 764 | |
| 765 | Types Alias deprecation and type relocation. |
| 766 | |
| 767 | - A few type alias have been deprecated, in all cases the message |
| 768 | should indicate what the canonical form is. |
| 769 | |
| 770 | ### STM API |
| 771 | |
| 772 | The STM API has seen a general overhaul. The main change is the |
| 773 | introduction of a "Coq document" type, which all operations now take |
| 774 | as a parameter. This effectively functionalize the STM API and will |
| 775 | allow in the future to handle several documents simultaneously. |
| 776 | |
| 777 | The main remarkable point is that key implicit global parameters such |
| 778 | as load-paths and required modules are now arguments to the document |
| 779 | creation function. This helps enforcing some key invariants. |
| 780 | |
| 781 | ### XML IDE Protocol |
| 782 | |
| 783 | - Before 8.8, `Query` only executed the first command present in the |
| 784 | `query` string; starting with 8.8, the caller may include several |
| 785 | statements. This is useful for instance for temporarily setting an |
| 786 | option and then executing a command. |
| 787 | |
| 788 | ## Changes between Coq 8.6 and Coq 8.7 |
| 789 | |
| 790 | ### Ocaml |
| 791 | |
| 792 | Coq is compiled with `-safe-string` enabled and requires plugins to do |
| 793 | the same. This means that code using `String` in an imperative way |
| 794 | will fail to compile now. They should switch to `Bytes.t` |
| 795 | |
| 796 | Configure supports passing flambda options, use `-flambda-opts OPTS` |
| 797 | with a flambda-enabled Ocaml to tweak the compilation to your taste. |
| 798 | |
| 799 | ### ML API |
| 800 | |
| 801 | - Added two functions for declaring hooks to be executed in reduction |
| 802 | functions when some given constants are traversed: |
| 803 | |
| 804 | * `declare_reduction_effect`: to declare a hook to be applied when some |
| 805 | constant are visited during the execution of some reduction functions |
| 806 | (primarily `cbv`). |
| 807 | |
| 808 | * `set_reduction_effect`: to declare a constant on which a given effect |
| 809 | hook should be called. |
| 810 | |
| 811 | - We renamed the following functions: |
| 812 | |
| 813 | ``` |
| 814 | Context.Rel.Declaration.fold -> Context.Rel.Declaration.fold_constr |
| 815 | Context.Named.Declaration.fold -> Context.Named.Declaration.fold_constr |
| 816 | Printer.pr_var_list_decl -> Printer.pr_compacted_decl |
| 817 | Printer.pr_var_decl -> Printer.pr_named_decl |
| 818 | Nameops.lift_subscript -> Nameops.increment_subscript |
| 819 | ``` |
| 820 | |
| 821 | - We removed the following functions: |
| 822 | |
| 823 | * `Termops.compact_named_context_reverse`: practical substitute is `Termops.compact_named_context`. |
| 824 | * `Namegen.to_avoid`: equivalent substitute is `Names.Id.List.mem`. |
| 825 | |
| 826 | - We renamed the following modules: |
| 827 | |
| 828 | * `Context.ListNamed` -> `Context.Compacted` |
| 829 | |
| 830 | - The following type aliases where removed |
| 831 | |
| 832 | * `Context.section_context`: it was just an alias for `Context.Named.t` which is still available. |
| 833 | |
| 834 | - The module `Constrarg` was merged into `Stdarg`. |
| 835 | |
| 836 | - The following types have been moved and modified: |
| 837 | |
| 838 | * `local_binder` -> `local_binder_expr` |
| 839 | * `glob_binder` merged with `glob_decl` |
| 840 | |
| 841 | - The following constructors have been renamed: |
| 842 | |
| 843 | ``` |
| 844 | LocalRawDef -> CLocalDef |
| 845 | LocalRawAssum -> CLocalAssum |
| 846 | LocalPattern -> CLocalPattern |
| 847 | ``` |
| 848 | |
| 849 | - In `Constrexpr_ops`: |
| 850 | |
| 851 | Deprecating `abstract_constr_expr` in favor of `mkCLambdaN`, and |
| 852 | `prod_constr_expr` in favor of `mkCProdN`. Note: the first ones were |
| 853 | interpreting `(x y z:_)` as `(x:_) (y:_) (z:_)` while the second |
| 854 | ones were preserving the original sharing of the type. |
| 855 | |
| 856 | - In `Nameops`: |
| 857 | |
| 858 | The API has been made more uniform. New combinators added in the |
| 859 | `Name` space name. Function `out_name` now fails with `IsAnonymous` |
| 860 | rather than with `Failure "Nameops.out_name"`. |
| 861 | |
| 862 | - Location handling and AST attributes: |
| 863 | |
| 864 | Location handling has been reworked. First, `Loc.ghost` has been |
| 865 | removed in favor of an option type, all objects carrying an optional |
| 866 | source code location have been switched to use `Loc.t option`. |
| 867 | |
| 868 | Storage of location information has been also refactored. The main |
| 869 | datatypes representing Coq AST (`constrexpr`, `glob_expr`) have been |
| 870 | switched to a generic "node with attributes" representation `'a |
| 871 | CAst.ast`, which is a record of the form: |
| 872 | |
| 873 | ```ocaml |
| 874 | type 'a ast = private { |
| 875 | v : 'a; |
| 876 | loc : Loc.t option; |
| 877 | ... |
| 878 | } |
| 879 | ``` |
| 880 | consumers of AST nodes are recommended to use accessor-based pattern |
| 881 | matching `{ v; loc }` to destruct `ast` object. Creation is done |
| 882 | with `CAst.make ?loc obj`, where the attributes are optional. Some |
| 883 | convenient combinators are provided in the module. A typical match: |
| 884 | |
| 885 | ```ocaml |
| 886 | | CCase(loc, a1) -> CCase(loc, f a1) |
| 887 | ``` |
| 888 | |
| 889 | is now done as: |
| 890 | ```ocaml |
| 891 | | { v = CCase(a1); loc } -> CAst.make ?loc @@ CCase(f a1) |
| 892 | |
| 893 | ``` |
| 894 | or even better, if plan to preserve the attributes you can wrap your |
| 895 | top-level function in `CAst.map` to have: |
| 896 | |
| 897 | ```ocaml |
| 898 | | CCase(a1) -> CCase(f a1) |
| 899 | ``` |
| 900 | |
| 901 | This scheme based on records enables easy extensibility of the AST |
| 902 | node type without breaking compatibility. |
| 903 | |
| 904 | Not all objects carrying a location have been converted to the |
| 905 | generic node representation, some of them may be converted in the |
| 906 | future, for some others the abstraction is not just worth it. |
| 907 | |
| 908 | Thus, we still maintain a `'a Loc.located == Loc.t option * a'`, |
| 909 | tuple type which should be treated as private datatype (ok to match |
| 910 | against, but forbidden to manually build), and it is mandatory to |
| 911 | use it for objects that carry a location. This policy has been |
| 912 | implemented in the whole code base. Matching a located object hasn't |
| 913 | changed, however, `Loc.tag ?loc obj` must be used to build one. |
| 914 | |
| 915 | - In `GOption`: |
| 916 | |
| 917 | Support for non-synchronous options has been removed. Now all |
| 918 | options are handled as a piece of normal document state, and thus |
| 919 | passed to workers, etc... As a consequence, the field |
| 920 | `Goptions.optsync` has been removed. |
| 921 | |
| 922 | - In `Coqlib` / reference location: |
| 923 | |
| 924 | We have removed from Coqlib functions returning `constr` from |
| 925 | names. Now it is only possible to obtain references, that must be |
| 926 | processed wrt the particular needs of the client. |
| 927 | We have changed in constrintern the functions returnin `constr` as |
| 928 | well to return global references instead. |
| 929 | |
| 930 | Users of `coq_constant/gen_constant` can do |
| 931 | `Universes.constr_of_global (find_reference dir r)` _however_ note |
| 932 | the warnings in the `Universes.constr_of_global` in the |
| 933 | documentation. It is very likely that you were previously suffering |
| 934 | from problems with polymorphic universes due to using |
| 935 | `Coqlib.coq_constant` that used to do this. You must rather use |
| 936 | `pf_constr_of_global` in tactics and `Evarutil.new_global` variants |
| 937 | when constructing terms in ML (see univpoly.txt for more information). |
| 938 | |
| 939 | ### Tactic API |
| 940 | |
| 941 | - `pf_constr_of_global` now returns a tactic instead of taking a continuation. |
| 942 | Thus it only generates one instance of the global reference, and it is the |
| 943 | caller's responsibility to perform a focus on the goal. |
| 944 | |
| 945 | - `pf_global`, `construct_reference`, `global_reference`, |
| 946 | `global_reference_in_absolute_module` now return a `global_reference` |
| 947 | instead of a `constr`. |
| 948 | |
| 949 | - The `tclWEAK_PROGRESS` and `tclNOTSAMEGOAL` tacticals were removed. Their usecase |
| 950 | was very specific. Use `tclPROGRESS` instead. |
| 951 | |
| 952 | - New (internal) tactical `tclINDEPENDENTL` that combined with enter_one allows |
| 953 | to iterate a non-unit tactic on all goals and access their returned values. |
| 954 | |
| 955 | - The unsafe flag of the `Refine.refine` function and its variants has been |
| 956 | renamed and dualized into typecheck and has been made mandatory. |
| 957 | |
| 958 | ### Ltac API |
| 959 | |
| 960 | Many Ltac specific API has been moved in its own ltac/ folder. Amongst other |
| 961 | important things: |
| 962 | |
| 963 | - `Pcoq.Tactic` -> `Pltac` |
| 964 | - `Constrarg.wit_tactic` -> `Tacarg.wit_tactic` |
| 965 | - `Constrarg.wit_ltac` -> `Tacarg.wit_ltac` |
| 966 | - API below `ltac/` that accepted a *`_tactic_expr` now accept a *`_generic_argument` |
| 967 | instead |
| 968 | - Some printing functions were moved from `Pptactic` to `Pputils` |
| 969 | - A part of `Tacexpr` has been moved to `Tactypes` |
| 970 | - The `TacFun` tactic expression constructor now takes a `Name.t list` for the |
| 971 | variable list rather than an `Id.t option list`. |
| 972 | |
| 973 | The folder itself has been turned into a plugin. This does not change much, |
| 974 | but because it is a packed plugin, it may wreak havoc for third-party plugins |
| 975 | depending on any module defined in the `ltac/` directory. Namely, even if |
| 976 | everything looks OK at compile time, a plugin can fail to load at link time |
| 977 | because it mistakenly looks for a module `Foo` instead of `Ltac_plugin.Foo`, with |
| 978 | an error of the form: |
| 979 | |
| 980 | ``` |
| 981 | Error: while loading myplugin.cmxs, no implementation available for Foo. |
| 982 | ``` |
| 983 | |
| 984 | In particular, most `EXTEND` macros will trigger this problem even if they |
| 985 | seemingly do not use any Ltac module, as their expansion do. |
| 986 | |
| 987 | The solution is simple, and consists in adding a statement `open Ltac_plugin` |
| 988 | in each file using a Ltac module, before such a module is actually called. An |
| 989 | alternative solution would be to fully qualify Ltac modules, e.g. turning any |
| 990 | call to Tacinterp into `Ltac_plugin.Tacinterp`. Note that this solution does not |
| 991 | work for `EXTEND` macros though. |
| 992 | |
| 993 | ### Additional changes in tactic extensions |
| 994 | |
| 995 | Entry `constr_with_bindings` has been renamed into |
| 996 | `open_constr_with_bindings`. New entry `constr_with_bindings` now |
| 997 | uses type classes and rejects terms with unresolved holes. |
| 998 | |
| 999 | ### Error handling |
| 1000 | |
| 1001 | - All error functions now take an optional parameter `?loc:Loc.t`. For |
| 1002 | functions that used to carry a suffix `_loc`, such suffix has been |
| 1003 | dropped. |
| 1004 | |
| 1005 | - `errorlabstrm` and `error` has been removed in favor of `user_err`. |
| 1006 | |
| 1007 | - The header parameter to `user_err` has been made optional. |
| 1008 | |
| 1009 | ### Pretty printing |
| 1010 | |
| 1011 | Some functions have been removed, see pretty printing below for more |
| 1012 | details. |
| 1013 | |
| 1014 | #### Pretty Printing and XML protocol |
| 1015 | |
| 1016 | The type `std_cmdpps` has been reworked and made the canonical "Coq rich |
| 1017 | document type". This allows for a more uniform handling of printing |
| 1018 | (specially in IDEs). The main consequences are: |
| 1019 | |
| 1020 | - Richpp has been confined to IDE use. Most of previous uses of the |
| 1021 | `richpp` type should be replaced now by `Pp.std_cmdpps`. Main API |
| 1022 | has been updated. |
| 1023 | |
| 1024 | - The XML protocol will send a new message type of `pp`, which should |
| 1025 | be rendered client-wise. |
| 1026 | |
| 1027 | - `Set Printing Width` is deprecated, now width is controlled |
| 1028 | client-side. |
| 1029 | |
| 1030 | - `Pp_control` has removed. The new module `Topfmt` implements |
| 1031 | console control for the toplevel. |
| 1032 | |
| 1033 | - The impure tag system in `Pp` has been removed. This also does away |
| 1034 | with the printer signatures and functors. Now printers tag |
| 1035 | unconditionally. |
| 1036 | |
| 1037 | - The following functions have been removed from `Pp`: |
| 1038 | |
| 1039 | ```ocaml |
| 1040 | val stras : int * string -> std_ppcmds |
| 1041 | val tbrk : int * int -> std_ppcmds |
| 1042 | val tab : unit -> std_ppcmds |
| 1043 | val pifb : unit -> std_ppcmds |
| 1044 | val comment : int -> std_ppcmds |
| 1045 | val comments : ((int * int) * string) list ref |
| 1046 | val eval_ppcmds : std_ppcmds -> std_ppcmds |
| 1047 | val is_empty : std_ppcmds -> bool |
| 1048 | val t : std_ppcmds -> std_ppcmds |
| 1049 | val hb : int -> std_ppcmds |
| 1050 | val vb : int -> std_ppcmds |
| 1051 | val hvb : int -> std_ppcmds |
| 1052 | val hovb : int -> std_ppcmds |
| 1053 | val tb : unit -> std_ppcmds |
| 1054 | val close : unit -> std_ppcmds |
| 1055 | val tclose : unit -> std_ppcmds |
| 1056 | val open_tag : Tag.t -> std_ppcmds |
| 1057 | val close_tag : unit -> std_ppcmds |
| 1058 | val msg_with : ... |
| 1059 | |
| 1060 | module Tag |
| 1061 | ``` |
| 1062 | |
| 1063 | ### Stm API |
| 1064 | |
| 1065 | - We have streamlined the `Stm` API, now `add` and `query` take a |
| 1066 | `coq_parsable` instead a `string` so clients can have more control |
| 1067 | over their input stream. As a consequence, their types have been |
| 1068 | modified. |
| 1069 | |
| 1070 | - The main parsing entry point has also been moved to the |
| 1071 | `Stm`. Parsing is considered a synchronous operation so it will |
| 1072 | either succeed or raise an exception. |
| 1073 | |
| 1074 | - `Feedback` is now only emitted for asynchronous operations. As a |
| 1075 | consequence, it always carries a valid stateid and the type has |
| 1076 | changed to accommodate that. |
| 1077 | |
| 1078 | - A few unused hooks were removed due to cleanups, no clients known. |
| 1079 | |
| 1080 | ### Toplevel and Vernacular API |
| 1081 | |
| 1082 | - The components related to vernacular interpretation have been moved |
| 1083 | to their own folder `vernac/` whereas toplevel now contains the |
| 1084 | proper toplevel shell and compiler. |
| 1085 | |
| 1086 | - Coq's toplevel has been ported to directly use the common `Stm` |
| 1087 | API. The signature of a few functions has changed as a result. |
| 1088 | |
| 1089 | ### XML Protocol |
| 1090 | |
| 1091 | - The legacy `Interp` call has been turned into a noop. |
| 1092 | |
| 1093 | - The `query` call has been modified, now it carries a mandatory |
| 1094 | `route_id` integer parameter, that associated the result of such |
| 1095 | query with its generated feedback. |
| 1096 | |
| 1097 | ## Changes between Coq 8.5 and Coq 8.6 |
| 1098 | |
| 1099 | ### Parsing |
| 1100 | |
| 1101 | `Pcoq.parsable` now takes an extra optional filename argument so as to |
| 1102 | bind locations to a file name when relevant. |
| 1103 | |
| 1104 | ### Files |
| 1105 | |
| 1106 | To avoid clashes with OCaml's compiler libs, the following files were renamed: |
| 1107 | |
| 1108 | ``` |
| 1109 | kernel/closure.ml{,i} -> kernel/cClosure.ml{,i} |
| 1110 | lib/errors.ml{,i} -> lib/cErrors.ml{,i} |
| 1111 | toplevel/cerror.ml{,i} -> toplevel/explainErr.mli{,i} |
| 1112 | ``` |
| 1113 | |
| 1114 | All IDE-specific files, including the XML protocol have been moved to `ide/` |
| 1115 | |
| 1116 | ### Reduction functions |
| 1117 | |
| 1118 | In `closure.ml`, we introduced the more precise reduction flags `fMATCH`, `fFIX`, |
| 1119 | `fCOFIX`. |
| 1120 | |
| 1121 | We renamed the following functions: |
| 1122 | |
| 1123 | ``` |
| 1124 | Closure.betadeltaiota -> Closure.all |
| 1125 | Closure.betadeltaiotanolet -> Closure.allnolet |
| 1126 | Reductionops.beta -> Closure.beta |
| 1127 | Reductionops.zeta -> Closure.zeta |
| 1128 | Reductionops.betaiota -> Closure.betaiota |
| 1129 | Reductionops.betaiotazeta -> Closure.betaiotazeta |
| 1130 | Reductionops.delta -> Closure.delta |
| 1131 | Reductionops.betalet -> Closure.betazeta |
| 1132 | Reductionops.betadelta -> Closure.betadeltazeta |
| 1133 | Reductionops.betadeltaiota -> Closure.all |
| 1134 | Reductionops.betadeltaiotanolet -> Closure.allnolet |
| 1135 | Closure.no_red -> Closure.nored |
| 1136 | Reductionops.nored -> Closure.nored |
| 1137 | Reductionops.nf_betadeltaiota -> Reductionops.nf_all |
| 1138 | Reductionops.whd_betadelta -> Reductionops.whd_betadeltazeta |
| 1139 | Reductionops.whd_betadeltaiota -> Reductionops.whd_all |
| 1140 | Reductionops.whd_betadeltaiota_nolet -> Reductionops.whd_allnolet |
| 1141 | Reductionops.whd_betadelta_stack -> Reductionops.whd_betadeltazeta_stack |
| 1142 | Reductionops.whd_betadeltaiota_stack -> Reductionops.whd_all_stack |
| 1143 | Reductionops.whd_betadeltaiota_nolet_stack -> Reductionops.whd_allnolet_stack |
| 1144 | Reductionops.whd_betadelta_state -> Reductionops.whd_betadeltazeta_state |
| 1145 | Reductionops.whd_betadeltaiota_state -> Reductionops.whd_all_state |
| 1146 | Reductionops.whd_betadeltaiota_nolet_state -> Reductionops.whd_allnolet_state |
| 1147 | Reductionops.whd_eta -> Reductionops.shrink_eta |
| 1148 | Tacmach.pf_whd_betadeltaiota -> Tacmach.pf_whd_all |
| 1149 | Tacmach.New.pf_whd_betadeltaiota -> Tacmach.New.pf_whd_all |
| 1150 | ``` |
| 1151 | |
| 1152 | And removed the following ones: |
| 1153 | |
| 1154 | ``` |
| 1155 | Reductionops.whd_betaetalet |
| 1156 | Reductionops.whd_betaetalet_stack |
| 1157 | Reductionops.whd_betaetalet_state |
| 1158 | Reductionops.whd_betadeltaeta_stack |
| 1159 | Reductionops.whd_betadeltaeta_state |
| 1160 | Reductionops.whd_betadeltaeta |
| 1161 | Reductionops.whd_betadeltaiotaeta_stack |
| 1162 | Reductionops.whd_betadeltaiotaeta_state |
| 1163 | Reductionops.whd_betadeltaiotaeta |
| 1164 | ``` |
| 1165 | |
| 1166 | In `intf/genredexpr.mli`, `fIota` was replaced by `FMatch`, `FFix` and |
| 1167 | `FCofix`. Similarly, `rIota` was replaced by `rMatch`, `rFix` and `rCofix`. |
| 1168 | |
| 1169 | ### Notation_ops |
| 1170 | |
| 1171 | Use `Glob_ops.glob_constr_eq` instead of `Notation_ops.eq_glob_constr`. |
| 1172 | |
| 1173 | ### Logging and Pretty Printing |
| 1174 | |
| 1175 | * Printing functions have been removed from `Pp.mli`, which is now a |
| 1176 | purely pretty-printing interface. Functions affected are: |
| 1177 | |
| 1178 | ```` ocaml |
| 1179 | val pp : std_ppcmds -> unit |
| 1180 | val ppnl : std_ppcmds -> unit |
| 1181 | val pperr : std_ppcmds -> unit |
| 1182 | val pperrnl : std_ppcmds -> unit |
| 1183 | val pperr_flush : unit -> unit |
| 1184 | val pp_flush : unit -> unit |
| 1185 | val flush_all : unit -> unit |
| 1186 | val msg : std_ppcmds -> unit |
| 1187 | val msgnl : std_ppcmds -> unit |
| 1188 | val msgerr : std_ppcmds -> unit |
| 1189 | val msgerrnl : std_ppcmds -> unit |
| 1190 | val message : string -> unit |
| 1191 | ```` |
| 1192 | |
| 1193 | which are no more available. Users of `Pp.pp msg` should now use the |
| 1194 | proper `Feedback.msg_*` function. Clients also have no control over |
| 1195 | flushing, the back end takes care of it. |
| 1196 | |
| 1197 | Also, the `msg_*` functions now take an optional `?loc` parameter |
| 1198 | for relaying location to the client. |
| 1199 | |
| 1200 | * Feedback related functions and definitions have been moved to the |
| 1201 | `Feedback` module. `message_level` has been renamed to |
| 1202 | level. Functions moved from `Pp` to `Feedback` are: |
| 1203 | |
| 1204 | ```` ocaml |
| 1205 | val set_logger : logger -> unit |
| 1206 | val std_logger : logger |
| 1207 | val emacs_logger : logger |
| 1208 | val feedback_logger : logger |
| 1209 | ```` |
| 1210 | |
| 1211 | * Changes in the Feedback format/Protocol. |
| 1212 | |
| 1213 | - The `Message` feedback type now carries an optional location, the main |
| 1214 | payload is encoded using the richpp document format. |
| 1215 | |
| 1216 | - The `ErrorMsg` feedback type is thus unified now with `Message` at |
| 1217 | level `Error`. |
| 1218 | |
| 1219 | * We now provide several loggers, `log_via_feedback` is removed in |
| 1220 | favor of `set_logger feedback_logger`. Output functions are: |
| 1221 | |
| 1222 | ```` ocaml |
| 1223 | val with_output_to_file : string -> ('a -> 'b) -> 'a -> 'b |
| 1224 | val msg_error : ?loc:Loc.t -> Pp.std_ppcmds -> unit |
| 1225 | val msg_warning : ?loc:Loc.t -> Pp.std_ppcmds -> unit |
| 1226 | val msg_notice : ?loc:Loc.t -> Pp.std_ppcmds -> unit |
| 1227 | val msg_info : ?loc:Loc.t -> Pp.std_ppcmds -> unit |
| 1228 | val msg_debug : ?loc:Loc.t -> Pp.std_ppcmds -> unit |
| 1229 | ```` |
| 1230 | |
| 1231 | with the `msg_*` functions being just an alias for `logger $Level`. |
| 1232 | |
| 1233 | * The main feedback functions are: |
| 1234 | |
| 1235 | ```` ocaml |
| 1236 | val set_feeder : (feedback -> unit) -> unit |
| 1237 | val feedback : ?id:edit_or_state_id -> ?route:route_id -> feedback_content -> unit |
| 1238 | val set_id_for_feedback : ?route:route_id -> edit_or_state_id -> unit |
| 1239 | ```` |
| 1240 | Note that `feedback` doesn't take two parameters anymore. After |
| 1241 | refactoring the following function has been removed: |
| 1242 | |
| 1243 | ```` ocaml |
| 1244 | val get_id_for_feedback : unit -> edit_or_state_id * route_id |
| 1245 | ```` |
| 1246 | |
| 1247 | ### Kernel API changes |
| 1248 | |
| 1249 | - The interface of the `Context` module was changed. |
| 1250 | Related types and functions were put in separate submodules. |
| 1251 | The mapping from old identifiers to new identifiers is the following: |
| 1252 | |
| 1253 | ``` |
| 1254 | Context.named_declaration ---> Context.Named.Declaration.t |
| 1255 | Context.named_list_declaration ---> Context.NamedList.Declaration.t |
| 1256 | Context.rel_declaration ---> Context.Rel.Declaration.t |
| 1257 | Context.map_named_declaration ---> Context.Named.Declaration.map_constr |
| 1258 | Context.map_named_list_declaration ---> Context.NamedList.Declaration.map |
| 1259 | Context.map_rel_declaration ---> Context.Rel.Declaration.map_constr |
| 1260 | Context.fold_named_declaration ---> Context.Named.Declaration.fold |
| 1261 | Context.fold_rel_declaration ---> Context.Rel.Declaration.fold |
| 1262 | Context.exists_named_declaration ---> Context.Named.Declaration.exists |
| 1263 | Context.exists_rel_declaration ---> Context.Rel.Declaration.exists |
| 1264 | Context.for_all_named_declaration ---> Context.Named.Declaration.for_all |
| 1265 | Context.for_all_rel_declaration ---> Context.Rel.Declaration.for_all |
| 1266 | Context.eq_named_declaration ---> Context.Named.Declaration.equal |
| 1267 | Context.eq_rel_declaration ---> Context.Rel.Declaration.equal |
| 1268 | Context.named_context ---> Context.Named.t |
| 1269 | Context.named_list_context ---> Context.NamedList.t |
| 1270 | Context.rel_context ---> Context.Rel.t |
| 1271 | Context.empty_named_context ---> Context.Named.empty |
| 1272 | Context.add_named_decl ---> Context.Named.add |
| 1273 | Context.vars_of_named_context ---> Context.Named.to_vars |
| 1274 | Context.lookup_named ---> Context.Named.lookup |
| 1275 | Context.named_context_length ---> Context.Named.length |
| 1276 | Context.named_context_equal ---> Context.Named.equal |
| 1277 | Context.fold_named_context ---> Context.Named.fold_outside |
| 1278 | Context.fold_named_list_context ---> Context.NamedList.fold |
| 1279 | Context.fold_named_context_reverse ---> Context.Named.fold_inside |
| 1280 | Context.instance_from_named_context ---> Context.Named.to_instance |
| 1281 | Context.extended_rel_list ---> Context.Rel.to_extended_list |
| 1282 | Context.extended_rel_vect ---> Context.Rel.to_extended_vect |
| 1283 | Context.fold_rel_context ---> Context.Rel.fold_outside |
| 1284 | Context.fold_rel_context_reverse ---> Context.Rel.fold_inside |
| 1285 | Context.map_rel_context ---> Context.Rel.map_constr |
| 1286 | Context.map_named_context ---> Context.Named.map_constr |
| 1287 | Context.iter_rel_context ---> Context.Rel.iter |
| 1288 | Context.iter_named_context ---> Context.Named.iter |
| 1289 | Context.empty_rel_context ---> Context.Rel.empty |
| 1290 | Context.add_rel_decl ---> Context.Rel.add |
| 1291 | Context.lookup_rel ---> Context.Rel.lookup |
| 1292 | Context.rel_context_length ---> Context.Rel.length |
| 1293 | Context.rel_context_nhyps ---> Context.Rel.nhyps |
| 1294 | Context.rel_context_tags ---> Context.Rel.to_tags |
| 1295 | ``` |
| 1296 | |
| 1297 | - Originally, rel-context was represented as: |
| 1298 | |
| 1299 | ```ocaml |
| 1300 | type Context.rel_context = Names.Name.t * Constr.t option * Constr.t |
| 1301 | ``` |
| 1302 | |
| 1303 | Now it is represented as: |
| 1304 | |
| 1305 | ```ocaml |
| 1306 | type Context.Rel.Declaration.t = LocalAssum of Names.Name.t * Constr.t |
| 1307 | | LocalDef of Names.Name.t * Constr.t * Constr.t |
| 1308 | ``` |
| 1309 | |
| 1310 | - Originally, named-context was represented as: |
| 1311 | |
| 1312 | ```ocaml |
| 1313 | type Context.named_context = Names.Id.t * Constr.t option * Constr.t |
| 1314 | ``` |
| 1315 | |
| 1316 | Now it is represented as: |
| 1317 | |
| 1318 | ```ocaml |
| 1319 | type Context.Named.Declaration.t = LocalAssum of Names.Id.t * Constr.t |
| 1320 | | LocalDef of Names.Id.t * Constr.t * Constr.t |
| 1321 | ``` |
| 1322 | |
| 1323 | - The various `EXTEND` macros do not handle specially the Coq-defined entries |
| 1324 | anymore. Instead, they just output a name that have to exist in the scope |
| 1325 | of the ML code. The parsing rules (`VERNAC`) `ARGUMENT EXTEND` will look for |
| 1326 | variables `$name` of type `Gram.entry`, while the parsing rules of |
| 1327 | (`VERNAC COMMAND` | `TACTIC`) `EXTEND`, as well as the various `TYPED AS` clauses will |
| 1328 | look for variables `wit_$name` of type `Genarg.genarg_type`. The small DSL |
| 1329 | for constructing compound entries still works over this scheme. Note that in |
| 1330 | the case of (`VERNAC`) `ARGUMENT EXTEND`, the name of the argument entry is bound |
| 1331 | in the parsing rules, so beware of recursive calls. |
| 1332 | |
| 1333 | For example, to get `wit_constr` you must `open Constrarg` at the top of the file. |
| 1334 | |
| 1335 | - `Evarutil` was split in two parts. The new `Evardefine` file exposes functions |
| 1336 | `define_evar_`* mostly used internally in the unification engine. |
| 1337 | |
| 1338 | - The `Refine` module was moved out of `Proofview`. |
| 1339 | |
| 1340 | ``` |
| 1341 | Proofview.Refine.* ---> Refine.* |
| 1342 | ``` |
| 1343 | |
| 1344 | - A statically monotonic evarmap type was introduced in `Sigma`. Not all the API |
| 1345 | has been converted, so that the user may want to use compatibility functions |
| 1346 | `Sigma.to_evar_map` and `Sigma.Unsafe.of_evar_map` or `Sigma.Unsafe.of_pair` when |
| 1347 | needed. Code can be straightforwardly adapted in the following way: |
| 1348 | |
| 1349 | ```ocaml |
| 1350 | let (sigma, x1) = ... in |
| 1351 | ... |
| 1352 | let (sigma, xn) = ... in |
| 1353 | (sigma, ans) |
| 1354 | ``` |
| 1355 | |
| 1356 | should be turned into: |
| 1357 | |
| 1358 | ```ocaml |
| 1359 | open Sigma.Notations |
| 1360 | |
| 1361 | let Sigma (x1, sigma, p1) = ... in |
| 1362 | ... |
| 1363 | let Sigma (xn, sigma, pn) = ... in |
| 1364 | Sigma (ans, sigma, p1 +> ... +> pn) |
| 1365 | ``` |
| 1366 | |
| 1367 | Examples of `Sigma.Unsafe.of_evar_map` include: |
| 1368 | |
| 1369 | ``` |
| 1370 | Evarutil.new_evar env (Tacmach.project goal) ty ----> Evarutil.new_evar env (Sigma.Unsafe.of_evar_map (Tacmach.project goal)) ty |
| 1371 | ``` |
| 1372 | |
| 1373 | - The `Proofview.Goal.`*`enter` family of functions now takes a polymorphic |
| 1374 | continuation given as a record as an argument. |
| 1375 | |
| 1376 | ```ocaml |
| 1377 | Proofview.Goal.enter begin fun gl -> ... end |
| 1378 | ``` |
| 1379 | |
| 1380 | should be turned into |
| 1381 | |
| 1382 | ```ocaml |
| 1383 | open Proofview.Notations |
| 1384 | |
| 1385 | Proofview.Goal.enter { enter = begin fun gl -> ... end } |
| 1386 | ``` |
| 1387 | |
| 1388 | - `Tacexpr.TacDynamic(Loc.dummy_loc, Pretyping.constr_in c)` ---> `Tacinterp.Value.of_constr c` |
| 1389 | - `Vernacexpr.HintsResolveEntry(priority, poly, hnf, path, atom)` ---> `Vernacexpr.HintsResolveEntry(Vernacexpr.({hint_priority = priority; hint_pattern = None}), poly, hnf, path, atom)` |
| 1390 | - `Pretyping.Termops.mem_named_context` ---> `Engine.Termops.mem_named_context_val` |
| 1391 | - `Global.named_context` ---> `Global.named_context_val` |
| 1392 | - `Context.Named.lookup` ---> `Environ.lookup_named_val` |
| 1393 | |
| 1394 | ### Search API |
| 1395 | |
| 1396 | The main search functions now take a function iterating over the |
| 1397 | results. This allows for clients to use streaming or more economic |
| 1398 | printing. |
| 1399 | |
| 1400 | ### XML Protocol |
| 1401 | |
| 1402 | - In several places, flat text wrapped in `<string>` tags now appears as structured text inside `<richpp>` tags. |
| 1403 | |
| 1404 | - The "errormsg" feedback has been replaced by a "message" feedback which contains `<feedback\_content>` tag, with a message_level attribute of "error". |
| 1405 | |
| 1406 | ## Changes between Coq 8.4 and Coq 8.5 |
| 1407 | |
| 1408 | ### Refactoring : more mli interfaces and simpler grammar.cma |
| 1409 | |
| 1410 | - A new directory intf/ now contains mli-only interfaces : |
| 1411 | |
| 1412 | * `Constrexpr` : definition of `constr_expr`, was in `Topconstr` |
| 1413 | * `Decl_kinds` : now contains `binding_kind = Explicit | Implicit` |
| 1414 | * `Evar_kinds` : type `Evar_kinds.t` was previously `Evd.hole_kind` |
| 1415 | * `Extend` : was `parsing/extend.mli` |
| 1416 | * `Genredexpr` : regroup `Glob_term.red_expr_gen` and `Tacexpr.glob_red_flag` |
| 1417 | * `Glob_term` : definition of `glob_constr` |
| 1418 | * `Locus` : definition of occurrences and stuff about clauses |
| 1419 | * `Misctypes` : `intro_pattern_expr`, `glob_sort`, `cast_type`, `or_var`, ... |
| 1420 | * `Notation_term` : contains `notation_constr`, was `Topconstr.aconstr` |
| 1421 | * `Pattern` : contains `constr_pattern` |
| 1422 | * `Tacexpr` : was `tactics/tacexpr.ml` |
| 1423 | * `Vernacexpr` : was `toplevel/vernacexpr.ml` |
| 1424 | |
| 1425 | - Many files have been divided : |
| 1426 | |
| 1427 | * vernacexpr: vernacexpr.mli + Locality |
| 1428 | * decl_kinds: decl_kinds.mli + Kindops |
| 1429 | * evd: evar_kinds.mli + evd |
| 1430 | * tacexpr: tacexpr.mli + tacops |
| 1431 | * glob_term: glob_term.mli + glob_ops + genredexpr.mli + redops |
| 1432 | * topconstr: constrexpr.mli + constrexpr_ops |
| 1433 | + notation_expr.mli + notation_ops + topconstr |
| 1434 | * pattern: pattern.mli + patternops |
| 1435 | * libnames: libnames (qualid, reference) + globnames (global_reference) |
| 1436 | * egrammar: egramml + egramcoq |
| 1437 | |
| 1438 | - New utility files : miscops (cf. misctypes.mli) and |
| 1439 | redops (cf genredexpr.mli). |
| 1440 | |
| 1441 | - Some other directory changes : |
| 1442 | * grammar.cma and the source files specific to it are now in grammar/ |
| 1443 | * pretty-printing files are now in printing/ |
| 1444 | |
| 1445 | - Inner-file changes : |
| 1446 | |
| 1447 | * aconstr is now notation_constr, all constructors for this type |
| 1448 | now start with a N instead of a A (e.g. NApp instead of AApp), |
| 1449 | and functions about aconstr may have been renamed (e.g. match_aconstr |
| 1450 | is now match_notation_constr). |
| 1451 | |
| 1452 | * occurrences (now in Locus.mli) is now an algebraic type, with |
| 1453 | - AllOccurrences instead of all_occurrences_expr = (false,[]) |
| 1454 | - (AllOccurrencesBut l) instead of (all_occurrences_expr_but l) = (false,l) |
| 1455 | - NoOccurrences instead of no_occurrences_expr = (true,[]) |
| 1456 | - (OnlyOccurrences l) instead of (no_occurrences_expr_but l) = (true,l) |
| 1457 | |
| 1458 | * move_location (now in Misctypes) has two new constructors |
| 1459 | MoveFirst and MoveLast replacing (MoveToEnd false) and (MoveToEnd true) |
| 1460 | |
| 1461 | - API of pretyping.ml and constrintern.ml has been made more uniform |
| 1462 | * Parametrization of understand_* functions is now made using |
| 1463 | "inference flags" |
| 1464 | * Functions removed: |
| 1465 | - interp_constr_judgment (inline its former body if really needed) |
| 1466 | - interp_casted_constr, interp_type: use instead interp_constr with |
| 1467 | expected_type set to OfType or to IsType |
| 1468 | - interp_gen: use any of interp_constr, interp_casted_constr, interp_type |
| 1469 | - interp_open_constr_patvar |
| 1470 | - interp_context: use interp_context_evars (with a "evar_map ref") and |
| 1471 | call solve_remaining_evars afterwards with a failing flag |
| 1472 | (e.g. all_and_fail_flags) |
| 1473 | - understand_type, understand_gen: use understand with appropriate |
| 1474 | parameters |
| 1475 | * Change of semantics: |
| 1476 | - Functions interp_*_evars_impls have a different interface and do |
| 1477 | not any longer check resolution of evars by default; use |
| 1478 | check_evars_are_solved explicitly to check that evars are solved. |
| 1479 | See also the corresponding commit log. |
| 1480 | |
| 1481 | - Tactics API: new_induct -> induction; new_destruct -> destruct; |
| 1482 | letin_pat_tac do not accept a type anymore |
| 1483 | |
| 1484 | - New file find_subterm.ml for gathering former functions |
| 1485 | `subst_closed_term_occ_modulo`, `subst_closed_term_occ_decl` (which now |
| 1486 | take and outputs also an `evar_map`), and |
| 1487 | `subst_closed_term_occ_modulo`, `subst_closed_term_occ_decl_modulo` (now |
| 1488 | renamed into `replace_term_occ_modulo` and |
| 1489 | `replace_term_occ_decl_modulo`). |
| 1490 | |
| 1491 | - API of Inductiveops made more uniform (see commit log or file itself). |
| 1492 | |
| 1493 | - API of intros_pattern style tactic changed; "s" is dropped in |
| 1494 | "intros_pattern" and "intros_patterns" is not anymore behaving like |
| 1495 | tactic "intros" on the empty list. |
| 1496 | |
| 1497 | - API of cut tactics changed: for instance, cut_intro should be replaced by |
| 1498 | "assert_after Anonymous" |
| 1499 | |
| 1500 | - All functions taking an env and a sigma (or an evdref) now takes the |
| 1501 | env first. |
| 1502 | |
| 1503 | ## Changes between Coq 8.3 and Coq 8.4 |
| 1504 | |
| 1505 | - Functions in unification.ml have now the evar_map coming just after the env |
| 1506 | |
| 1507 | - Removal of Tacinterp.constr_of_id |
| 1508 | |
| 1509 | Use instead either global_reference or construct_reference in constrintern.ml. |
| 1510 | |
| 1511 | - Optimizing calls to Evd functions |
| 1512 | |
| 1513 | Evars are split into defined evars and undefined evars; for |
| 1514 | efficiency, when an evar is known to be undefined, it is preferable to |
| 1515 | use specific functions about undefined evars since these ones are |
| 1516 | generally fewer than the defined ones. |
| 1517 | |
| 1518 | - Type changes in TACTIC EXTEND rules |
| 1519 | |
| 1520 | Arguments bound with tactic(_) in TACTIC EXTEND rules are now of type |
| 1521 | glob_tactic_expr, instead of glob_tactic_expr * tactic. Only the first |
| 1522 | component is kept, the second one can be obtained via |
| 1523 | Tacinterp.eval_tactic. |
| 1524 | |
| 1525 | - ARGUMENT EXTEND |
| 1526 | |
| 1527 | It is now forbidden to use TYPED simultaneously with {RAW,GLOB}_TYPED |
| 1528 | in ARGUMENT EXTEND statements. |
| 1529 | |
| 1530 | - Renaming of rawconstr to glob_constr |
| 1531 | |
| 1532 | The "rawconstr" type has been renamed to "glob_constr" for |
| 1533 | consistency. The "raw" in everything related to former rawconstr has |
| 1534 | been changed to "glob". For more details about the rationale and |
| 1535 | scripts to migrate code using Coq's internals, see commits 13743, |
| 1536 | 13744, 13755, 13756, 13757, 13758, 13761 (by glondu, end of December |
| 1537 | 2010) in Subversion repository. Contribs have been fixed too, and |
| 1538 | commit messages there might also be helpful for migrating. |
| 1539 | |
| 1540 | ## Changes between Coq 8.2 and Coq 8.3 |
| 1541 | |
| 1542 | ### Light cleaning in evaruil.ml |
| 1543 | |
| 1544 | whd_castappevar is now whd_head_evar |
| 1545 | obsolete whd_ise disappears |
| 1546 | |
| 1547 | ### Restructuration of the syntax of binders |
| 1548 | |
| 1549 | ``` |
| 1550 | binders_let -> binders |
| 1551 | binders_let_fixannot -> binders_fixannot |
| 1552 | binder_let -> closed_binder (and now covers only bracketed binders) |
| 1553 | binder was already obsolete and has been removed |
| 1554 | ``` |
| 1555 | |
| 1556 | ### Semantical change of h_induction_destruct |
| 1557 | |
| 1558 | Warning, the order of the isrec and evar_flag was inconsistent and has |
| 1559 | been permuted. Tactic induction_destruct in tactics.ml is unchanged. |
| 1560 | |
| 1561 | ### Internal tactics renamed |
| 1562 | |
| 1563 | There is no more difference between bindings and ebindings. The |
| 1564 | following tactics are therefore renamed |
| 1565 | |
| 1566 | ``` |
| 1567 | apply_with_ebindings_gen -> apply_with_bindings_gen |
| 1568 | left_with_ebindings -> left_with_bindings |
| 1569 | right_with_ebindings -> right_with_bindings |
| 1570 | split_with_ebindings -> split_with_bindings |
| 1571 | ``` |
| 1572 | |
| 1573 | and the following tactics are removed |
| 1574 | |
| 1575 | - apply_with_ebindings (use instead apply_with_bindings) |
| 1576 | - eapply_with_ebindings (use instead eapply_with_bindings) |
| 1577 | |
| 1578 | ### Obsolete functions in typing.ml |
| 1579 | |
| 1580 | For mtype_of, msort_of, mcheck, now use type_of, sort_of, check |
| 1581 | |
| 1582 | ### Renaming functions renamed |
| 1583 | |
| 1584 | ``` |
| 1585 | concrete_name -> compute_displayed_name_in |
| 1586 | concrete_let_name -> compute_displayed_let_name_in |
| 1587 | rename_rename_bound_var -> rename_bound_vars_as_displayed |
| 1588 | lookup_name_as_renamed -> lookup_name_as_displayed |
| 1589 | next_global_ident_away true -> next_ident_away_in_goal |
| 1590 | next_global_ident_away false -> next_global_ident_away |
| 1591 | ``` |
| 1592 | |
| 1593 | ### Cleaning in command.ml |
| 1594 | |
| 1595 | Functions about starting/ending a lemma are in lemmas.ml |
| 1596 | Functions about inductive schemes are in indschemes.ml |
| 1597 | |
| 1598 | Functions renamed: |
| 1599 | |
| 1600 | ``` |
| 1601 | declare_one_assumption -> declare_assumption |
| 1602 | declare_assumption -> declare_assumptions |
| 1603 | Command.syntax_definition -> Metasyntax.add_syntactic_definition |
| 1604 | declare_interning_data merged with add_notation_interpretation |
| 1605 | compute_interning_datas -> compute_full_internalization_env |
| 1606 | implicits_env -> internalization_env |
| 1607 | full_implicits_env -> full_internalization_env |
| 1608 | build_mutual -> do_mutual_inductive |
| 1609 | build_recursive -> do_fixpoint |
| 1610 | build_corecursive -> do_cofixpoint |
| 1611 | build_induction_scheme -> build_mutual_induction_scheme |
| 1612 | build_indrec -> build_induction_scheme |
| 1613 | instantiate_type_indrec_scheme -> weaken_sort_scheme |
| 1614 | instantiate_indrec_scheme -> modify_sort_scheme |
| 1615 | make_case_dep, make_case_nodep -> build_case_analysis_scheme |
| 1616 | make_case_gen -> build_case_analysis_scheme_default |
| 1617 | ``` |
| 1618 | |
| 1619 | Types: |
| 1620 | |
| 1621 | decl_notation -> decl_notation option |
| 1622 | |
| 1623 | ### Cleaning in libnames/nametab interfaces |
| 1624 | |
| 1625 | Functions: |
| 1626 | |
| 1627 | ``` |
| 1628 | dirpath_prefix -> pop_dirpath |
| 1629 | extract_dirpath_prefix pop_dirpath_n |
| 1630 | extend_dirpath -> add_dirpath_suffix |
| 1631 | qualid_of_sp -> qualid_of_path |
| 1632 | pr_sp -> pr_path |
| 1633 | make_short_qualid -> qualid_of_ident |
| 1634 | sp_of_syntactic_definition -> path_of_syntactic_definition |
| 1635 | sp_of_global -> path_of_global |
| 1636 | id_of_global -> basename_of_global |
| 1637 | absolute_reference -> global_of_path |
| 1638 | locate_syntactic_definition -> locate_syndef |
| 1639 | path_of_syntactic_definition -> path_of_syndef |
| 1640 | push_syntactic_definition -> push_syndef |
| 1641 | ``` |
| 1642 | |
| 1643 | Types: |
| 1644 | |
| 1645 | section_path -> full_path |
| 1646 | |
| 1647 | ### Cleaning in parsing extensions (commit 12108) |
| 1648 | |
| 1649 | Many moves and renamings, one new file (Extrawit, that contains wit_tactic). |
| 1650 | |
| 1651 | ### Cleaning in tactical.mli |
| 1652 | |
| 1653 | ``` |
| 1654 | tclLAST_HYP -> onLastHyp |
| 1655 | tclLAST_DECL -> onLastDecl |
| 1656 | tclLAST_NHYPS -> onNLastHypsId |
| 1657 | tclNTH_DECL -> onNthDecl |
| 1658 | tclNTH_HYP -> onNthHyp |
| 1659 | onLastHyp -> onLastHypId |
| 1660 | onNLastHyps -> onNLastDecls |
| 1661 | onClauses -> onClause |
| 1662 | allClauses -> allHypsAndConcl |
| 1663 | ``` |
| 1664 | |
| 1665 | and removal of various unused combinators on type "clause" |
| 1666 | |
| 1667 | ## Changes between Coq 8.1 and Coq 8.2 |
| 1668 | |
| 1669 | ### Datatypes |
| 1670 | |
| 1671 | List of occurrences moved from "int list" to "Termops.occurrences" (an |
| 1672 | alias to "bool * int list") |
| 1673 | ETIdent renamed to ETName |
| 1674 | |
| 1675 | ### Functions |
| 1676 | |
| 1677 | ``` |
| 1678 | Eauto: e_resolve_constr, vernac_e_resolve_constr -> simplest_eapply |
| 1679 | Tactics: apply_with_bindings -> apply_with_bindings_wo_evars |
| 1680 | Eauto.simplest_apply -> Hiddentac.h_simplest_apply |
| 1681 | Evarutil.define_evar_as_arrow -> define_evar_as_product |
| 1682 | Old version of Tactics.assert_tac disappears |
| 1683 | Tactics.true_cut renamed into Tactics.assert_tac |
| 1684 | Constrintern.interp_constrpattern -> intern_constr_pattern |
| 1685 | Hipattern.match_with_conjunction is a bit more restrictive |
| 1686 | Hipattern.match_with_disjunction is a bit more restrictive |
| 1687 | ``` |
| 1688 | |
| 1689 | ### Universe names (univ.mli) |
| 1690 | |
| 1691 | ```ocaml |
| 1692 | base_univ -> type0_univ (* alias of Set is the Type hierarchy *) |
| 1693 | prop_univ -> type1_univ (* the type of Set in the Type hierarchy *) |
| 1694 | neutral_univ -> lower_univ (* semantic alias of Prop in the Type hierarchy *) |
| 1695 | is_base_univ -> is_type1_univ |
| 1696 | is_empty_univ -> is_lower_univ |
| 1697 | ``` |
| 1698 | |
| 1699 | ### Sort names (term.mli) |
| 1700 | |
| 1701 | ``` |
| 1702 | mk_Set -> set_sort |
| 1703 | mk_Prop -> prop_sort |
| 1704 | type_0 -> type1_sort |
| 1705 | ``` |
| 1706 | |
| 1707 | ## Changes between Coq 8.0 and Coq 8.1 |
| 1708 | |
| 1709 | ### Functions |
| 1710 | |
| 1711 | - Util: option_app -> option_map |
| 1712 | - Term: substl_decl -> subst_named_decl |
| 1713 | - Lib: library_part -> remove_section_part |
| 1714 | - Printer: prterm -> pr_lconstr |
| 1715 | - Printer: prterm_env -> pr_lconstr_env |
| 1716 | - Ppconstr: pr_sort -> pr_rawsort |
| 1717 | - Evd: in_dom, etc got standard ocaml names (i.e. mem, etc) |
| 1718 | - Pretyping: |
| 1719 | - understand_gen_tcc and understand_gen_ltac merged into understand_ltac |
| 1720 | - type_constraints can now say typed by a sort (use OfType to get the |
| 1721 | previous behavior) |
| 1722 | - Library: import_library -> import_module |
| 1723 | |
| 1724 | ### Constructors |
| 1725 | |
| 1726 | * Declarations: mind_consnrealargs -> mind_consnrealdecls |
| 1727 | * NoRedun -> NoDup |
| 1728 | * Cast and RCast have an extra argument: you can recover the previous |
| 1729 | behavior by setting the extra argument to "CastConv DEFAULTcast" and |
| 1730 | "DEFAULTcast" respectively |
| 1731 | * Names: "kernel_name" is now "constant" when argument of Term.Const |
| 1732 | * Tacexpr: TacTrueCut and TacForward(false,_,_) merged into new TacAssert |
| 1733 | * Tacexpr: TacForward(true,_,_) branched to TacLetTac |
| 1734 | |
| 1735 | ### Modules |
| 1736 | |
| 1737 | * module Decl_kinds: new interface |
| 1738 | * module Bigint: new interface |
| 1739 | * module Tacred spawned module Redexpr |
| 1740 | * module Symbols -> Notation |
| 1741 | * module Coqast, Ast, Esyntax, Termast, and all other modules related to old |
| 1742 | syntax are removed |
| 1743 | * module Instantiate: integrated to Evd |
| 1744 | * module Pretyping now a functor: use Pretyping.Default instead |
| 1745 | |
| 1746 | ### Internal names |
| 1747 | |
| 1748 | OBJDEF and OBJDEF1 -> CANONICAL-STRUCTURE |
| 1749 | |
| 1750 | ### Tactic extensions |
| 1751 | |
| 1752 | * printers have an extra parameter which is a constr printer at high precedence |
| 1753 | * the tactic printers have an extra arg which is the expected precedence |
| 1754 | * level is now a precedence in declare_extra_tactic_pprule |
| 1755 | * "interp" functions now of types the actual arg type, not its encapsulation |
| 1756 | as a generic_argument |
| 1757 | |
| 1758 | ## Changes between Coq 7.4 and Coq 8.0 |
| 1759 | |
| 1760 | See files in dev/syntax-v8 |
| 1761 | |
| 1762 | |
| 1763 | ## Main changes between Coq 7.4 and Coq 8.0 |
| 1764 | |
| 1765 | ### Changes due to introduction of modules |
| 1766 | |
| 1767 | #### Kernel |
| 1768 | |
| 1769 | The module level has no effect on constr except for the structure of |
| 1770 | section_path. The type of unique names for constructions (what |
| 1771 | section_path served) is now called a kernel name and is defined by |
| 1772 | |
| 1773 | ```ocaml |
| 1774 | type uniq_ident = int * string * dir_path (* int may be enough *) |
| 1775 | type module_path = |
| 1776 | | MPfile of dir_path (* reference to physical module, e.g. file *) |
| 1777 | | MPbound of uniq_ident (* reference to a module parameter in a functor *) |
| 1778 | | MPself of uniq_ident (* reference to one of the containing module *) |
| 1779 | | MPdot of module_path * label |
| 1780 | type label = identifier |
| 1781 | type kernel_name = module_path * dir_path * label |
| 1782 | ^^^^^^^^^^^ ^^^^^^^^ ^^^^^ |
| 1783 | | | \ |
| 1784 | | | the base name |
| 1785 | | \ |
| 1786 | / the (true) section path |
| 1787 | example: (non empty only inside open sections) |
| 1788 | L = (* i.e. some file of logical name L *) |
| 1789 | struct |
| 1790 | module A = struct Def a = ... end |
| 1791 | end |
| 1792 | M = (* i.e. some file of logical name M *) |
| 1793 | struct |
| 1794 | Def t = ... |
| 1795 | N = functor (X : sig module T = struct Def b = ... end end) -> struct |
| 1796 | module O = struct |
| 1797 | Def u = ... |
| 1798 | end |
| 1799 | Def x := ... <M>.t ... <N>.O.u ... X.T.b ... L.A.a |
| 1800 | ``` |
| 1801 | |
| 1802 | <M> and <N> are self-references, X is a bound reference and L is a |
| 1803 | reference to a physical module. |
| 1804 | |
| 1805 | Notice that functor application is not part of a path: it must be |
| 1806 | named by a "module M = F(A)" declaration to be used in a kernel |
| 1807 | name. |
| 1808 | |
| 1809 | Notice that Jacek chose a practical approach, making directories not |
| 1810 | modules. Another approach could have been to replace the constructor |
| 1811 | MPfile by a constant constructor MProot representing the root of the |
| 1812 | world. |
| 1813 | |
| 1814 | Other relevant informations are in kernel/entries.ml (type |
| 1815 | module_expr) and kernel/declarations.ml (type module_body and |
| 1816 | module_type_body). |
| 1817 | |
| 1818 | #### Library |
| 1819 | |
| 1820 | 1. tables |
| 1821 | [Summaries] - the only change is the special treatment of the |
| 1822 | global environment. |
| 1823 | |
| 1824 | 2. objects |
| 1825 | [Libobject] declares persistent objects, given with methods: |
| 1826 | |
| 1827 | * cache_function specifying how to add the object in the current |
| 1828 | scope; |
| 1829 | * load_function, specifying what to do when the module |
| 1830 | containing the object is loaded; |
| 1831 | * open_function, specifying what to do when the module |
| 1832 | containing the object is opened (imported); |
| 1833 | * classify_function, specyfying what to do with the object, |
| 1834 | when the current module (containing the object) is ended. |
| 1835 | * subst_function |
| 1836 | * export_function, to signal end_section survival |
| 1837 | |
| 1838 | (Almost) Each of these methods is called with a parameter of type |
| 1839 | object_name = section_path * kernel_name |
| 1840 | where section_path is the full user name of the object (such as |
| 1841 | Coq.Init.Datatypes.Fst) and kernel_name is its substitutive internal |
| 1842 | version such as (MPself<Datatypes#1>,[],"Fst") (see above) |
| 1843 | |
| 1844 | |
| 1845 | #### What happens at the end of an interactive module ? |
| 1846 | |
| 1847 | (or when a file is stored and reloaded from disk) |
| 1848 | |
| 1849 | All summaries (except Global environment) are reverted to the state |
| 1850 | from before the beginning of the module, and: |
| 1851 | |
| 1852 | 1. the objects (again, since last Declaremods.start_module or |
| 1853 | Library.start_library) are classified using the classify_function. |
| 1854 | To simplify consider only those who returned Substitute _ or Keep _. |
| 1855 | |
| 1856 | 2. If the module is not a functor, the subst_function for each object of |
| 1857 | the first group is called with the substitution |
| 1858 | [MPself "<Datatypes#1>" |-> MPfile "Coq.Init.Datatypes"]. |
| 1859 | Then the load_function is called for substituted objects and the |
| 1860 | "keep" object. |
| 1861 | (If the module is a library the substitution is done at reloading). |
| 1862 | |
| 1863 | 3. The objects which returned substitute are stored in the modtab |
| 1864 | together with the self ident of the module, and functor argument |
| 1865 | names if the module was a functor. |
| 1866 | |
| 1867 | They will be used (substituted and loaded) when a command like |
| 1868 | Module M := F(N) or |
| 1869 | Module Z := N |
| 1870 | is evaluated |
| 1871 | |
| 1872 | |
| 1873 | #### The difference between "substitute" and "keep" objects |
| 1874 | |
| 1875 | 1. The "keep" objects can _only_ reference other objects by section_paths |
| 1876 | and qualids. They do not need the substitution function. |
| 1877 | |
| 1878 | They will work after end_module (or reloading a compiled library), |
| 1879 | because these operations do not change section_path's |
| 1880 | |
| 1881 | They will obviously not work after Module Z:=N. |
| 1882 | |
| 1883 | These would typically be grammar rules, pretty printing rules etc. |
| 1884 | |
| 1885 | |
| 1886 | |
| 1887 | 2. The "substitute" objects can _only_ reference objects by |
| 1888 | kernel_names. They must have a valid subst_function. |
| 1889 | |
| 1890 | They will work after end_module _and_ after Module Z:=N or |
| 1891 | Module Z:=F(M). |
| 1892 | |
| 1893 | |
| 1894 | |
| 1895 | Other kinds of objects: |
| 1896 | |
| 1897 | 3. "Dispose" - objects which do not survive end_module |
| 1898 | As a consequence, objects which reference other objects sometimes |
| 1899 | by kernel_names and sometimes by section_path must be of this kind... |
| 1900 | |
| 1901 | 4. "Anticipate" - objects which must be treated individually by |
| 1902 | end_module (typically "REQUIRE" objects) |
| 1903 | |
| 1904 | |
| 1905 | |
| 1906 | #### Writing subst_thing functions |
| 1907 | |
| 1908 | The subst_thing should not copy the thing if it hasn't actually |
| 1909 | changed. |
| 1910 | to help writing subst functions this way quickly and without errors. |
| 1911 | Also there are *_smartmap functions in Util. |
| 1912 | |
| 1913 | The subst_thing functions are already written for many types, |
| 1914 | including constr (Term.subst_mps), |
| 1915 | global_reference (Libnames.subst_global), |
| 1916 | rawconstr (Rawterm.subst_raw) etc |
| 1917 | |
| 1918 | They are all (apart from constr, for now) written in the non-copying |
| 1919 | way. |
| 1920 | |
| 1921 | |
| 1922 | #### Nametab |
| 1923 | |
| 1924 | Nametab has been made more uniform. For every kind of thing there is |
| 1925 | only one "push" function and one "locate" function. |
| 1926 | |
| 1927 | |
| 1928 | #### Lib |
| 1929 | |
| 1930 | library_segment is now a list of object_name * library_item, where |
| 1931 | object_name = section_path * kernel_name (see above) |
| 1932 | |
| 1933 | New items have been added for open modules and module types |
| 1934 | |
| 1935 | |
| 1936 | #### Declaremods |
| 1937 | |
| 1938 | Functions to declare interactive and noninteractive modules and module |
| 1939 | types. |
| 1940 | |
| 1941 | |
| 1942 | #### Library |
| 1943 | |
| 1944 | Uses Declaremods to actually communicate with Global and to register |
| 1945 | objects. |
| 1946 | |
| 1947 | |
| 1948 | ### Other changes |
| 1949 | |
| 1950 | Internal representation of tactics bindings has changed (see type |
| 1951 | Rawterm.substitution). |
| 1952 | |
| 1953 | New parsing model for tactics and vernacular commands |
| 1954 | |
| 1955 | - Introduction of a dedicated type for tactic expressions |
| 1956 | (Tacexpr.raw_tactic_expr) |
| 1957 | - Introduction of a dedicated type for vernac expressions |
| 1958 | (Vernacexpr.vernac_expr) |
| 1959 | - Declaration of new vernacular parsing rules by a new camlp4 macro |
| 1960 | GRAMMAR COMMAND EXTEND ... END to be used in ML files |
| 1961 | - Declaration of new tactics parsing/printing rules by a new camlp4 macro |
| 1962 | TACTIC EXTEND ... END to be used in ML files |
| 1963 | |
| 1964 | New organisation of THENS: |
| 1965 | |
| 1966 | - tclTHENS tac tacs : tacs is now an array |
| 1967 | - tclTHENSFIRSTn tac1 tacs tac2 : |
| 1968 | apply tac1 then, apply the array tacs on the first n subgoals and |
| 1969 | tac2 on the remaining subgoals (previously tclTHENST) |
| 1970 | - tclTHENSLASTn tac1 tac2 tacs : |
| 1971 | apply tac1 then, apply tac2 on the first subgoals and apply the array |
| 1972 | tacs on the last n subgoals |
| 1973 | - tclTHENFIRSTn tac1 tacs = tclTHENSFIRSTn tac1 tacs tclIDTAC (prev. tclTHENSI) |
| 1974 | - tclTHENLASTn tac1 tacs = tclTHENSLASTn tac1 tclIDTAC tacs |
| 1975 | - tclTHENFIRST tac1 tac2 = tclTHENFIRSTn tac1 [|tac2|] |
| 1976 | - tclTHENLAST tac1 tac2 = tclTHENLASTn tac1 [|tac2|] (previously tclTHENL) |
| 1977 | - tclTHENS tac1 tacs = tclTHENSFIRSTn tac1 tacs (fun _ -> error "wrong number") |
| 1978 | - tclTHENSV same as tclTHENS but with an array |
| 1979 | - tclTHENSi : no longer available |
| 1980 | |
| 1981 | Proof_type: subproof field in type proof_tree glued with the ref field |
| 1982 | |
| 1983 | Tacmach: no more echo from functions of module Refiner |
| 1984 | |
| 1985 | Files plugins/*/g_*.ml4 take the place of files plugins/*/*.v. |
| 1986 | |
| 1987 | Files parsing/{vernac,tac}extend.ml{4,i} implements TACTIC EXTEND andd |
| 1988 | VERNAC COMMAND EXTEND macros |
| 1989 | |
| 1990 | File syntax/PPTactic.v moved to parsing/pptactic.ml |
| 1991 | |
| 1992 | Tactics about False and not now in tactics/contradiction.ml |
| 1993 | |
| 1994 | Tactics depending on Init now tactics/*.ml4 (no longer in tactics/*.v) |
| 1995 | |
| 1996 | File tacinterp.ml moved from proofs to directory tactics |
| 1997 | |
| 1998 | |
| 1999 | ## Changes between Coq 7.1 and Coq 7.2 |
| 2000 | |
| 2001 | The core of Coq (kernel) has meen minimized with the following effects: |
| 2002 | |
| 2003 | - kernel/term.ml split into kernel/term.ml, pretyping/termops.ml |
| 2004 | - kernel/reduction.ml split into kernel/reduction.ml, pretyping/reductionops.ml |
| 2005 | - kernel/names.ml split into kernel/names.ml, library/nameops.ml |
| 2006 | - kernel/inductive.ml split into kernel/inductive.ml, pretyping/inductiveops.ml |
| 2007 | |
| 2008 | the prefixes "Is" ans "IsMut" have been dropped from kind_of_term constructors, |
| 2009 | e.g. IsRel is now Rel, IsMutCase is now Case, etc. |