aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2017-04-24[location] Use located in misctypes.Emilio Jesus Gallego Arias
2017-04-24[location] Switch glob_constr to Loc.locatedEmilio Jesus Gallego Arias
2017-04-24[location] Move Glob_term.predicate_pattern to located.Emilio Jesus Gallego Arias
We continue the uniformization pass. No big news here, trying to be minimally invasive.
2017-04-24[location] Move Glob_term.cases_pattern to located.Emilio Jesus Gallego Arias
We continue the uniformization pass. No big news here, trying to be minimally invasive.
2017-04-24Merge PR#579: [flags] Deprecate is_silent/is_verbose in favor of single flag.Maxime Dénès
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-20Fix bug #5377: @? patterns broken.Pierre-Marie Pédrot
2017-04-19Fix bug #5476: Ltac has an inconsistent view of hypotheses.Pierre-Marie Pédrot
2017-04-15Merge branch 'v8.6' into trunkMaxime Dénès
2017-04-13Reinstate fixpoint refolding in [cbn], deactivated by mistake.Matthieu Sozeau
Add a test-suite file to be sure we won't regress silently.
2017-04-13Using fold_glob_constr_with_binders to code bound_glob_vars.Hugo Herbelin
To use the generic combinator, we introduce a side effect. I believe that we have more to gain from a short code than from being purely functional. This also fixes the expected semantics since the variables binding the return type in "match" were not taking into account.
2017-04-13Adding a fold_glob_constr_with_binders combinator.Hugo Herbelin
Binding generalizable_vars_of_glob_constr, occur_glob_constr, free_glob_vars, and bound_glob_vars on it. Most of the functions of which it factorizes the code were bugged with respect to bindings in the return clause of "match" and in either the types or the bodies of "fix/cofix".
2017-04-13Silence a few OCaml warnings.Guillaume Melquiond
2017-04-11Merge PR#543: Sanitize instance interpretationMaxime Dénès
2017-04-11Update various comments to use "template polymorphism"Gaetan Gilbert
Also remove obvious comments.
2017-04-11Merge PR#379: Introducing evar-insensitive constrsMaxime Dénès
2017-04-10Revert "refactoring: Reductionops.contextual_reduction_function type"Matej Košík
This reverts commit 470d0d56467a3a587dc34f958ffea8259618d1ae.
2017-04-10refactoring: Reductionops.contextual_reduction_function typeMatej Kosik
2017-04-08Fixing #5460 (limitation in computing deps in pattern-matching compilation).Hugo Herbelin
This was assuming dependencies occurring in configurations of the form x:A, y:B x, z:C x y |- match x, y, z with ... end". But still work to do for better management of dependencies in general...
2017-04-07Better support for printing constructors with let-ins.Hugo Herbelin
This allows e.g. to use the record notations even when there are defined fields. A priori fixed also missing parameters when interpreting primitive tokens.
2017-04-07Merge branch 'master' into econstrPierre-Marie Pédrot
2017-04-07Turning the printing primitive projection parameter flag off by default.Hugo Herbelin
2017-04-07Turning the printing primitive projection compatibility flag off by default.Hugo Herbelin
2017-04-06Merge PR#508: Optimize pending evarsMaxime Dénès
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-06Factor interp_instance out of Pretyping.pretype_globalGaetan Gilbert
2017-04-06Avoid strange shadowing of Pretyping.interp_universe_level_nameGaetan Gilbert
2017-04-05Removing a normalization hotspot from EConstr.Pierre-Marie Pédrot
It was not necessary to normalize a term just to check whether it was a global reference. The hotspot appeared in mathcomp.
2017-04-04Merge branch 'trunk' into pr379Maxime Dénès
2017-04-01Using delayed universe instances in EConstr.Pierre-Marie Pédrot
The transition has been done a bit brutally. I think we can still save a lot of useless normalizations here and there by providing the right API in EConstr. Nonetheless, this is a first step.
2017-04-01Actually exporting delayed universes in the EConstr implementation.Pierre-Marie Pédrot
For now we only normalize sorts, and we leave instances for the next commit.
2017-03-31Make the Constr.kind_of_term type parametric in sorts and universes.Pierre-Marie Pédrot
2017-03-28Revert to incorrect heuristic in apply.Maxime Dénès
Was breaking e.g. fiat-crypto.
2017-03-24Fix interpretation of Ltac patterns episode 2.Maxime Dénès
After 5db9588098f9f, some extra evar-normalization remained (compared to trunk) that would change the semantics e.g. of change bindings under Ltac match. This is just circumventing a fundamental flaw in the treatment of patterns.
2017-03-24Merge branch 'trunk' into pr379Maxime Dénès
2017-03-24Replacing "cast surgery" in LetIn by a proper field (see PR #404).Hugo Herbelin
This is a patch fulfilling the relevant remark of Maxime that an explicit information at the ML type level would be better than "cast surgery" to carry the optional type of a let-in. There are a very few semantic changes. - a "(x:t:=c)" in a block of binders is now written in the more standard way "(x:=c:t)" - in notations, the type of a let-in is not displayed if not explicitly asked so. See discussion at PR #417 for more information.
2017-03-24Better algorithm for Evarconv.max_undefined_with_candidates.Pierre-Marie Pédrot
Instead of crawling the whole undefined evar map, we use the fold_right function to process evars in decreasing order.
2017-03-23Merge branch 'v8.6' into trunkMaxime Dénès
2017-03-23Intern names bound in match patternsTej Chajed
Fixes Coq bug 5345 (https://coq.inria.fr/bugs/show_bug.cgi?id=5345): Cannot use names bound in matches inside Ltac definitions.
2017-03-23Make the computation of frozen evars lazy in Pretyping.Pierre-Marie Pédrot
A lot of tactic calls actually use the open_constr_no_classes_flags option which does not require checking anything about frozen evars. Computing it upfront is useless in this case.
2017-03-23Fast path in computation of frozen evars in Pretyping.Pierre-Marie Pédrot
Most of the time, undefined evars are not modified by the considered function, which leads to the costly recomputation of a trivial partition of evars. We simply take advantage of physical equality to discriminate when this is useless and special-case it in the type of frozen evars.
2017-03-23Ensuring static invariants about handling of pending evars in Pretyping.Pierre-Marie Pédrot
All functions where actually called with the second argument of the pending problem being the current evar map. We simply remove this useless and error-prone second component.
2017-03-17Merge PR#437: Improve unification debug trace.Maxime Dénès
2017-02-14Merge branch 'master'.Pierre-Marie Pédrot
2017-02-14Quick hack to fix interpretation of patterns in Ltac.Pierre-Marie Pédrot
Interpretation of patterns in Ltac is essentially flawed. It does a roundtrip through the pretyper, and relies on suspicious flagging of evars in the evar source field to recognize original pattern holes. After the pattern_of_constr function was made evar-insensitive, it expanded evars that were solved by magical side-effects of the pretyper, even if it hadn't been asked to perform any heuristics. We backtrack on the insensitivity of the pattern_of_constr function. This may have a performance penalty in other dubious code, e.g. hints. In the long run we should get rid of the pattern_of_constr function.
2017-02-14Dedicated datatype for aliases in Evarsolve.Pierre-Marie Pédrot
2017-02-14Putting back the occur_meta_or_undefined_evar function in the old term API.Pierre-Marie Pédrot
This is another perfomance-critical function in unification. Putting it in the EConstr API was changing the heuristic, so better revert on that change.
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.
2017-02-14Moving printing code from Evd to Termops.Pierre-Marie Pédrot
2017-02-14Chasing a few unsafe constr coercions.Pierre-Marie Pédrot