| 1 | |
| 2 | # [3.5.0] 21/07/2026 |
| 3 | |
| 4 | Requires Elpi 3.7.1 and Rocq 9.0, 9.1, 9.2 and 9.3. |
| 5 | |
| 6 | ### HOAS: |
| 7 | - New `minductive` and `mblock` for mutual inductive types |
| 8 | - New the `name` data type carries a relevance (as in Rocq). Quotations |
| 9 | default to "relevant" as before, while omitted biner names are mapped to |
| 10 | Rocq relevance variables, that can be set by the typechecker. |
| 11 | Similarly `coq.id->name` leaves the relevance unset, and `coq.name-suffix` |
| 12 | preserves the orignal relevance. |
| 13 | |
| 14 | ### API: |
| 15 | - fix `coq.CS.canonical-projection?`, used to disregard `#[canonical=no]` |
| 16 | - fix `ltac_tactic:(t)`, use to ignore ltac variables in `t` |
| 17 | - New `coq.elpi.add-predicate?` to check if a predicate is declared in elpi |
| 18 | - New `coq.env.indt-block` to list the inductive types in the same |
| 19 | mutual block |
| 20 | - New `coq.name.relevant?` to test the relevance set by the typechecker |
| 21 | |
| 22 | ### LIB: |
| 23 | - Change `coq.build-indt-decl`, now taking a `coq.indt-spec` tuple |
| 24 | - New `coq.build-mindt-decl` taking a list of `coq.indt-spec` |
| 25 | |
| 26 | ### APPS: |
| 27 | - Fix many bugs in `derive` related to universe polymorphism |
| 28 | - Fix binary parametricity translation for primitive records |
| 29 | - Fix param1 and map on mutual inductives |
| 30 | |
| 31 | ### Vernac: |
| 32 | - Fix double accumulation bug when mixing Files and Dbs |
| 33 | |
| 34 | # [3.4.0] 19/05/2026 |
| 35 | |
| 36 | Requires Elpi 3.7.1 and Rocq 9.0, 9.1 or 9.2. |
| 37 | |
| 38 | ### Elpi |
| 39 | - Change `accumulate` in Elpi code is now fully supported. There is |
| 40 | no difference between `Elpi Accumulate file.` and |
| 41 | `Elpi Accumulate lp:{{ accumulate "file". }}.` since Elpi 3.7 |
| 42 | exposes accumulated files via the API. Applications with complex |
| 43 | file hierarchies can `Accumulate` root files and have each file |
| 44 | accumulate its dependencies, so that dependencies are written inside .elpi files, rather than inside the .v files that use them. |
| 45 | Example [commit](https://github.com/rocq-community/trocq/commit/df9af6e16ccd5e819b6f625321b2f909a39f20ac) |
| 46 | [commit](https://github.com/math-comp/hierarchy-builder/pull/590/changes/0156bcc1f524e1c8df7e3045f65d5de5846f6ea7) |
| 47 | |
| 48 | ### HOAS |
| 49 | - New `mfix` (with `mfix-ty` and `mfix-bo`) for mutual fixpoints |
| 50 | |
| 51 | ### Vernac |
| 52 | - New support for functors and module types: gref are substituted inside rules |
| 53 | |
| 54 | ### Plugins |
| 55 | - New `xml` plugin containing minimal bindings to `xml-light`, see |
| 56 | [apps/xml](apps/xml/) for the doc. |
| 57 | |
| 58 | ### API |
| 59 | - Change `main-interp-proof` and `main-interp-qed` changed type to better chain |
| 60 | with `coq.ltac.collect-goals`. It is now easy to take a term, extract from it |
| 61 | missing subterms and start a proof with goals for these holes, and finally |
| 62 | recover the full term at proof end time. Finally, one cannot close a proof |
| 63 | started in Elpi with a regular `Qed` anymore. |
| 64 | - New argument `const-decl` can now be introduces by the `Lemma` keyword, |
| 65 | and not just by `Definition`. |
| 66 | - New `coq.scheme` to query registered schemes |
| 67 | |
| 68 | |
| 69 | # [3.3.1] 12/03/2026 |
| 70 | |
| 71 | Requires Elpi 3.6.1 and Rocq 9.0, 9.1 or 9.2. |
| 72 | |
| 73 | ### Plugins |
| 74 | - New `json` plugin containing minimal bindings to `yojson`, see |
| 75 | [apps/json](apps/json/) for the doc. |
| 76 | |
| 77 | # [3.3.0] 06/03/2026 |
| 78 | |
| 79 | Requires Elpi 3.6.1 and Rocq 9.0, 9.1 or 9.2. |
| 80 | |
| 81 | ### HOAS: |
| 82 | - Fix explicitly declared goals are considered reachable, even if they |
| 83 | do not occur in the proof term |
| 84 | - Fix avoid evar-map shelved goals to leak into the tactic shelve. Sometimes |
| 85 | a goal was both focused and shelved because of that |
| 86 | |
| 87 | ### API: |
| 88 | - Fix `coq.sort.*` to not rely on puring algebraic universes that will become |
| 89 | first class in Rocq 10 |
| 90 | - Rename `coq.env.section`, use `coq.env.section-variables` |
| 91 | - New `coq.env.section-contents` listing the contents of sections. |
| 92 | - New `coq.ltac.call-mltac` to call code defined via `TACTIC EXTEND` directives |
| 93 | in OCaml. |
| 94 | - New `coq.ltac.call-simple-mltac` for tactics not changing the proof context |
| 95 | - New `coq.ltac.call-simple-ltac1` for tactics not changing the proof context |
| 96 | - Rename `coq.ltac.collect-goals` -> `coq.ltac.collect-sealed-goals` |
| 97 | - New `coq.ltac.collect-simple-goals` for goals in the current proof context |
| 98 | - Change `coq.ltac.call-ltac1` also gives a diagnostic |
| 99 | - Change `coq.ltac.call` also gives a diagnostic |
| 100 | |
| 101 | ### Vernacular: |
| 102 | - New `Elpi Accumulate Plugin` to load built-in defined in a plugin, see the |
| 103 | corresponding example |
| 104 | |
| 105 | # [3.2.0] 19/09/2025 |
| 106 | |
| 107 | Requires Elpi 3.0.0 and Coq 8.20 or Rocq 9.0 or Rocq 9.1. |
| 108 | |
| 109 | ### Apps: |
| 110 | - Derive: |
| 111 | - Change `Set Uniform Inductive Parameters` is `#[export]` and not `#[global]` |
| 112 | |
| 113 | ### API |
| 114 | - Fix `.glob` generation for `coq.notation.*` |
| 115 | - Fix binder handling in `coq.ltac.collect-goals` |
| 116 | |
| 117 | # [3.1.0] 01/09/2025 |
| 118 | |
| 119 | Requires Elpi 3.0.0 and Coq 8.20 or Rocq 9.0 or Rocq 9.1. |
| 120 | |
| 121 | Port to Elpi 3.1 |
| 122 | |
| 123 | # [3.0.0] 18/7/2025 |
| 124 | |
| 125 | Requires Elpi 3.0.0 and Coq 8.20 or Rocq 9.0 or Rocq 9.1. |
| 126 | |
| 127 | ### Workflow |
| 128 | - Deprecate `Elpi Typecheck` since code is typechecked upfront when accumulated |
| 129 | |
| 130 | ### Documentation |
| 131 | - Update elpi_lang tutorial w.r.t. Elpi 3.0 new determinacy checker, in |
| 132 | particular the `func` declaration and the `=!=>` oeprator |
| 133 | |
| 134 | ### APPS: |
| 135 | - New experimental app `rbuild`: build any record with « ... » |
| 136 | |
| 137 | ### API |
| 138 | - `coq.ltac.collect-goals` now takes the parameters of primitive projections into account |
| 139 | |
| 140 | # [2.6.0] 8/7/2025 |
| 141 | |
| 142 | Requires Elpi 2.0.7 and Coq 8.20 or Rocq 9.0 or Rocq 9.1. |
| 143 | |
| 144 | ### Vernacular |
| 145 | - New attributes `#[proof="begin"]`, `#[proof(begin_if="att")]` |
| 146 | and `#[proof="end"]` to `Elpi Export` to |
| 147 | declare commands starting/ending proofs |
| 148 | |
| 149 | ### API |
| 150 | - New `coq.redflags.proj` to control "unfolding" of primitive projections |
| 151 | - New `main-interp-proof` and `main-interp-qed` for commands starting/ending |
| 152 | proofs |
| 153 | |
| 154 | # [2.5.2] 29/4/2025 |
| 155 | |
| 156 | Requires Elpi 2.0.7 and Coq 8.20 or Rocq 9.0. |
| 157 | |
| 158 | ### API |
| 159 | - New `coq.univ.alg-max` API that relates two universes to their algebraic |
| 160 | maximum. |
| 161 | |
| 162 | # [2.5.1] 22/4/2025 |
| 163 | |
| 164 | Requires Elpi 2.0.7 and Coq 8.20 or Rocq 9.0. |
| 165 | |
| 166 | ### APPS: |
| 167 | - derive: support for primitive strings in `param1` and `param1_trivial` |
| 168 | - derive: support for `is_true` in `param1_trivial` (based on pre-existing |
| 169 | special support for `is_eq` and `is_bool`) |
| 170 | |
| 171 | ### API |
| 172 | - New `coq.univ.alg-super` that relates a univ `U` to its algebraic successor |
| 173 | `V`, that is `U+1` and not any `V` s.t. `U < V` |
| 174 | - New `coq.register` API |
| 175 | |
| 176 | ### HOAS |
| 177 | - New `@keep-alg-univs!` option for all APIs taking terms. By default algebraic |
| 178 | universes are replaced by named universes. See the `coq.univ.alg-super` API. |
| 179 | |
| 180 | # [2.5.0] 18/2/2025 |
| 181 | |
| 182 | Requires Elpi 2.0.7 and Coq 8.20 or Rocq 9.0. |
| 183 | |
| 184 | ### Packaging |
| 185 | - rename to `rocq-elpi` (`coq-elpi` is a transitional package) |
| 186 | - remove cram tests |
| 187 | - separate tests bsed on `rocq-stdlib`, the main build targets |
| 188 | just depend on `rocq-core` |
| 189 | - CI based on docker images rather than ocaml setup |
| 190 | |
| 191 | ### APPS |
| 192 | - derive: fix missing universe constraints in `param2` |
| 193 | - derive: new `param2.register` command |
| 194 | - derive: improve generated names in `param2` |
| 195 | - derive: put eqb AST into a dedicated namespace |
| 196 | - derive: new (experimental) derive.eqbOK.register_axiom |
| 197 | - eltac: apply and rewrite examples |
| 198 | |
| 199 | ### API |
| 200 | - `coq.count-prods` now count products modulo reduction, |
| 201 | rather than purely syntactically |
| 202 | - `coq.arity->sort` now attempts reduction to find a sort or prod, |
| 203 | before failing |
| 204 | - `coq.arity->sort` now handles let-in |
| 205 | |
| 206 | # [2.4.0] 15/1/2025 |
| 207 | |
| 208 | Requires Elpi 2.0.7 and Coq 8.20. |
| 209 | |
| 210 | ### API |
| 211 | - Change `coq.env.add-section-variable` now takes the implicit status of the |
| 212 | variable |
| 213 | |
| 214 | # [2.3.0] - 6/12/2024 |
| 215 | |
| 216 | Requires Elpi 2.0.3 and Coq 8.20. |
| 217 | |
| 218 | The major change is the port to Elpi 2.0 that reports type checking errors |
| 219 | to the location of the offending term and not its enclosing rule. |
| 220 | |
| 221 | ### Vernacular |
| 222 | - `Elpi Accumulate Db Header <db>` to accumulate just the `Db` declaration |
| 223 | but no code added after that |
| 224 | - `Elpi File <file> <code>` to name a piece of code without |
| 225 | requiring an external file |
| 226 | - `Elpi Accumulate File Signature <file>` to accumulate only |
| 227 | the types declarations from a file. |
| 228 | - `Elpi Typecheck` is deprecated and is a no-op since `Elpi Accumulate` |
| 229 | performs type checking incrementally |
| 230 | |
| 231 | ### HOAS |
| 232 | - new `open-trm` argument for tactics with syntax ````(...)``` and |
| 233 | `ltac_open_term:(...)`. Open terms can mention free variables. |
| 234 | - new `{{:pat ...}}` quotations inside which `_` is interpreted as a |
| 235 | wildcard, not as a regular evar. |
| 236 | |
| 237 | ### API |
| 238 | - Support export locality in `coq.TC.declare-instance` |
| 239 | - `tc-instance` now just carries a priority, no matter if inferred or declared, |
| 240 | and works for instances added as `Hint Resolve` to the `typclass_instances` |
| 241 | database |
| 242 | |
| 243 | ### Build system |
| 244 | - Support dune workspace build with `elpi` |
| 245 | |
| 246 | ### Misc |
| 247 | - Resolve `.elpi` files based on Coq's resolver. Paths are now expected to be |
| 248 | of the form `<coq_dir_path>/<rel_path>`, where `<coq_dir_path>` part is a |
| 249 | logical Coq directory (as mapped with `-Q` or `-R`), and `<rel_path>` is a |
| 250 | relative path from the corresponding directory. |
| 251 | |
| 252 | # [2.2.3] - 30/07/2024 |
| 253 | |
| 254 | Requires Elpi 1.19.2 and Coq 8.19 or Coq 8.20. |
| 255 | |
| 256 | ### API |
| 257 | - New `coq.arguments.reset-simplification` |
| 258 | - Change some speedup concerning universes |
| 259 | |
| 260 | # [2.2.2] - 15/07/2024 |
| 261 | |
| 262 | Requires Elpi 1.19.2 and Coq 8.19 or Coq 8.20. |
| 263 | |
| 264 | ### Packaging |
| 265 | - Fix release script to just publish coq-elpi (and not coq-elpi-tests) |
| 266 | - Fix opam constraints by adding upper bound |
| 267 | |
| 268 | # [2.2.1] - 12/07/2024 |
| 269 | |
| 270 | Requires Elpi 1.19.2 and Coq 8.19 or Coq 8.20. |
| 271 | |
| 272 | ### Error reporting |
| 273 | - Fix type checking errors on inline code are now reported on the correct line |
| 274 | in LSP based interfaces |
| 275 | |
| 276 | ### Build system |
| 277 | - Fix various missing dependencies |
| 278 | - Fix rebuild before installation |
| 279 | - Change CI no more use of docker images |
| 280 | - Change silence `default-output-directory` warning |
| 281 | |
| 282 | ### Apps/tc |
| 283 | - Change organize the code inside a `tc` namespace |
| 284 | |
| 285 | ### Apps/derive |
| 286 | - Change do not leak `positive_scope` open |
| 287 | |
| 288 | # [2.2.0] - 28/06/2024 |
| 289 | |
| 290 | Requires Elpi 1.19.2 and Coq 8.19 or Coq 8.20. |
| 291 | |
| 292 | ### Build system |
| 293 | - Change switch to dune |
| 294 | - New ppx_optcomp to support multiple Coq version |
| 295 | - New no need for dot-merlin-reader, OCaml's language server understands dune |
| 296 | |
| 297 | ### Apps/tc |
| 298 | - Change supports higher order unification |
| 299 | - Change syntax to register, enable and disable solver |
| 300 | - Change solutions found in Elpi are eta-contracted |
| 301 | |
| 302 | ### API |
| 303 | - New `coq.debug` |
| 304 | - New `coq.pstring->string` and `coq.string->pstring` |
| 305 | - New `@warn!` attribute for `coq.notation.add-abbreviation` |
| 306 | - New `coq.*.set.min`, `coq.*.set.max`, `coq.*.set.choose`, `coq.*.set.fold`, |
| 307 | `coq.*.set.partition` |
| 308 | - New `coq.*.map.fold` |
| 309 | - New `coq.env.projection?` and `coq-env.primitive-projection?` |
| 310 | |
| 311 | ### HOAS |
| 312 | - New `primitive (pstring S)` in Coq 8.20 |
| 313 | |
| 314 | # Changelog |
| 315 | |
| 316 | ## [2.1.1] - 15/05/2024 |
| 317 | |
| 318 | Requires Elpi 1.18.2 and Coq 8.19. |
| 319 | |
| 320 | ### Commands |
| 321 | - Fix initial synterp state of commands with a synterp phase |
| 322 | |
| 323 | ## [2.1.0] - 29/03/2024 |
| 324 | |
| 325 | Requires Elpi 1.18.2 and Coq 8.19. |
| 326 | |
| 327 | ### Commands |
| 328 | - New `Elpi Accumulate dbname File filename` allows to accumulate a file int a db |
| 329 | - Change `Elpi Db` now only creates (and initialises) a database for the specified phase |
| 330 | |
| 331 | ### API |
| 332 | - New `coq.parse-attributes` support for the `attlabel` specification, |
| 333 | see `coq-lib-common.elpi` for its documentation. |
| 334 | - New `coq.goal->pp` |
| 335 | - Replace `coq.replay-all-missing-synterp-actions` by (nestable) groups of actions |
| 336 | - New `coq.begin-synterp-group` and `coq.end-synterp-group` primitives |
| 337 | - New `coq.replay-synterp-action-group` primitive (replaces `coq.replay-all-missing-synterp-actions` in conjunction with a group) |
| 338 | - New `coq.replay-next-synterp-actions` to replay all synterp actions until the next beginning/end of a synterp group |
| 339 | - New `coq.primitive.projection-unfolded` to fold/unfold a primitive projection. |
| 340 | Note that unfolded primitive projections are still compact terms, but they |
| 341 | are displayed as `match` expressions and some Ltac code can see that. |
| 342 | |
| 343 | ## [2.0.2] - 01/02/2024 |
| 344 | |
| 345 | Requires Elpi 1.18.2 and Coq 8.19. |
| 346 | |
| 347 | ### API |
| 348 | - Fix `coq.elaborate-*` does not erase the type annotation of `Let`s (regression |
| 349 | introduced in 2.0.1). This fix may introduce differences in generated names |
| 350 | - Fix `coq.elaborate-*` are not affected anymore by printing options |
| 351 | |
| 352 | ### Commands |
| 353 | - Fix install the right initial parsing state (the one before any synterp action |
| 354 | is re-played) |
| 355 | |
| 356 | ### HOAS |
| 357 | - Fix evar instantiation loss when crossing the elpi/ltac border |
| 358 | - Fix encoding of "definitional classes" (`Class` with no record) |
| 359 | - Fix order of implicit arguments of `Record` |
| 360 | |
| 361 | ### Misc |
| 362 | - Change requiring `elpi` does not load primitive integers nor primitive floats |
| 363 | |
| 364 | ### Apps |
| 365 | - TC: avoid declaring options twice (could make vscoq2 fail) |
| 366 | - CS: `cs` now takes a context, a term that is the projection of some structure applied to the parameters of the structure, a term to put a structure on and the solution to return |
| 367 | |
| 368 | ## [2.0.1] - 29/12/2023 |
| 369 | |
| 370 | Requires Elpi 1.18.1 and Coq 8.19. |
| 371 | |
| 372 | This minor release adds compatibility with Coq 8.19. |
| 373 | |
| 374 | ## [2.0.0] - 23/12/2023 |
| 375 | |
| 376 | Requires Elpi 1.18.1 and Coq 8.18. |
| 377 | |
| 378 | This major release accommodates for the separation of parsing from execution |
| 379 | of Coq 8.18 enabling Coq-Elpi programs to be run efficiently (and correctly) |
| 380 | under VSCoq 2.0. |
| 381 | |
| 382 | ### Documentation |
| 383 | - New section about parsing/execution separation in the [Writing commands in Elpi](https://lpcic.github.io/coq-elpi/tutorial_coq_elpi_command.html) tutorial |
| 384 | |
| 385 | ### Commands |
| 386 | - New `Elpi *` commands understand the `#[phase]` attribute, see the doc in |
| 387 | the [README](README.md#vernacular-commands) file, and the section |
| 388 | about the [separation of parsing from execution](README.md#separation-of-parsing-from-execution-of-vernacular-commands) |
| 389 | - New `Elpi Export` understands an `As` clause to rename or alias a program when exported |
| 390 | |
| 391 | ### API |
| 392 | - Change `coq.elpi.add-predicate` now locality can be changed |
| 393 | - Experimental `coq.toposort` returns a valid topological ordering of the nodes |
| 394 | of a graph |
| 395 | - Change `coq.TC.db-for`, now instances are returned sorted wrt their priority |
| 396 | - New `tc-priority`, contains the priority of an instance and if the priority |
| 397 | has been given by the user or computed by `coq` |
| 398 | - Change `tc-instance`, now the type is `gref -> tc-priority -> tc-instance` i.e. the priority is not an integer anymore |
| 399 | - New `coq.ltac.fresh-id` to generate fresh names in the proof context |
| 400 | - New `@no-tc!` attribute supported by `coq.ltac.call-ltac1` |
| 401 | - New `coq.TC.get-inst-prio` returns the `tc-priority` of an instance |
| 402 | - New `synterp-action` datatype |
| 403 | - New `coq.replay-all-missing-synterp-actions` |
| 404 | - New `coq.replay-synterp-action` |
| 405 | - New `coq.next-synterp-action` |
| 406 | - New `coq.synterp-actions` (parsing phase only) |
| 407 | |
| 408 | ### Apps |
| 409 | - New `tc` app providing an implementation of a type class solver written in elpi. |
| 410 | This app is experimental |
| 411 | |
| 412 | ## [1.19.3] - 12/10/2023 |
| 413 | |
| 414 | Requires Elpi 1.16.5 and Coq 8.18. |
| 415 | |
| 416 | ### Misc |
| 417 | |
| 418 | - Fix `Elpi Export` broken when used from VsCoq2 |
| 419 | |
| 420 | ### APIs |
| 421 | |
| 422 | - New `ltac1-tactic` opaque data type |
| 423 | - New `tac` argument constructor |
| 424 | - Change `coq.ltac.call-ltac1` now accepts either a string (tactic name) or |
| 425 | a tactic expression (of type `ltac1-tactic`) |
| 426 | - New `ltac_tactic:(...)` syntax to pass tactic expressions to Elpi tactics |
| 427 | - New `coq.extra-dep` predicate |
| 428 | |
| 429 | ## [1.19.1] - 30/08/2023 |
| 430 | |
| 431 | Requires Elpi 1.16.5 and Coq 8.18. |
| 432 | |
| 433 | ### Misc |
| 434 | - Automate release process |
| 435 | |
| 436 | ## [1.19.0] - 04/08/2023 |
| 437 | |
| 438 | Requires Elpi 1.16.5 and Coq 8.18. |
| 439 | |
| 440 | ### APPS |
| 441 | - New `coercion` app providing `coercion` predicate |
| 442 | to program coercions (thanks @proux01). |
| 443 | This app is experimental. |
| 444 | |
| 445 | ### API |
| 446 | - Removed option `@nonuniform!` as it disappears from Coq 8.18. |
| 447 | (c.f. https://github.com/coq/coq/pull/17716 ) |
| 448 | |
| 449 | ## [1.18.0] - 27/07/2023 |
| 450 | |
| 451 | Requires Elpi 1.16.5 and Coq 8.17. |
| 452 | |
| 453 | ### Doc |
| 454 | - Mention the trace browser for VSCode in the Elpi tutorial. |
| 455 | |
| 456 | ### API |
| 457 | - New `coq.elpi.accumulate-clauses` takes a list of clauses which share the |
| 458 | same DB and accumulation site |
| 459 | - New `coq.elpi.add-predicate` to declare the signature of a new predicate into |
| 460 | a Db |
| 461 | - New `coq.elpi.predicate` to build a term of type `prop` out of a predicate |
| 462 | name and arguments |
| 463 | - Change `coq.env.global` now relates a term with a gref, instead of working one |
| 464 | way only |
| 465 | - Change `coq.elpi.accumulate*` generalise clauses over global universe level, |
| 466 | and error if algebraic levels are present. It used to warn if levels were |
| 467 | present. |
| 468 | - New `coq.elaborate*skeleton` support the `@no-tc!` option to disable type |
| 469 | class resolution |
| 470 | - New `@global!` option for `coq.elpi.accumulate*` |
| 471 | - New `coq.env.current-section-path` |
| 472 | - New `coq.TC.db-tc` giving all type classes |
| 473 | - New `coq.reduction.eta-contract` |
| 474 | |
| 475 | ### HOAS |
| 476 | - Fix evar declarations were (rarely) generated at the wrong depth, possibly |
| 477 | resulting in variable captures in types containing binders |
| 478 | - Fix `assert false` in evar instantiation readback (eta contraction code was |
| 479 | incomplete) |
| 480 | - Fix resiliency in case a goal is closed by side effect (was raising fatal |
| 481 | errors such as "Not a goal" or "Not a variable after goal") |
| 482 | - Change assigning a hole linked to an evar *always* triggers type checking. |
| 483 | This is necessary even if the term being assigned is well typed since one |
| 484 | may still need to declare some universe constraints. |
| 485 | - Change propagate type constraints in `Prop` inward (Coq 8.17 only). Eg. |
| 486 | `Check (T -> _) : Prop` fails in 8.17 since `_` is assumed to be in `Type`. |
| 487 | We propagate the constraint ourselves across `->`, `/\`, `\/` and `~`. |
| 488 | - Quotations `{{ ... }}` are now parsed by Coq ensuring the end of input is |
| 489 | reached. Spurious text results in a parse error. For example `{{ f ) }}` |
| 490 | is no more accepted, as well as `{{ _.x }}` |
| 491 | |
| 492 | ### Vernacular |
| 493 | - New `Elpi Print` also print the program in `.txt` format |
| 494 | |
| 495 | ### Runtime |
| 496 | - Change compilation cache able to prevent most of lengthy compilations in |
| 497 | Hierarchy-Builder for MathComp 2.0. In some cases Coq-Elpi is more picky |
| 498 | about the order of accumulated files, in particular a file containing |
| 499 | the spilling of a predicate `{p}` needs to be accumulated after the |
| 500 | type or mode of `p` is declared |
| 501 | |
| 502 | ### APPS |
| 503 | - `derive Inductive i {A}` now sets `A` implicit status globally |
| 504 | - `lock Definition f {A}` now sets `A` implicit status globally |
| 505 | |
| 506 | ## [1.17.1] - 09/03/2023 |
| 507 | |
| 508 | Requires Elpi 1.16.5 and Coq 8.17. |
| 509 | |
| 510 | ### API: |
| 511 | - New `coq.int->uint63` and `coq.float->float64` |
| 512 | - Fix bug introduced in 1.17.0 affecting `coq.ltac.call-ltac1` |
| 513 | |
| 514 | ## [1.17.0] - 13/02/2023 |
| 515 | |
| 516 | Requires Elpi 1.16.5 and Coq 8.17. |
| 517 | |
| 518 | ### API |
| 519 | - New `coq.modpath->library` |
| 520 | - New `coq.modtypath->library` |
| 521 | - Fix `coq.env.*` APIs generating inductives, definitions and modules now |
| 522 | emit metadata in the `.glob` files so that `coqdoc` can generate hyperlinks |
| 523 | |
| 524 | ### APPS |
| 525 | - Add `NES.{List,Print}`. |
| 526 | - Support relative paths in `NES.{Open,List,Print}` |
| 527 | (path `_.P` references top-level namespace `P`, paths without a |
| 528 | leading `_.` are relative to the current namespace) |
| 529 | |
| 530 | ## [1.16.0] - 10/11/2022 |
| 531 | |
| 532 | Requires Elpi 1.16.5 and Coq 8.16. |
| 533 | |
| 534 | The main change is the `derive` app which must now be loaded |
| 535 | by importing `derive.std` (just loading `derive` won't work). |
| 536 | See the [new derive documentation](apps/derive). |
| 537 | |
| 538 | ### API |
| 539 | - Change `coq.env.module` and `coq.env.module-type` do not fail if the |
| 540 | module (type) contains a mutual inductive. The resulting `gref` is going |
| 541 | to me unusable with most APIs, though. |
| 542 | - Change `coq.env.module` returns a ADT describing the module contents |
| 543 | - Change `coq.gref->path` and `coq.gref->id` do work on `gref` which point |
| 544 | to mutual inductives. |
| 545 | - New `coq.env.term-dependencies` computing all the `grefs` occurring in a term. |
| 546 | - New `coq.redflag` and `coq.redflags` types for `@redflags!` option understood |
| 547 | by `coq.reduction.lazy.*` `and coq.reduction.cbv.norm` |
| 548 | - New `coq.env.fresh-global-id` |
| 549 | |
| 550 | ### APPS |
| 551 | - Change `derive` usage. |
| 552 | One should now import `From elpi.apps Require Import derive.std` |
| 553 | - Change derivations `eq` and `eqOK` move to `derive.legacy` |
| 554 | - New derivations `eqb` and `eqbOK` subsuming the previous ones |
| 555 | |
| 556 | ## [1.15.6] - 27-08-2022 |
| 557 | |
| 558 | Requires Elpi 1.16.5 and Coq 8.16. |
| 559 | |
| 560 | - Fix parse error location display for quotation code |
| 561 | - Fix HOAS of inductives with non-uniform parameters |
| 562 | |
| 563 | ## [1.15.5] - 30-07-2022 |
| 564 | |
| 565 | Requires Elpi 1.16.5 and Coq 8.16. |
| 566 | |
| 567 | - Fix parse error location display for inline code |
| 568 | - Fix HOAS of evars: pruning was not propagated to the type of the evar |
| 569 | |
| 570 | ## [1.15.4] - 26-07-2022 |
| 571 | |
| 572 | Requires Elpi 1.16.5 and Coq 8.16. |
| 573 | |
| 574 | - Fix lexical analysis inside quotations error location display |
| 575 | - Fix drop of universe constraints attached to automatically generates |
| 576 | universe levels (eg when `sort (typ X)` is passed to Coq) |
| 577 | - Fix nix CI |
| 578 | |
| 579 | ## [1.15.3] - 20-07-2022 |
| 580 | |
| 581 | Requires Elpi 1.16.5 and Coq 8.16. |
| 582 | |
| 583 | - Fix parse error location display |
| 584 | |
| 585 | ## [1.15.2] - 19-07-2022 |
| 586 | |
| 587 | Requires Elpi 1.16.5 and Coq 8.16. |
| 588 | |
| 589 | - API: |
| 590 | - Fix `coq.env.indt-decl` correctly handles universes in parameters of |
| 591 | universe polymorphic inductive |
| 592 | - Fix `coq.typecheck-indt-decl` ignores non uniform parameters to compute |
| 593 | the universe level of the inductive |
| 594 | - Fix `coq.elaborate-indt-decl-skeleton` ignores non uniform parameters to |
| 595 | compute the universe level of the inductive |
| 596 | |
| 597 | ## [1.15.1] - 16-07-2022 |
| 598 | |
| 599 | Requires Elpi 1.16.5 and Coq 8.16. |
| 600 | |
| 601 | - API: |
| 602 | - Fix `coq.elaborate*skeleton` does refresh universes |
| 603 | - New `@keepunivs!` attribute to force skeleton APIs to not |
| 604 | refresh universes. This is useful to keep a link between |
| 605 | a universe declaration and the declaration itself but still |
| 606 | elaborate it |
| 607 | - Fix Coq-Elpi is reentrant when commands call tactics |
| 608 | |
| 609 | ## [1.15.0] - 13-07-2022 |
| 610 | |
| 611 | Requires Elpi 1.16.5 and Coq 8.16. |
| 612 | |
| 613 | The main changes are: |
| 614 | - experimental support for universe polymorphism. One can read and write |
| 615 | universe polymorphic terms and manipulate their constraint declarations. |
| 616 | Terms now have a new `pglobal` term constructor, akin to `global` but for |
| 617 | global references to universe polymorphic terms, also carrying a universe |
| 618 | instance. The attribute `@uinstance!` can be used to pass or retrieve |
| 619 | a universe instance to/from APIs to access the Coq environment, as in |
| 620 | `@uinstance! I => coq.env.typeof GR Ty_at_I`. |
| 621 | The meaning of `@uinstance! I =>` depends if `I` is an unset variable or a |
| 622 | concrete universe instance. In the former case the API generate a fresh |
| 623 | universe instance (for `GR`) and assign it to `I`; in the latter case it uses |
| 624 | the provided universe instance. |
| 625 | See [coq-builtin](coq-builtin.elpi) for the full documentation |
| 626 | - command arguments are elaborated by Coq (unless told otherwise). As a |
| 627 | consequence arguments can use the full Coq syntax, including deep pattern |
| 628 | matching and tactics in terms. Raw arguments are (and will remain) available, |
| 629 | but don't support that yet |
| 630 | |
| 631 | ### APPS |
| 632 | - New experimental support for polymorphic definitions in `locker` |
| 633 | - New example of `clearbody` tactic taking a list of names in `eltac` |
| 634 | - Change `derive` sets, *globally*, `Uniform Inductive Parameters`. See |
| 635 | https://coq.inria.fr/refman/language/core/inductive.html#coq:flag.Uniform-Inductive-Parameters |
| 636 | for reference. The immediate effect is that inductive types uniform parameters |
| 637 | don't have to be repeated in the types of the constructors (they can't vary |
| 638 | anyway). Non-uniform parameters and indexes have to be passed, as usual. |
| 639 | If the flag is unset by the user `Coq-Elpi` will raise a warning since |
| 640 | inference of non-uniform parameters is not implemented |
| 641 | |
| 642 | ### HOAS |
| 643 | - Change arguments to commands are elaborated by Coq by default |
| 644 | - New attribute `#[arguments(raw)]` to get arguments in raw format (as in |
| 645 | version 1.14 or below) |
| 646 | - Change raw inductive declaration using `|` to mark non-uniform |
| 647 | parameters is expected to not pass uniform parameters to the inductive |
| 648 | type (the same behavior applies to elaborated arguments, making the two |
| 649 | consistent) |
| 650 | - Change `coercion` attribute for record fields now takes values `off`, |
| 651 | `regular` or `reversible` |
| 652 | - New `pglobal` term constructor carrying a `gref` and a `univ-instance` for |
| 653 | universe polymorphic terms |
| 654 | - New `upoly-indt-decl` argument type for polymorphic inductive types |
| 655 | declarations |
| 656 | - New `upoly-const-decl` argument type for polymorphic definitions |
| 657 | - New `upoly-decl` data type for universe parameters declarations, i.e. |
| 658 | the `@{u1 u2 | u1 < u2}` Coq syntax one can use for inductives or definitions |
| 659 | - New `upoly-decl-cumul` data type for universe parameters declarations, i.e. |
| 660 | the `@{u1 u2 | u1 < u2}` Coq syntax one can use for cumulative inductives |
| 661 | - Rename `univ` -> `sort` i.e. `(sort S)` is a `term` and `S` can be `prop` or |
| 662 | `(type U)` where `U` is a `univ` |
| 663 | - New `univ-instance` opaque type to represent how a polymorphic constant is |
| 664 | instantiated, i.e. `(pglobal GR I)` where `GR` is a `gref` and `I` a |
| 665 | `univ-instance` |
| 666 | - New `univ.variable` opaque type for `univ` which are not algebraic. This data |
| 667 | type is used in `upoly-decl` and `upoly-decl-cumul` |
| 668 | |
| 669 | ### API |
| 670 | - New `coq.env.indc->indt` |
| 671 | - New `coq.env.dependencies` to compute the dependencies of a `gref` |
| 672 | - New `coq.env.transitive-dependencies` |
| 673 | - New `@nonuniform!` and `@reversible!` for `coq.coercion.declare` |
| 674 | - New `@uinstance!` attribute supported by many `coq.env.*` APIs that can be |
| 675 | used to read/write the universe instance of polymorphic constants. E.g. |
| 676 | `@uinstance! UI => coq.env.typeof GR Ty` can instantiate `Ty` to `UI` if |
| 677 | provided or set `UI` to a fresh instance if not |
| 678 | - New `@udecl!` attribute to declare polymorphic constants or inductives, |
| 679 | like the `@{u1 u2 | u1 < u2}` Coq syntax |
| 680 | - New `@udecl-cumul!` attribute to declare polymorphic inductives, |
| 681 | like the `@{+u1 u2 | u1 < u2}` Coq syntax |
| 682 | - New `@univpoly!` shorter version of `@udecl!`, |
| 683 | like the `#[universes(polymorphic)]` Coq syntax (without giving any other |
| 684 | `@{u1 u2 | u1 < u2}` directive) |
| 685 | - New `@univpoly-cumul!` shorter version of `@udecl-cumul!`, like |
| 686 | the `#[universes(polymorphic,cumulative)]` Coq syntax |
| 687 | - New `coq.env.global` API to craft a `term` from a `gref`. When used with |
| 688 | spilling `{coq.env.global GR}` gives either `(global GR)` or `(pglobal GR I)` |
| 689 | depending on `GR` being universe polymorphic or not. It understands the |
| 690 | `@unistance!` attribute for both reading or setting `I` |
| 691 | - New `coq.env.univpoly?` to tell if a `gref` is universe polymorphic and how |
| 692 | many parameters it has |
| 693 | - Change `coq.univ.leq` -> `coq.sort.leq` |
| 694 | - Change `coq.univ.eq` -> `coq.sort.eq` |
| 695 | - Change `coq.univ.sup` -> `coq.sort.sup` |
| 696 | - New `coq.sort.pts-triple` computes the resulting `sort` of a product |
| 697 | - New `coq.univ.constraints` gives all the universe constraints in a first class |
| 698 | form |
| 699 | - Change `coq.univ.new` does not take a list anymore |
| 700 | - New `coq.univ` to find a global universe |
| 701 | - New `coq.univ.global?` tests if a universe is global |
| 702 | - New `coq.univ.variable` links a `univ` to a `univ.variable` (imposing an |
| 703 | equality constraint if needed) |
| 704 | - New `coq.univ.variable.constraints` finds all constraints talking about a |
| 705 | variable |
| 706 | - New `coq.univ.variable.of-term` finds all variables occurring in a term |
| 707 | - New `coq.univ-instance` links a `univ-instance` to a list of of |
| 708 | `univ.variable` |
| 709 | - New `coq.univ-instance.unify-eq` unifies two `univ-instance` |
| 710 | (for the same `gref`) |
| 711 | - New `coq.univ-instance.unify-leq` unifies two `univ-instance` |
| 712 | (for the same `gref`) |
| 713 | - New `coq.univ.set` OCaml's set for `univ` |
| 714 | - New `coq.univ.map` OCaml's map for `univ` |
| 715 | - New `coq.univ.variable.set` OCaml's set for `univ.variable` |
| 716 | - New `coq.univ.variable.map` OCaml's map for `univ.variable` |
| 717 | |
| 718 | ### Vernacular |
| 719 | - New `Accumulate File <ident>` to be used in tandem with Coq 8.16 |
| 720 | `From <path> Extra Dependency <file> as <ident>` |
| 721 | |
| 722 | ## [1.14.0] - 07-04-2022 |
| 723 | |
| 724 | Requires Elpi 1.15.0 and Coq 8.15. |
| 725 | |
| 726 | ### Vernacular |
| 727 | - All `Elpi Bla` commands accept (and ignore with a warning) unknown attributes, |
| 728 | to be forward compatible |
| 729 | |
| 730 | ## [1.13.0] - 08-02-2022 |
| 731 | |
| 732 | Requires Elpi 1.14.1 and Coq 8.15. |
| 733 | |
| 734 | ### Performance |
| 735 | - New 1 slot cache for context read back to improve the speed of FFI calls |
| 736 | needing to read back a large `coq_context` |
| 737 | - New `Conversion.t` for `gref` handwritten to minimize allocations |
| 738 | - New terms of the form `(global ...)` are now hashconsed |
| 739 | - New `extra_goals` postprocessing removing `declare-evar/rm-evar` pairs which |
| 740 | happen naturally writing code like `coq.unify-eq {{ f _ x }} {{ f y _ }}` |
| 741 | (the `_` are solved immediately, no need to declare them to elpi) |
| 742 | |
| 743 | ### API |
| 744 | - New `coq.hints.opaque` |
| 745 | - New `coq.hints.set-opaque` |
| 746 | - Change load `coq.ltac.*` also in commands (and not just tactics) so that |
| 747 | commands can easily turn holes into goals and inhabit them calling regular |
| 748 | tactics. |
| 749 | - New `coq.hints.add-resolve` |
| 750 | - Fix `coq.option.add` survives the end of a file |
| 751 | - New `coq.env.begin-module-functor` |
| 752 | - New `coq.env.begin-module-type-functor` |
| 753 | - New `coq.env.apply-module-functor` |
| 754 | - New `coq.env.apply-module-type-functor` |
| 755 | - New `coq.inline` with constructors `coq.inline.no`, `coq.inline.at` and |
| 756 | `coq.inline.default` |
| 757 | - New `@inline-at! N` and `@inline!` macros |
| 758 | - Change `coq.env.add-axiom` honors `@inline` macros |
| 759 | |
| 760 | ## [1.12.1] - 20-01-2022 |
| 761 | |
| 762 | Requires Elpi 1.13.6 and Coq 8.15. |
| 763 | |
| 764 | ### APPS |
| 765 | - `derive Inductive i {A}` now correctly sets `A` implicit status |
| 766 | - `lock Definition f {A}` now correctly sets `A` implicit status |
| 767 | |
| 768 | ### API |
| 769 | - New `coq.arity->implicits` |
| 770 | - New `coq.indt-decl->implicits` |
| 771 | - New `coq.any-implicit?` |
| 772 | |
| 773 | ## [1.12.0] - 15-01-2021 |
| 774 | |
| 775 | Requires Elpi 1.13.6 and Coq 8.15. |
| 776 | |
| 777 | ### HOAS |
| 778 | - Change `{{ p x }}` is no more interpreted as a primitive projection |
| 779 | even if `p` is the associated constant |
| 780 | - New `{{ x.(p) }}` is interpreted as a primitive projection if `p` is a |
| 781 | primitive projection |
| 782 | - New `{{ x.(@p params) }}` is interpreted as a regular projection even |
| 783 | if `p` is a primitive projection, since primitive projections don't have |
| 784 | parameters and the user wrote some |
| 785 | |
| 786 | ### API |
| 787 | - Fix globalization of `arity` inside a section |
| 788 | - New `coq.option` type to access Coq's GOption system (Set/Unset vernaculars) |
| 789 | - New `coq.option.add` |
| 790 | - New `coq.option.get` |
| 791 | - New `coq.option.set` |
| 792 | - New `coq.option.available?` |
| 793 | - New `coq.bind-ind-parameters` |
| 794 | |
| 795 | ### APPS |
| 796 | - New `locker` app providing `lock` and `mlock` commands |
| 797 | |
| 798 | ## [1.11.2] - 24-09-2021 |
| 799 | |
| 800 | Requires Elpi 1.13.6 and Coq 8.14. |
| 801 | |
| 802 | ### API |
| 803 | - Change `coq.bind-ind-arity` preserves `let` |
| 804 | - New `coq.bind-ind-arity-no-let` to reduce `let`, used in `coq.build-match` |
| 805 | - Fix `coq.build-match` putting `let` bindings in `match` return type |
| 806 | - Change `coq.map-under-fun` preserves `let` |
| 807 | |
| 808 | ## [1.11.1] - 24-09-2021 |
| 809 | |
| 810 | Requires Elpi 1.13.6 and Coq 8.13. |
| 811 | |
| 812 | ### API |
| 813 | - New `coq.env.informative?` to know if a type can be eliminated to build |
| 814 | a term of sort `Type` |
| 815 | - Fix `coq.warning` is synchronized with Coq's Undo machinery |
| 816 | - Retire the venerable "elpi fails" message, replaced with something more |
| 817 | precise inviting the user to report a bug: errors should be taken care |
| 818 | of and reported nicely by the programmer. |
| 819 | - New `coq.uint63->int` |
| 820 | - New `coq.float64->float` |
| 821 | - New `coq.ltac.id-free?` tells if a given ident is already used to denote a |
| 822 | goal hypothesis, or not. |
| 823 | |
| 824 | ### Derive |
| 825 | - Fix derivation of induction principles for "data types" in `Prop` |
| 826 | - Add derivation of `param1` for the equality test `eq` with name `t.param1_eq` |
| 827 | - Fix `invert` and `idx2inv` when dealing with containers |
| 828 | - New datatypes from the Coq's prelude are derived in advance, no need to |
| 829 | to `derive nat` anymore. |
| 830 | |
| 831 | ## [1.11.0] - 30-06-2021 |
| 832 | |
| 833 | Requires Elpi 1.13.6 and Coq 8.13. |
| 834 | |
| 835 | ### HOAS |
| 836 | - New node `proj` of type `projection -> int -> primitive-value` holding the |
| 837 | projection name (a Coq detail) and the number of the field it projects (0 |
| 838 | based), eg: `primitive (proj _ N)` stands for the projection for the Nth |
| 839 | constructor field counting parameters. |
| 840 | - Change `cs-instance` carries a `gref` |
| 841 | |
| 842 | ### API |
| 843 | - New `coq.notation.add-abbreviation-for-tactic` to add a parsing rule |
| 844 | for a tactic-in-term, along the lines of |
| 845 | `Notation foo := ltac:(elpi mytactic arguments)` |
| 846 | but passing `mytactic` the correct `elpi.loc` of invocation. |
| 847 | - New `@pplevel!` attribute to control outermost parentheses in `coq.term->pp` |
| 848 | and similar |
| 849 | - New `coq.hints.add-mode` like the `Hint Mode` vernacular |
| 850 | - New `coq.hints.modes` |
| 851 | - New `coq.TC.declare-class` |
| 852 | - Deprecate `coq.env.const-opaque?` -> `coq.env.opaque?` |
| 853 | - Deprecate `coq.env.const-primitive?` -> `coq.env.primitive?` |
| 854 | - Deprecate `coq.CS.canonical-projections` -> `coq.env.projections` |
| 855 | - New `coq.env.primitive-projections` |
| 856 | - Change `coq.warning` emits the same warning only once |
| 857 | |
| 858 | ## [1.10.3] - 18-06-2021 |
| 859 | |
| 860 | Requires Elpi 1.13.6 and Coq 8.13. |
| 861 | |
| 862 | ### Lib |
| 863 | - Cleanup `elpi.loc` attribute, which now carries a real loc and not a string. |
| 864 | Thanks to elpi 1.13.6 we can project out the components without messing |
| 865 | with regular expressions. Moreover loc are printed in a consistent way on |
| 866 | Unix and Windows. |
| 867 | |
| 868 | ## [1.10.2] - 11-06-2021 |
| 869 | |
| 870 | Requires Elpi 1.13.5 and Coq 8.13. |
| 871 | |
| 872 | ### API |
| 873 | - Change `coq.gref->path` now (consistently) gives the path without the |
| 874 | final id, which can be retrieved by `coq.gref->id`. |
| 875 | |
| 876 | ## [1.10.1] - 24-05-2021 |
| 877 | |
| 878 | Requires Elpi 1.13.5 and Coq 8.13. |
| 879 | |
| 880 | ### HOAS |
| 881 | - Fix (reverse) the order of the context argument of `goal`. The head of |
| 882 | the list is the most recent hypothesis and in the last to be loaded (the |
| 883 | one with higher precedence) by implication when one writes `Ctx => ...`. |
| 884 | - New `msolve` entry point for (possibly multi goal) tactics |
| 885 | |
| 886 | ### API |
| 887 | - Fix argument interpretation for `coq.ltac.call-ltac1`, the context is now the |
| 888 | one of the goal alone (and not the one of the goal plus the current one) |
| 889 | - Rename `coq.ltac.then` to `coq.ltac.all` |
| 890 | |
| 891 | ## [1.10.0] - 21-05-2021 |
| 892 | |
| 893 | Requires Elpi 1.13.5 and Coq 8.13. |
| 894 | |
| 895 | ### Derive |
| 896 | - New `lens` and `lens_laws` for regular and primitive records with or without |
| 897 | parameters |
| 898 | - `derive` takes `#[only(this, that)]` to select the desired derivations |
| 899 | ### API |
| 900 | - Fix `coq.elpi.accumulate` scope `current`, which was putting the closes in the |
| 901 | current module for the current file, but was making them global for the files |
| 902 | importing it |
| 903 | - New scope `library` for `coq.elpi.accumulate` which links the clauses to the |
| 904 | library, that is the module named after the file. |
| 905 | - Fix databases are always available, no need to import files in the right order |
| 906 | when databases have named clauses. The error "Error: unable to graft this |
| 907 | clause: no clause named ..." should no more be raised in response to a |
| 908 | `Require Import`. |
| 909 | - New `coq.strategy.*` to `set` and `get` the unfolding priority of constants |
| 910 | followed by the term comparison algorithm Coq uses at type checking time. |
| 911 | - New `coq.env.record?` to test if an inductive is a record and if it has |
| 912 | primitive projections |
| 913 | - New `coq.env.recursive?` to test if an inductive is recursive |
| 914 | - Change `coq.locate*` understands strings like `"lib:some.name"` which point |
| 915 | to global references registered via the Coq `Register` command |
| 916 | - New `coq.ltac.fail` like `coq.error` but catch by Ltac |
| 917 | - New `@ltacfail!` to be used like `@ltacfail! Level => std.assert! ...` in |
| 918 | tactic code to use `coq.ltac.fail` instead of `coq.error` in case of failure |
| 919 | - Change failure as is `elpi fails` (no more clauses to try) or |
| 920 | `elpi run out of steps` are not considered Ltac failures anymore, but rather |
| 921 | fatal errors. Add a clause `solve _ _ :- coq.ltac.fail _` to preserve the |
| 922 | old behavior. |
| 923 | - New `coq.ltac.collect-goals` to turn unresolved unification variables into |
| 924 | goals. |
| 925 | - Fix `coq.env.add-const` now accepts an opaque definition with no given type. |
| 926 | The body is assumed to be well typed and is quickly retypechecked. |
| 927 | |
| 928 | ### HOAS |
| 929 | - Fix handling of default case in `match`, now Coq's `if _ then _ else _` |
| 930 | works just fine. |
| 931 | - New quotation `{{:gref id }}` and `{{:gref lib:qualid }}` that unfolds to the |
| 932 | `gref` data type (`{{ id }}` and `{{ lib:qualid }}` unfold to terms) |
| 933 | - Change `solve` only takes 2 arguments (the arguments passed at tactic |
| 934 | invocation time are now part of the goal) and the first argument is a single |
| 935 | goal, not a list thereof. The second argument is now a `sealed-goal`. |
| 936 | - Change `refine` now generates a list of `sealed-goal`s |
| 937 | - Change `goal` now carries two unification variables standing for the |
| 938 | raw solution to goal and the elaborated, well typed, one. Assigning a term |
| 939 | to the raw variable triggers a call to `coq.elaborate-skeleton` which in turn |
| 940 | assigns the other one to the (partial) proof term. |
| 941 | Assigning the elaborated variable directly does not trigger a type check |
| 942 | of the term. |
| 943 | |
| 944 | ### Vernacular |
| 945 | - New `attributes` tactic argument (for `Tactic Notation`) |
| 946 | - New `elpi tac` can receive attributes via the usual `#[stuff] tac` syntax |
| 947 | - New syntax to pass Elpi tactics arguments coming from Ltac variables: |
| 948 | - `ltac_string:(v)` (for `v` of type `string` or `ident`) |
| 949 | - `ltac_int:(v)` (for `v` of type `int` or `integer`) |
| 950 | - `ltac_term:(v)` (for `v` of type `constr` or `open_constr` or `uconstr` or `hyp`) |
| 951 | - `ltac_(string|int|term)_list:(v)` (for `v` of type `list` of ...) |
| 952 | - `ltac_attributes:(v)` (for `v` of type `attributes`) |
| 953 | Example: |
| 954 | ```coq |
| 955 | Tactic Notation "foo" string(X) ident(Y) int(Z) constr(T) constr_list(L) := |
| 956 | elpi foo ltac_string:(X) ltac_string:(T) ltac_int:(Z) (T) ltac_term_list(L). |
| 957 | ``` |
| 958 | lets one write `foo "a" b 3 nat t1 t2 t3` in any Ltac context. For attributes |
| 959 | one has to place `ltac_attributes:(v)` in front of `elpi`, as in: |
| 960 | ```coq |
| 961 | Tactic Notation "foo" "#[" attributes(A) "]" := |
| 962 | ltac_attributes:(A) elpi foo. |
| 963 | ``` |
| 964 | Here the delimiters `#[` and `]` are chosen for consistency, you can use any |
| 965 | "delimited" syntax really. |
| 966 | The usual prefix notation is also possible with the following limitations |
| 967 | due to a parsing conflicts in the Coq grammar (at the time of writing): |
| 968 | ```coq |
| 969 | Tactic Notation "#[" attributes(A) "]" "tac" := |
| 970 | ltac_attributes:(A) elpi tac. |
| 971 | ``` |
| 972 | - `#[ att ] tac.` does not parse |
| 973 | - `(#[ att ] tac).` works |
| 974 | - `idtac; #[ att ] tac.` works |
| 975 | - Change `-qua.lid` is no more understood as the string `"-qua.lid"` but as |
| 976 | two strings (when passed to a command, syntax error when passed to a tactic) |
| 977 | |
| 978 | ## [1.9.7] - 15-04-2021 |
| 979 | |
| 980 | Requires Elpi 1.13.1 and Coq 8.13. |
| 981 | |
| 982 | ### Vernacular |
| 983 | - New attribute `#[skip="rex"]` and `#[only="rex"]` for the |
| 984 | `Elpi Acumulate` family of commands which let one accumulate |
| 985 | a piece of (compatibility) code only on some Coq versions. |
| 986 | |
| 987 | ## [1.9.6] - 13-04-2021 |
| 988 | |
| 989 | Requires Elpi 1.13.1 and Coq 8.13. |
| 990 | |
| 991 | ### API |
| 992 | - New `coq.reduction.lazy.norm` |
| 993 | - New `coq.reduction.native.norm` |
| 994 | - New `coq.reduction.native.available?` |
| 995 | - Rename `coq.reduction.cbv.whd_all` -> `coq.reduction.cbv.norm` |
| 996 | - Rename `coq.reduction.vm.whd_all` -> `coq.reduction.vm.norm` |
| 997 | |
| 998 | ## [1.9.5] - 26-03-2021 |
| 999 | |
| 1000 | Requires Elpi 1.13 and Coq 8.13. |
| 1001 | |
| 1002 | ### Vernacular |
| 1003 | - Commands, Tactics and Db cannot be declared inside sections or modules |
| 1004 | (it never really worked, but now you get an error message). |
| 1005 | - Clauses which are accumulated via `coq.elpi.accumulate` and are not `@local!` |
| 1006 | survive section closing if they don't mention the section variables being |
| 1007 | discharged. |
| 1008 | |
| 1009 | ### Typechecker |
| 1010 | - Warnings can be turned into errors by passing Coq `-w +elpi.typecheck`. |
| 1011 | |
| 1012 | ### API |
| 1013 | - New `coq.CS.db-for` to filter the CS db given a projection or a canonical |
| 1014 | value, or both. |
| 1015 | - New `coq.warning` like `coq.warn` but with a category and name, so that |
| 1016 | the message can be silenced or turned into an error. |
| 1017 | |
| 1018 | ## [1.9.4] - 17-03-2021 |
| 1019 | |
| 1020 | Requires Elpi 1.13 and Coq 8.13. |
| 1021 | |
| 1022 | ### Elpi |
| 1023 | - Calls to APIs that only read the global state are much faster (thousands of |
| 1024 | times faster) |
| 1025 | - Fix compilation with OCaml 4.12 |
| 1026 | |
| 1027 | ### API |
| 1028 | - Fix issue with `coq.env.add-abbreviation` when given a term with binders |
| 1029 | having overlapping `name`s. |
| 1030 | - New `copy-indt-decl` |
| 1031 | - New `coq.coercion.declare` is able to infer the endpoints if omitted |
| 1032 | |
| 1033 | ## [1.9.3] - 18-02-2021 |
| 1034 | |
| 1035 | Requires Elpi 1.13 and Coq 8.13. |
| 1036 | |
| 1037 | ### Elpi |
| 1038 | - Fix issue with async-mode (Elpi commands can change the parser) |
| 1039 | |
| 1040 | ### API |
| 1041 | - New `attmap` attribute type to represent associative maps over strings, eg |
| 1042 | `#[foo(x = "a", y = "b")]` |
| 1043 | |
| 1044 | ## [1.9.2] - 12-02-2021 |
| 1045 | |
| 1046 | Requires Elpi 1.13 and Coq 8.13. |
| 1047 | |
| 1048 | ### API |
| 1049 | - Fix `elpi.loc` computation when run in interactive mode. |
| 1050 | - New `@using! S` attribute for `coq.env.add-const` akin to Coq's `#[using=S]`. |
| 1051 | |
| 1052 | ## [1.9.1] - 11-02-2021 |
| 1053 | |
| 1054 | Requires Elpi 1.13 and Coq 8.13. |
| 1055 | |
| 1056 | ### API |
| 1057 | - Fix `coq.env.add-section-variable` and `coq.env.add-axiom` were not handling |
| 1058 | universes correctly. |
| 1059 | |
| 1060 | ### Build system |
| 1061 | |
| 1062 | - New target `build` which only builds elpi and the apps |
| 1063 | - New target `test` which runs all tests for elpi and the apps |
| 1064 | - OPAM package only calls `test` only if requested, hence the package typically |
| 1065 | installs faster |
| 1066 | |
| 1067 | ## [1.9.0] - 10-02-2021 |
| 1068 | |
| 1069 | Requires Elpi 1.13 and Coq 8.13. |
| 1070 | |
| 1071 | ### HOAS |
| 1072 | - Fix `coq.env.indt-decl` to generate a `record-decl` for records. |
| 1073 | |
| 1074 | ### Elpi |
| 1075 | - Fix issue with the compiler cache when used in async-mode (via CoqIDE or |
| 1076 | vscoq). |
| 1077 | |
| 1078 | ### API |
| 1079 | - New type `coq.pp` and `coq.pp.box` to describe Coq's pretty printer box model |
| 1080 | - New `coq.pp->string` to turn formatting boxes into a string |
| 1081 | - New `coq.term->pp` to turn formatting boxes into a string |
| 1082 | - New `@ppall!` attribute to print terms in full details |
| 1083 | - New `@ppmost!` attribute to print terms in a reparsable way |
| 1084 | - New `@ppwidth! N` attribute to specify the maximal line length when turning |
| 1085 | formatting boxes into strings |
| 1086 | - New `fold-map` to map a term with an accumulator |
| 1087 | - New `coq.env.add-section-variable` |
| 1088 | - New `coq.env.add-axiom` |
| 1089 | - Deprecate `coq.env.add-const` for declaring axioms or section variables. The |
| 1090 | deprecation warning is called `elpi.add-const-for-axiom-or-sectionvar` and |
| 1091 | can be turned into an error by passing to `coqc` the option |
| 1092 | `-w +elpi.add-const-for-axiom-or-sectionvar` |
| 1093 | |
| 1094 | ### Tooling |
| 1095 | - The `COQ_ELPI_ATTRIBUTES=text` parses `text` as Coq attributes `#[elpi(text)]` |
| 1096 | and passes them to all commands. Attributes in the `elpi.` namespace are |
| 1097 | silently ignored by commands not using them. |
| 1098 | - Attribute `elpi.loc` carries the `loc` of the command being run (if exported |
| 1099 | with `Elpi Export cmd`). This location does not comprise control flags |
| 1100 | (eg `Fail`, `Time`) nor attributes. This limitation will be lifted in |
| 1101 | Coq 8.14 (8.13 does not expose this parsing information to plugins). |
| 1102 | |
| 1103 | ## [1.8.1] - 11-12-2020 |
| 1104 | |
| 1105 | Requires Elpi 1.12 and Coq 8.13. |
| 1106 | ### HOAS |
| 1107 | - Illformed terms like `global (const X)` (which have no |
| 1108 | representation in Coq) are now reported with a proper error message. |
| 1109 | Whe passed to `coq.term->string`, instead of a fatal error, we pick for |
| 1110 | the illformed sub term the `unknown_gref` special constant. |
| 1111 | |
| 1112 | ## [1.8.0] - 29-11-2020 |
| 1113 | |
| 1114 | Requires Elpi 1.12 and Coq 8.12. |
| 1115 | |
| 1116 | ### API |
| 1117 | - New `@primitive!` attribute for `coq.env.add-indt` allowing one to declare |
| 1118 | primitive records. So far no term syntax for primitive projects is supported, |
| 1119 | their "non primitive" version is always used instead. |
| 1120 | |
| 1121 | ### HOAS |
| 1122 | - Best effort support for Coq's `let (x, y, .. ) := t in ` in quotations. |
| 1123 | |
| 1124 | ### API |
| 1125 | - Fix `coq.term->gref` skips over casts |
| 1126 | ## [1.7.0] - 26-11-2020 |
| 1127 | |
| 1128 | Requires Elpi 1.12 and Coq 8.12. |
| 1129 | |
| 1130 | ### HOAS |
| 1131 | - New `primitive (uint63 <i>)` term constructor |
| 1132 | - New `primitive (float64 <f>)` term constructor |
| 1133 | |
| 1134 | ### API |
| 1135 | - New `coq.reduction.lazy.whd_all` |
| 1136 | - New `coq.reduction.cbv.whd_all` |
| 1137 | - New `coq.reduction.vm.whd_all` |
| 1138 | - New `coq.env.const-primitive?` |
| 1139 | - Fix argument `const-decl` is accepted even if the name is "_", allowing one |
| 1140 | to write `Elpi command Definition _ : type := body` |
| 1141 | - Fix `coq.notation.abbreviation` gives an error if too few arguments are |
| 1142 | provided |
| 1143 | |
| 1144 | ### Sources |
| 1145 | Major reorganization of sources: |
| 1146 | - src/ is for .ml files |
| 1147 | - elpi/ for .elpi files |
| 1148 | - theories/ for .v files meant to be installed |
| 1149 | - tests/ for the test suite, not to be installed |
| 1150 | - examples/ for tests (not to be installed) |
| 1151 | |
| 1152 | Moreover the apps/ directory is for applications written in Coq-Elpi, their |
| 1153 | structure follows the same convention |
| 1154 | |
| 1155 | ### NES (Namespace Emulation System) |
| 1156 | - POC application emulating name spaces on top of modules |
| 1157 | |
| 1158 | ### Elpi integration |
| 1159 | - Use Elpi 1.12 API to implement a compiler cache and avoid recompiling |
| 1160 | over and over the same programs. |
| 1161 | |
| 1162 | ## [1.6.0] - 21-08-2020 |
| 1163 | |
| 1164 | Requires Elpi 1.11 and Coq 8.12. |
| 1165 | |
| 1166 | ### UIs |
| 1167 | - Display failures generated by `std.assert!` as errors |
| 1168 | |
| 1169 | ### Derive |
| 1170 | - Use the new `coq.elaborate-skeleton` API to insert coercions |
| 1171 | |
| 1172 | ### Fix |
| 1173 | - Embedding for sorts was incorrectly mapping `Prop` to `sprop` |
| 1174 | - `coq.env.add-const` made 8.12 friendly with a workaround for coq/coq#12759 |
| 1175 | |
| 1176 | ### API |
| 1177 | - New `coq.elaborate-skeleton` and `coq.elaborate-ty-skeleton` that run |
| 1178 | Coq's elaborator on a term obtained by disregarding evars and universes |
| 1179 | in the given input. Unfortunately Coq's elaborator does not take terms |
| 1180 | as input, but glob terms, and the conversion function is not lossless. |
| 1181 | See also `lib:elpi.hole`. |
| 1182 | - New `coq.elaborate-indt-decl-skeleton` to elaborate an inductive type |
| 1183 | declaration. |
| 1184 | - New `coq.elaborate-arity-skeleton` to elaborate an arity. |
| 1185 | - New `coq.env.current-path` to get the current module path. |
| 1186 | - New `coq.modpath->path` and `coq.modpath->path` to get access to the |
| 1187 | components of a module path. |
| 1188 | - Change `coq.elpi.accumulate` understands the `@local!` attribute, which makes |
| 1189 | the clauses `Local` to the module into which they live. |
| 1190 | |
| 1191 | ### HOAS |
| 1192 | - New `lib:elpi.hole` constant that can be used in place of a unification |
| 1193 | variable to denote an implicit argument when calling `coq.*-skeleton` APIs |
| 1194 | |
| 1195 | ## [1.5.1] - 29-07-2020 |
| 1196 | |
| 1197 | Requires Elpi 1.11 and Coq 8.12. |
| 1198 | |
| 1199 | ### API: |
| 1200 | Locality is now supported by `coq.CS.declare-instance` |
| 1201 | |
| 1202 | ## [1.5.0] - 29-07-2020 |
| 1203 | |
| 1204 | Requires Elpi 1.11 and Coq 8.11. |
| 1205 | |
| 1206 | ### HOAS |
| 1207 | - New option `@holes!` to be assumed (as in `@holes! => ...`) before |
| 1208 | calling any Coq API. When this option is given unknown unification variables |
| 1209 | are interpreted as "implicit arguments" (linear holes that see all the |
| 1210 | variables in scope). If the unification variable is outside the pattern |
| 1211 | fragment the following heuristic is applied: arguments that are not variables |
| 1212 | are heuristically dropped; arguments which are variables but occur multiple |
| 1213 | times are kept only once (the first occurrence is kept, the others are |
| 1214 | dropped). |
| 1215 | |
| 1216 | ### API |
| 1217 | - New `coq.arguments.set-default-implicit` that behaves like |
| 1218 | `Arguments foo : default implicits` |
| 1219 | - Change of arguments of type `@global?` attributes `@local!` or `@global!`. |
| 1220 | In order to pass a locality directive one has to do something like |
| 1221 | `@global! => coq.add-something` |
| 1222 | Locality is understood by: |
| 1223 | - `coq.TC.declare-instance` |
| 1224 | - `coq.coercion.declare` |
| 1225 | - `coq.arguments.set-implicit` |
| 1226 | - `coq.arguments.set-default-implicit` |
| 1227 | - `coq.arguments.set-name` |
| 1228 | - `coq.arguments.set-scope` |
| 1229 | - `coq.arguments.set-simplification` |
| 1230 | - `coq.notation.add-abbreviation` |
| 1231 | - `coq.env.add-const` |
| 1232 | - Change of argument for deprecation to attribute `@deprecated! Since Message`. |
| 1233 | In order to pass a deprecation directive one has to do something like |
| 1234 | `@deprecated! "8.11.0" "use this instead" => coq.add-something` |
| 1235 | Deprecation is understood by: |
| 1236 | - `coq.notation.add-abbreviation` |
| 1237 | - New macro `@transparent!` with value `ff` to be used with `coq.env.add-const` |
| 1238 | |
| 1239 | ### Elaborator |
| 1240 | - `engine/elaborator.elpi` is now installed (but not used by default). |
| 1241 | One can `Elpi Accumulate "engine/elaborator.elpi".` in order to load it. |
| 1242 | It is too experimental to use it in production, but it is also hard to |
| 1243 | experiment with it without having it installed. |
| 1244 | |
| 1245 | ### CI |
| 1246 | - Switch to Github Actions and Coq Community's Docker workflow |
| 1247 | |
| 1248 | ### Bugfix |
| 1249 | - anonymous record fields are not given a generated name anymore |
| 1250 | - `coq.typecheck` and `coq.typecheck-ty` API now ensure that all unification |
| 1251 | problems required by type checking are actually solved by Coq's unifier |
| 1252 | - some debug printings used to raise errors in corner cases, now fixed |
| 1253 | |
| 1254 | ## [1.4.1] - 2020-06-10 |
| 1255 | |
| 1256 | Minor fixes |
| 1257 | |
| 1258 | - Missing opaque data type declaration for `abbreviation` (could lead to |
| 1259 | confusing type errors) |
| 1260 | - Parse also "keywords" where `qualified_name` is expected. `Elpi Export x.` |
| 1261 | turns `x` into a keyword, and that used to break commands |
| 1262 | `Elpi Something x ...`. Parsing of all commands is now resilient to this. |
| 1263 | |
| 1264 | ## [1.4.0] - 2020-05-19 |
| 1265 | |
| 1266 | Requires Elpi 1.11 and Coq 8.11 or 8.12. |
| 1267 | |
| 1268 | The main visible change is the `indt-decl` data type that now faithfully |
| 1269 | represents an inductive type declaration (including the implicit status of |
| 1270 | parameters). Also all the predicates implemented in `coq-lib` are now in |
| 1271 | the `coq.` namespace. |
| 1272 | |
| 1273 | ### API |
| 1274 | - New `coq.notation.abbreviation-body` to retrieve the number of arguments and |
| 1275 | body of a syntactic definition. |
| 1276 | - New `coq.id->name` to convert a relevant id into an irrelevant pretty printing |
| 1277 | hint. |
| 1278 | - New `coq.mk-n-holes ` to produce a list of flexible terms. |
| 1279 | - New `coq.env.indt-decl` to read for the environment an inductive type |
| 1280 | represented in HOAS form |
| 1281 | - `coq.env.indt->decl` renamed `coq.build-indt-decl` |
| 1282 | - New `coq.env.rename-indt-decl` |
| 1283 | - Change `coq.env.add-indt` now sets the imlicit status of the inductive |
| 1284 | type and its constructors (since the `parameter` constructor can carry it) |
| 1285 | - New `coq.arity->nparams` to count the number of parameters |
| 1286 | - Change `parse-attributes` made deterministic |
| 1287 | - Change `coq.unify-leq` and `coq.unify-eq` now return a diagnostic |
| 1288 | - Change `subst-prod` -> `coq.subst-prod` |
| 1289 | - Change `subst-fun` -> `coq.subst-fun` |
| 1290 | - Change `prod->fun` -> `coq.prod->fun` |
| 1291 | - Change `count-prods` -> `coq.count-prods` |
| 1292 | - Change `prod-R-fun` -> `coq.prod-R-fun` |
| 1293 | - Change `safe-dest-app` -> `coq.safe-dest-app` |
| 1294 | - Change `arity->sort` -> `coq.arity->sort` |
| 1295 | - Change `term->gref` -> `coq.term->gref` |
| 1296 | - Change `fresh-type` -> `coq.fresh-type` |
| 1297 | - Change `build-match` -> `coq.build-match` |
| 1298 | - Change `map-under-fun` -> `coq.map-under-fun` |
| 1299 | - Change `iter-under-fun` -> `coq.iter-under-fun` |
| 1300 | - Change `bind-ind-arity` -> `coq.bind-ind-arity` |
| 1301 | - Change `with-TC` -> `coq.with-TC` |
| 1302 | - Change `valid-attribute` -> `coq.valid-attribute` |
| 1303 | - Change `is-one-of` -> `coq.is-one-of` |
| 1304 | - Change `parse-attributes` -> `coq.parse-attributes` |
| 1305 | - Change `mk-app` -> `coq.mk-app` |
| 1306 | - Change `mk-app-uvar` -> `coq.mk-app-uvar` |
| 1307 | - Change `mk-eta` -> `coq.mk-eta` |
| 1308 | |
| 1309 | ### Universes |
| 1310 | - New support for `Type@{name}` in Coq `{{ quotations }}`. |
| 1311 | - Fix more precise promotion of universe variables to universe global names |
| 1312 | in builtins changing the Coq environment (eg `coq.env.add-const`). |
| 1313 | - New user error when `coq.elpi.accumulate` is given a clause that mentions |
| 1314 | universe variables: only global universes can be stored in a DB. |
| 1315 | |
| 1316 | ### HOAS |
| 1317 | |
| 1318 | - Change `indt-decl`: |
| 1319 | - the `parameter` constructor carries an `id`, `imlpicit_kind` and a type |
| 1320 | - the `coinductive` constructor was removed, the `inductive` one carries |
| 1321 | a `bool`, `tt` for inductive, `ff` for coinductive |
| 1322 | - the `inductive` constructor no more carries the number of non uniform |
| 1323 | parameters, and the inductive type arity (see below) is no more a simple term |
| 1324 | but rather an `arity` (all its parameters are non uniform) |
| 1325 | - the `constructor` constructor now carries an `arity` so that non uniform |
| 1326 | parameters can be represented faitfully |
| 1327 | - New `arity` data type, constructors are `parameter` (shared with `indt-decl`) |
| 1328 | and `arity`. |
| 1329 | - New `indt-decl` argument type introduced in version 1.3 now supports the |
| 1330 | syntax of inductive types (not just records). Eg |
| 1331 | `Elpi command Inductive P {A} t : I := | K1 .. | K2 ..`. |
| 1332 | - Change `context-item` now carries an `id` and an `implicit-kind` |
| 1333 | - Change `const-decl` now carries an arity to describe the parameters of |
| 1334 | the definition in a faithful way |
| 1335 | - New `@pi-parameter ID Ty p\ ...` to postulate a nominal `p` with type `Ty` |
| 1336 | and a name built out of the id `ID` |
| 1337 | |
| 1338 | ### Derive |
| 1339 | |
| 1340 | - New derivations `derive.invert` and `derive.idx2inv` now called by `derive` |
| 1341 | - New global command `derive` taking in input the name of an inductive |
| 1342 | or an inductive declaration. In the latter case all derivations are placed |
| 1343 | in a module named after the inductive |
| 1344 | |
| 1345 | ## [1.3.1] - 2020-03-01 |
| 1346 | |
| 1347 | Port to Coq 8.11, two API changes: |
| 1348 | - `field` constructor of `indt-decl` takes an argument of type |
| 1349 | `field-attributes` rather than a simple `bool`. The macro `@coercion!` works |
| 1350 | in both versions, as well as omitting the attribute using `_`. In 8.11 it is |
| 1351 | possible to disable canonical inference for a field using the |
| 1352 | `(canonical false)` attribute. |
| 1353 | - `coq.env.add-abbreviation` takes an extra argument (deprecation info). Code |
| 1354 | working on both versions can be obtained as follows: |
| 1355 | ```prolog |
| 1356 | if (coq.version _ 8 10 _) |
| 1357 | (std.unsafe-cast coq.notation.add-abbreviation F, F ... Abbrev) |
| 1358 | (std.unsafe-cast coq.notation.add-abbreviation G, G ... Deprecation Abbrev). |
| 1359 | ``` |
| 1360 | |
| 1361 | ## [1.3.0] - 2020-02-27 |
| 1362 | |
| 1363 | Requires Elpi 1.10 and Coq 8.10 or 8.11. |
| 1364 | |
| 1365 | The main visible change is that opaque data types such as `@constructor`, |
| 1366 | `@inductive` and `@constant` are now written without the `@`, since Elpi now |
| 1367 | supports the `typeabbrev` directive. |
| 1368 | |
| 1369 | The main invisible change is that code accumulated into commands and tactics is |
| 1370 | "compiled" by Elpi once and forall in the context in which it is accumulated. As |
| 1371 | a consequence Coq code inside `{{quotations}}` is processed in that, and only |
| 1372 | that, context of notations, scopes, etc. Data bases are compiled every time it |
| 1373 | is needed in the current Coq context, hence quotations should be used with care. |
| 1374 | |
| 1375 | The file `coq-HOAS.elpi` is now distributed as part of `coq-builtin.elpi`. |
| 1376 | |
| 1377 | ### Vernacular |
| 1378 | |
| 1379 | - New `Elpi Export command` to make `command` available without the `Elpi` |
| 1380 | prefix. |
| 1381 | - `Elpi command` (exported or not) can now access Coq's attributes (the |
| 1382 | `#[option]` thing). See the HOAS section below. |
| 1383 | - Coq keywords or symbols passed to command and tactics are interpreted as |
| 1384 | strings even if not quoted. Eg `Elpi command =>` is the same of |
| 1385 | `Elpi command "=>"`. |
| 1386 | - The identifiers `Record`, `Definition`, `Axioms` and `Context` are now |
| 1387 | reserved (see the HOAS section below). In order to pass them (as strings) |
| 1388 | one has to quote them. |
| 1389 | |
| 1390 | ### APIs |
| 1391 | |
| 1392 | - New `coq.typecheck-ty` to typecheck a type (outputs a universe) |
| 1393 | - New `coq.env.import/export-module`. |
| 1394 | - New `coq.env.begin/end-section`. |
| 1395 | - New `coq.notation.abbreviation` to unfold an abbreviation. |
| 1396 | - New `coq.locate-abbreviation` to locate abbreviations. |
| 1397 | - New `coq.locate-any` that never fails and gives a list of possible |
| 1398 | interpretations (term, abbreviation, module, module type). |
| 1399 | - Rename `coq.env.typeof-gr` to `coq.env.typeof`. |
| 1400 | - Rename `term->gr` to `germ->gref`. |
| 1401 | - Rename `coq.gr->*` to `coq.gref->*string*` |
| 1402 | - Change `coq.typecheck` and `coq.typecheck-indt-decl` so that they |
| 1403 | never fail and have a 3rd argument of type `diagnostic` (from Elpi 1.9) |
| 1404 | to signal success or errors (that can be printed). |
| 1405 | - Change `coq.elpi.accumulate` so that one can put the clause either in |
| 1406 | current module from which the program is started, or in the current |
| 1407 | module while the program runs (which can be different if one uses the |
| 1408 | `coq.env.begin-module` API). |
| 1409 | - Remove `coq.elaborate` and `coq.elaborate-indt-decl`. |
| 1410 | - Fix `coq.typecheck T TY` to uses Coq's unification to equate |
| 1411 | the type inferred for `T` and `TY` (when it is provided by |
| 1412 | the user). |
| 1413 | - Fix `coq.CS.*` w.r.t. default instances of canonical structures. |
| 1414 | - Fix all APIs changing the Coq global state to abort if they are used |
| 1415 | from a tactic. |
| 1416 | - Fix `coq.gr->string` to not duplicate the label part of the name |
| 1417 | |
| 1418 | ### HOAS |
| 1419 | |
| 1420 | - Change context entry `def` to not carry a cache for the normal form |
| 1421 | of the defined term (now cached by a specific `cache` context entry). |
| 1422 | `def` now carries the exact same information of a `let`, as `decl` |
| 1423 | carries the same information of a `fun`. |
| 1424 | - New `indt-decl` argument type with a concrete syntax that mimics the |
| 1425 | standard one for records. Eg `Elpi command Record x := K { f : T }`. |
| 1426 | - New `const-decl` argument type with a concrete syntax that mimics the |
| 1427 | standard one for definitions or axioms. |
| 1428 | Eg `Elpi command Definition x := t.`. |
| 1429 | - New `ctx-decl` argument type with a concrete syntax that mimics the |
| 1430 | standard one for contexts. Eg `Elpi command Context T (x : T).`. |
| 1431 | - Add to the context under which `main` is run the list of attributes |
| 1432 | passed to the command invocation (Coq syntax is for example `#[myflag]`). |
| 1433 | See the `attribute-value` data type in `coq-builtin.elpi` and |
| 1434 | `parse-attributes` helper in `coq-lib.elpi`. |
| 1435 | |
| 1436 | ## [1.2.0] - 2019-10-30 |
| 1437 | |
| 1438 | ### APIs |
| 1439 | |
| 1440 | - New `coq.gr->path` to get the path components as a list of strings |
| 1441 | - Failure of `coq.ltac.call` is now turned into logical failure, as any |
| 1442 | other Elpi tactic |
| 1443 | - Fix `coq.end.add-indt` in the case of record (was not flagging the inductive |
| 1444 | as such) |
| 1445 | - Fix `coq.version`, wrong parsing of beta versions |
| 1446 | - Expose `set` and `map` from Elpi 1.8 (generic data structure for ground terms) |
| 1447 | |
| 1448 | ### Documentation |
| 1449 | |
| 1450 | - Improve reflexive tactic demo |
| 1451 | - Fix documentation of `coq.gr->*` APIs |
| 1452 | - `coq-HOAS.elpi`, `coq-lib.elpi` and `coq-builtin.elpi` are now installed since |
| 1453 | they provide useful doc (but are not needed by the runtime, since they are |
| 1454 | embedded in `elpi.vo`) |
| 1455 | |
| 1456 | ## [1.1.0] - 2019-10-10 |
| 1457 | |
| 1458 | ### derive.param2 |
| 1459 | |
| 1460 | - interface made consistent with other derivations: `derive.param2` takes in |
| 1461 | input optional suffix, instead of the full name of the derived concept |
| 1462 | |
| 1463 | - storage of previous derivations based on Elpi Db |
| 1464 | |
| 1465 | - the derivation generates nicer types for relators over fixpoints (the new |
| 1466 | types are convertible to the old ones, but the fixpoint is not expanded). |
| 1467 | PR [#84](https://github.com/LPCIC/coq-elpi/pull/84/) by Cyril Cohen |
| 1468 | |
| 1469 | ### Documentation |
| 1470 | |
| 1471 | - Improved documentation of `coq.typecheck` |
| 1472 | |
| 1473 | ## [1.0.0] - 2019-10-09 |
| 1474 | |
| 1475 | - First public release |