aboutsummaryrefslogtreecommitdiff
path: root/library
AgeCommit message (Collapse)Author
2017-04-25[location] Remove Loc.ghost.Emilio Jesus Gallego Arias
Now it is a private field, locations are optional.
2017-04-21[flags] Deprecate is_silent/is_verbose in favor of single flag.Emilio Jesus Gallego Arias
Today, both modes are controlled by a single flag, however this is a bit misleading as is_silent really means "quiet", that is to say `coqc -q` whereas "verbose" is Coq normal operation. We also restore proper behavior of goal printing in coqtop on quiet mode, thanks to @Matafou for the report.
2017-04-06Fix a normalization hotspot in computation of constr keys.Pierre-Marie Pédrot
Getting a key only needs to observe the root of a term. This hotspot was observed in HoTT.
2017-04-04Merge branch 'trunk' into pr379Maxime Dénès
2017-03-24Merge branch 'trunk' into pr379Maxime Dénès
2017-03-24[nit] Fix a couple incorrect uses of msg_error.Emilio Jesus Gallego Arias
2017-03-22Merge PR#390: Updates to the Pretty Printing InfrastructureMaxime Dénès
2017-03-22Merge PR#478: Small optimization on handling of library state.Maxime Dénès
2017-03-21[pp] [ide] Minor cleanups in pp code.Emilio Jesus Gallego Arias
- We avoid unnecessary use of Pp -> string conversion functions. and the creation of intermediate buffers on logging. - We rename local functions that share the name with the Coq stdlib, this is usually dangerous as if the normal function is removed, code may pick up the one in the stdlib, with different semantics.
2017-03-21[error] Move back fatal_error to toplevelEmilio Jesus Gallego Arias
This reverts 4444768d3f4f9c4fcdd440f7ab902886bd8e2b09 (the mllib dependencies that should be surely tweaked more). The logic for `fatal_error` has no place in `CErrors`, this is coqtop-specific code. What is more, a libobject caller should handle the exception correctly, I fail to see why the fix was needed on the first place.
2017-03-14[safe_string] library/nameopsEmilio Jesus Gallego Arias
We add a more convenient API to create identifiers from mutable strings. We cannot solve the `String.copy` deprecation problem until we enable `-safe-string`.
2017-03-14[library] Refactor state handling.Emilio Jesus Gallego Arias
This part of state is critical. We refactor it and make it into a record to ease handling.
2017-03-14[library] Don't recompute path_prefix on unfreeze.Emilio Jesus Gallego Arias
We instead save the current value.
2017-02-14Merge branch 'master'.Pierre-Marie Pédrot
2017-02-14Namegen primitives now apply on evar constrs.Pierre-Marie Pédrot
Incidentally, this fixes a printing bug in output/inference.v where the displayed name of an evar was the wrong one because its type was not evar-expanded enough.
2016-12-19Use Pp.quote in string options.Maxime Dénès
2016-11-18Merge branch 'v8.6'Pierre-Marie Pédrot
2016-11-02Fix various shortcomings of the warnings infrastructure.Maxime Dénès
- The flags are now interpreted from left to right, without any other precedence rule. The previous one did not make much sense in interactive mode. - Set Warnings and Set Warnings Append are now synonyms, and have the "append" semantics, which is the most natural one for warnings. - Warnings on unknown warnings are now printed only once (previously the would be repeated on further calls to Set Warnings, sections closing, module requiring...). - Warning status strings are normalized, so that e.g. "+foo,-foo" is reduced to "-foo" (if foo exists, "" otherwise).
2016-11-02Put string between quotes when printing an option value.Maxime Dénès
This is a better (more generic) fix to #5061 than my e8b9ee76.
2016-10-30Moving Universes to the engine/ folder.Pierre-Marie Pédrot
Before this patch, this module was a member of the library folder, which had little to do with its actual use. A tiny part relative to global registering of universe names has been effectively moved to the Global module.
2016-10-29Merge branch 'v8.6'Pierre-Marie Pédrot
2016-10-28Merge remote-tracking branch 'github/pr/337' into v8.6Maxime Dénès
Was PR#337: Fix arguments
2016-10-27Add missing dot to impargs error message.Maxime Dénès
2016-10-27Proper fix for #3753 (anomaly with implicit arguments and renamings)Maxime Dénès
Instead of circumventing the problem on the caller's side, as was done in Arguments, we simply avoid failing as there was no real reason for this anomaly to be triggered. If the list of renamings is shorter than the one of implicits, we simply interpret the remaining arguments as not renamed.
2016-10-27Complete overhaul of the Arguments vernacular.Maxime Dénès
The main point of this change is to fix #3035: Avoiding trailing arguments in the Arguments command, and related issues occurring in HoTT for instance. When the "assert" flag is not specified, we now accept prefixes of the list of arguments. The semantics of _ w.r.t. to renaming has changed. Previously, it meant "restore the original name inferred from the type". Now it means "don't change the current name". The syntax of arguments is now restricted. Modifiers like /, ! and scopes are allowed only in the first arguments list. We also add *a lot* of missing checks on input values and fix various bugs. Note that this code is still way too complex for what it does, due to the complexity of the implicit arguments, reduction behaviors and renaming APIs.
2016-10-24Merge branch 'v8.6'Pierre-Marie Pédrot
2016-10-20Cleanup code according to comments.Matthieu Sozeau
2016-10-20Fix minimization to be insensitive to redundant arcs.Matthieu Sozeau
The new algorithm produces different sets of arcs than in 8.5, hence existing developments may fail to pass now because they relied on the (correct but more approximate) result of minimization in 8.5 which wasn't insensitive. The algorithm works bottom-up on the (well-founded) graph to find lower levels that an upper level can be minimized to. We filter said lower levels according to the lower sets of the other levels we consider. If they appear in any of them then we don't need their constraints. Does not seem to have a huge impact on performance in HoTT, but this should be evaluated further. Adapt test-suite files accordingly.
2016-10-20Merge branch 'bug5036' into v8.6Matthieu Sozeau
2016-10-20Fix bug #5036 autorewrite, sections and universesMatthieu Sozeau
Universe context not properly declared. Improve API and code in declare.ml to allow declaration of universe contexts, used by declaration of universes and constraints (separately).
2016-10-19COMMENT: was added to "Nameops.increment_suffix".Matej Kosik
2016-10-19CLEANUP: rename "Nameops.lift_subscript" to "Nameops.increment_subscript".Matej Kosik
The word "increment" is more appropriate in this case than "lifting". The world "lifting", in computer science, usually denotes something else: https://en.wikipedia.org/wiki/Lambda_lifting
2016-10-05Merge branch 'v8.6'Pierre-Marie Pédrot
2016-10-05Fix a bug of Mltop.declare_cache_object.Pierre-Marie Pédrot
Objects registered through the callback functions were pushed on the libstack before the ML-MODULE object itself, leading to anomalies when the corresponding object was assuming that the ML module was properly defined in any other Coq module requiring the Declare ML command.
2016-10-04Changing the separator for appended string options to comma.Maxime Dénès
This is a bit ad-hoc, but looks better for warnings since there is a command-line flag accepting the same values, so comma will lead to fewer parsing issues than space.
2016-10-02Merge branch 'v8.6'Pierre-Marie Pédrot
2016-10-01Allow appending to string options.Guillaume Melquiond
Whether an option should be set or appended to is stored as a 2-value flag next to the new content. This commit also cleans the code by declaring a single object for each persistent option rather than three different ones (one per locality).
2016-09-30Merge remote-tracking branch 'github/pr/299' into v8.6Maxime Dénès
Was PR#299: Fix bug #4869, allow Prop, Set, and level names in constraints.
2016-09-29Fix bug #5036 autorewrite, sections and universesMatthieu Sozeau
Universe context not properly declared. Improve API and code in declare.ml to allow declaration of universe contexts, used by declaration of universes and constraints (separately).
2016-09-29Fix bug #4869, allow Prop, Set, and level names in constraints.Matthieu Sozeau
2016-09-27Merge branch 'v8.6'Pierre-Marie Pédrot
2016-09-25Fix bug #5090: Effect of -Q depends on coqtop's current directory.Pierre-Marie Pédrot
This bug was seemingly introduced on purpose by commit 9c5ea63 in 2001. It seems that the original motivation was to deactivate a warning when overriding the default loadpath binding of the current directory, but in the end it made it non-overridable.
2016-09-23Merge branch 'v8.6'Pierre-Marie Pédrot
2016-09-22Revert "Merge remote-tracking branch 'github/pr/283' into trunk"Maxime Dénès
I hadn't realized that this PR uses OCaml's 4.03 inlined records feature. I will advocate again for a switch to the latest OCaml stable version, but meanwhile, let's revert. Sorry for the noise. This reverts commit 3c47248abc27aa9c64120db30dcb0d7bf945bc70, reversing changes made to ceb68d1d643ac65f500e0201f61e73cf22e6e2fb.
2016-09-20Rename Decl_kinds.binding_kind into Decls_kind.implicit_status.Maxime Dénès
The new name makes it more obvious what is meant here by "kind". We leave Decl_kinds.binding_kind as a deprecated alias for plugin compatibility. We also replace bool with implicit_status in a few places in the codebase.
2016-09-20Stylistic improvements in intf/decl_kinds.mli.Maxime Dénès
We get rid of tuples containing booleans (typically for universe polymorphism) by replacing them with records. The previously common idom: if pi2 kind (* polymorphic *) then ... else ... becomes: if kind.polymorphic then ... else ... To make the construction and destruction of these records lightweight, the labels of boolean arguments for universe polymorphism are now usually also called "polymorphic".
2016-09-20Remove dead code in library/lib.ml.Maxime Dénès
2016-09-08Merge PR #244.Pierre-Marie Pédrot
2016-09-07Merge branch 'v8.6'Pierre-Marie Pédrot
2016-09-06A proposal to unify the messages given by Test and Print Options (#5062).Hugo Herbelin