aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Merge branch 'warnings' into trunkGravatar Maxime Dénès2016-06-29
|\ | | | | | | Was PR#213: New warnings machinery
| * Fix issues in test-suite revealed by warnings.Gravatar Maxime Dénès2016-06-29
| |
| * A new infrastructure for warnings.Gravatar Maxime Dénès2016-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the user side, coqtop and coqc take a list of warning names or categories after -w. No prefix means activate the warning, a "-" prefix means deactivate it, and "+" means turn the warning into an error. Special categories include "all", and "default" which contains the warnings enabled by default. We also provide a vernacular Set Warnings which takes the same flags as argument. Note that coqc now prints warnings. The name and category of a warning are printed with the warning itself. On the developer side, Feedback.msg_warning is still accessible, but the recommended way to print a warning is in two steps: 1) create it by: let warn_my_warning = CWarnings.create ~name:"my-warning" ~category:"my-category" (fun args -> Pp.strbrk ...) 2) print it by: warn_my_warning args
| * Add [Unset Printing Dependent Evars Line]Gravatar Jason Gross2016-06-29
| | | | | | | | | | This allows a work-around for bug #4819, https://coq.inria.fr/bugs/show_bug.cgi?id=4819.
* | Revert "A new infrastructure for warnings."Gravatar Maxime Dénès2016-06-28
| | | | | | | | | | | | | | | | This reverts commit 925d258d7d03674c601a1f3832122b3b4b1bc9b0. I forgot that Jenkins gave me a spurious success when trying to build this PR. There are a few rough edges to fix, so reverting meanwhile. The Jenkins issue has been fixed by Matej. Sorry for the noise.
* | Typeclasses: use once in by clause for typeclass eautoGravatar Matthieu Sozeau2016-06-28
| | | | | | | | | | Otherwise we may backtrack on the resolution in a by which seems strange.
* | Merge branch 'warnings' into trunkGravatar Maxime Dénès2016-06-28
|\ \ | | | | | | | | | Was PR#213: New warnings machinery
| * | A new infrastructure for warnings.Gravatar Maxime Dénès2016-06-28
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the user side, coqtop and coqc take a list of warning names or categories after -w. No prefix means activate the warning, a "-" prefix means deactivate it, and "+" means turn the warning into an error. Special categories include "all", and "default" which contains the warnings enabled by default. We also provide a vernacular Set Warnings which takes the same flags as argument. Note that coqc now prints warnings. The name and category of a warning are printed with the warning itself. On the developer side, Feedback.msg_warning is still accessible, but the recommended way to print a warning is in two steps: 1) create it by: let warn_my_warning = CWarnings.create ~name:"my-warning" ~category:"my-category" (fun args -> Pp.strbrk ...) 2) print it by: warn_my_warning args
* | Merge remote-tracking branch 'github/pr/207' into trunkGravatar Maxime Dénès2016-06-28
|\ \ | |/ |/| | | Was PR#207: Add -no-print-dependent-evars
* | Finalizing the only printing feature.Gravatar Pierre-Marie Pédrot2016-06-28
|\ \
| * | Documenting the "only printing" notation flag.Gravatar Pierre-Marie Pédrot2016-06-28
| | |
| * | Adding a test-suite for the only printing flag.Gravatar Pierre-Marie Pédrot2016-06-28
| | |
| * | Properly handle the only printing flag in Reserved Notations.Gravatar Pierre-Marie Pédrot2016-06-28
| | |
| * | Properly handling the only printing flag when parsing rules already exist.Gravatar Pierre-Marie Pédrot2016-06-28
|/ /
* | Merge branch 'shrinkobl' into trunkGravatar Matthieu Sozeau2016-06-27
|\ \
| * | Update CHANGES and COMPATIBILITYGravatar Matthieu Sozeau2016-06-27
| | |
| * | Program: refine shrinking of obligationsGravatar Matthieu Sozeau2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure correspondence between the term and type to shrink, so that Lets are preserved when they are used relevantly in either of them. This avoids e.g. "simpl" in the shrinked hypotheses to reduce shrinking, while maintaining unsimplified types in the type of the shrinked obligations (for compatibility). Simplify Lambda, Prod case of shrinking, By invariant (we start with a term and its type), the abstraction's types correspond.
| * | Rework treatment of default transparency of obligationsGravatar Matthieu Sozeau2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default obligations defined by tactics are defined transparently or opaque according to the Obligations Transparent flag, except proofs of subset obligations which are treated as opaque by default. When the user proves the obligation using Qed or Defined, this information takes precedence, and only when the obligation cannot be Qed'ed because it contains references to a recursive function an error is raised (this prevents the guardness checker error). Shrinked obligations were not doings this correctly. Forcing transparency due to fixpoint prototypes takes precedence over the user preference. Program: do not force opacity of subset proofs, maintaining compatibility.
| * | Add Unset Shrink Abstract/Obligations in Coq85Gravatar Matthieu Sozeau2016-06-27
| | | | | | | | | | | | For compatibility with 8.5.
| * | Shrink Proofs/Obligations by default and deprecateGravatar Matthieu Sozeau2016-06-27
|/ / | | | | | | | | | | | | | | | | Fix bug in Shrink obligations with Program in the process. Fix implementation of shrink for abstract proofs - Update doc in term.mli to reflect the fact that let-in's are part of what is returned by [decompose_lam_assum].
* | Typeclasses: fix treatment of exceptions in compatGravatar Matthieu Sozeau2016-06-27
| |
* | Typeclasses: mark unresolvable goals in new implementationGravatar Matthieu Sozeau2016-06-27
| |
* | Fix off-by-1 bug in coq_makefileGravatar Matthieu Sozeau2016-06-27
| |
* | We want tclORELSE to catch exceptions on backtrackingsGravatar Matthieu Sozeau2016-06-27
| |
* | Merge branch 'v8.5'Gravatar Pierre-Marie Pédrot2016-06-27
|\ \
* \ \ Merge remote-tracking branch 'github/pr/223' into feedback-locationsGravatar Maxime Dénès2016-06-27
|\ \ \ | | | | | | | | | | | | Was PR#223: Allow feedback messages to carry a location.
* | | | ssrmatching: avoid warnings about redundant typing clauses in ARGUMENT EXTENDGravatar Pierre Letouzey2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warnings were: Redundant [RAW_TYPED AS] clause in [ARGUMENT EXTEND cpattern]. Redundant [GLOB_TYPED AS] clause in [ARGUMENT EXTEND cpattern]. Redundant [RAW_TYPED AS] clause in [ARGUMENT EXTEND lcpattern]. Redundant [GLOB_TYPED AS] clause in [ARGUMENT EXTEND lcpattern].
* | | | Merge branch 'sort-fields' into trunkGravatar Maxime Dénès2016-06-27
|\ \ \ \ | | | | | | | | | | | | | | | Was PR#86 Simplify `interp/constrintern.ml:sort_fields`.
* \ \ \ \ Merge branch 'funpattern-tests' into trunk.Gravatar Maxime Dénès2016-06-27
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Was PR#225: Patterns-in-binder syntax tests.
| | * | | | minor: comment on the meaning of the 'boolean' variableGravatar Gabriel Scherer2016-06-27
| | | | | |
| | * | | | minor: documentation comment for constrintern.ml:sort_fieldsGravatar Gabriel Scherer2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Because the function is private to the module, it is documented in the .ml rather than the .mli)
| | * | | | minor: interp/constrintern.ml, clarify field completionGravatar Gabriel Scherer2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type of the user-defined function "completer" changes to be simpler and better reflect its purpose: provide values for missing field assignments. In the future we may want to also pass the name of the field as parameter (currently only the index is given, and both uses of the function ignore it), in particular if we want to implement { r with x = ...; y = ... }.
| | * | | | minor: in constrintern.ml:sort_fields, clarify sfGravatar Gabriel Scherer2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal `add_pat` function is replaced by a call to `CList.extract_first`.
| | * | | | add CList.extract_firstGravatar Gabriel Scherer2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we already have val remove_first : ('a -> bool) -> 'a list -> 'a list (** Remove the first element satisfying a predicate, or raise [Not_found] *) now we also have the more general val extract_first : ('a -> bool) -> 'a list -> 'a list * 'a (** Remove and return the first element satisfying a predicate, or raise [Not_found] *) The implementation is tail-recursive. The code I'm hoping to factorize reimplements extract_first in a tail-recursive way, so it seemed good to preserve this. On the other hand remove_first is not tail-recursive itself, and that gives better constant factors in real-life cases. It's unclear what is the best choice.
| | * | | | minor: in constrintern.ml:sort_fields, clarify build_pattGravatar Gabriel Scherer2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was a big "try..with" defining all useful quantities at once. I tried to lift definitions out of this try..with to define them as early as possible: the record's information and the first field name are fetched before processing the other fields. There were two calls in the try..with body that could raise the Not_found exception (or at least I don't know the code well enough to be sure that either of them cannot): `shortest_qualid_of_global` and `build_patt`. They are now split in two separate try..with blocks, both raising the same exception (with a shared error message named `env_error_msg`). Someone familiar with the invariants at play could probably remove one of the two blocks, streamlining the code even further. I'm a bit surprised by the main logic part (the big (if .. else if .. else if ..) block in the new code), and there is a question in a comment. I hope to get it answered during code review and remove it (and maybe simplify the code). Finally, there was an apparently-stale comment in the code: (* insertion of Constextern.reference_global *) of course Constextern.reference_global corresponds to now function that I could find. After trying to understand the meaning of this comment, I decided to just remove it.
| | * | | | whitespace: untabity constrinternl.ml:sort_fieldsGravatar Gabriel Scherer2016-06-27
| | | | | |
| | * | | | minor clarifications in constrintern.ml:sort_fieldsGravatar Gabriel Scherer2016-06-27
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that turning let boolean = not regular in if boolean && complete then ...; if boolean && complete then ...; into if not regular && complete then ...; if not regular && complete then ...; has absolutely no performance cost: negation inside a conditional is not computed as a boolean, it only flips the branches. The code is more readable because "boolean" was a terrible variable name.
| * | | | Patterns in binders: printing testsGravatar Arnaud Spiwack2016-06-27
| | | | |
| * | | | Patterns in binders: functional testsGravatar Arnaud Spiwack2016-06-27
|/ / / /
* | | | Merge branch 'funpattern' into trunk. Was PR#142: Binder syntax.Gravatar Maxime Dénès2016-06-27
|\ \ \ \
| * | | | Adding ability to put any pattern in binders, prefixed by a quote.Gravatar Daniel de Rauglaudre2016-06-27
| | | | | | | | | | | | | | | | | | | | Cf CHANGES for details.
| | | * | More on f9695eb4b, 827663982 on resolving #4782, #4813 (typing "with" clause).Gravatar Hugo Herbelin2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When typing a "with clause fails, type classes are used to possibly help to insert coercions. If this heuristic fails, do not consider it anymore to be the best failure since it has made type classes choices which may be inconsistent with other constraints and on which no backtracking is possible anymore (see new example in test suite file 4782.v). This does not mean that using type classes at this point is good. It may find an instance which help to find a coercion, but which might still be a choice of instance and coercion which is incompatible with other constraints. I tend to think that a convenient way to go to deal with the absence of backtracking in inserting coercions would be to have special For the record, here is a some comments of what happens regarding f9695eb4b and 827663982. In the presence of an instance (x:=t) given in a "with" clause, with t:T, and x expected of type T', the situation is the following: Before f9695eb4b: - If T and T' are closed and T <= T' is not satisfiable (no coercion or not convertible), the test for possible insertion of a coercion is postponed to w_merge, even though there is no way to get more information since T ant T' are closed. As a result, t may be ill-typed and the unification may try to unify ill-formed terms, leading to #4872. - If T and T' are not closed and contains evars of type a type class, inference of type classes is tried. If it fails, e.g. because a wrong type class instance is found, it was postponed to w_merge as above, and the test for coercion is retried now interleaved with type classes. After f9695eb4b and 827663982e: - If T and T' are closed and T <= T' is not satisfiable (no coercion or not convertible), the test for possible insertion of a coercion is an immediate failure. This fixes #4872. - However, If T and T' are not closed and contains evars of type a type class, inference of type classes is tried. If it gives closed terms and fails, this is immediate failure without backtracking on type classes, resulting in the problem added here to file 4872.v. The current fix does not consider the result of the use of type classes while trying to insert a coercion to be the last word on it. So, it fails with an error which is not the error for conversion of closed terms (ConversionFailed), therefore in a way expected by f9695eb4b and 827663982e, and the "with" typing problem is then postponed again.
| | | * | Fix bug #4698: CoqIDE error dialogs piling up when coqtop dies.Gravatar Pierre-Marie Pédrot2016-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relaunching the coqtop process and then open the warning window, we rather fire the warning and wait for the user to press the OK button before doing anything.
| | * | | [xmlproto] Remove duplicated deserialization.Gravatar Emilio Jesus Gallego Arias2016-06-25
| | | | |
| | * | | [doc] Update changes for feedback.Gravatar Emilio Jesus Gallego Arias2016-06-25
| | | | | | | | | | | | | | | | | | | | I've included some other changes that didn't happen in this PR.
| | * | | [feedback] Remove `ErrorMsg` in favor of `Message Error`.Gravatar Emilio Jesus Gallego Arias2016-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ErrorMsg datatype was introduced to allow locations in messages, however, it was redundant with error and used only in one place. We remove it in favor of a more uniform treatment of messages with location. This patch also removes the use of `Loc.ghost` in one place. Lightly tested.
| | * | | [feedback] Allow messages to carry a location.Gravatar Emilio Jesus Gallego Arias2016-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new warnings mechanism may which to forward a location to IDEs. This also makes sense for other message types. Next step is to remove redundant MsgError feedback type.
| | * | | [feedback] Add optional ?loc parameter to loggers.Gravatar Emilio Jesus Gallego Arias2016-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first step to relay location info in an uniform way, as needed by warnings and other mechanisms. The location info remains unused for now, but coqtop printing could take advantage of it if so wished.
| | * | | [feedback] Remove unused tag on `Debug` level.Gravatar Emilio Jesus Gallego Arias2016-06-25
| | | | | | | | | | | | | | | | | | | | IMO level indicators are not the proper place to store this information.
| | * | | [merlin] Fix .merlin STM includes.Gravatar Emilio Jesus Gallego Arias2016-06-25
| |/ / /